Hard Light Productions Forums

General FreeSpace => FreeSpace & FreeSpace Open Support => Topic started by: Kolgena on November 06, 2015, 02:20:00 am

Title: Strange Memory behavior/stutter
Post by: Kolgena on November 06, 2015, 02:20:00 am
Using this build: fs2_open_3_7_3_AVX_20151103_0ea25e7, tested in Icarus (bpcomplete)

If I turn on stats, I see 0 bytes used in physical, 800-1100 in page, and about 1000 in virtual. (the free space is around 2000 for each otherwise) Thing is, physical never budges from 0 bytes, and page file keeps filling rapidly from 800 to 1100, stuttering for a split second, then dropping back down to 800. The end result is a regular hitch that happens every 2 seconds or so. Very distracting and makes it hard to play. Is this supposed to happen like this?

Using an 8870M, with an i7 3635QM. 8 GB of RAM. catalyst 15.10 beta.
Title: Re: Strange Memory behavior/stutter
Post by: The E on November 06, 2015, 02:38:25 am
Can you turn on the "Profile engine subsystems" in the dev tools category, and run this through a release build? This should show you which subsystems are spiking in CPU usage. During the recent BP beta phase, we encountered this sort of behaviour under certain circumstances, Icarus should not be affected by them, but you never know.
Title: Re: Strange Memory behavior/stutter
Post by: Kolgena on November 06, 2015, 02:51:17 am
Hmm. At a cursory watch, I'm not seeing any large spiking coinciding with the stutters. Nothing is obviously eating up lots of CPU when it happens. Should I be monitoring the number after the semicolon, or the percentage usage? Renderer and Environment mapping tend to take up big chunks (percent) of CPU, and so do request draws.

Are the stats actually named correctly? If I'm to assume that Physical memory means RAM, then how come the game is using zero RAM? Why is everything in the page file? Why does the page file flush every 2 seconds when it exceeds 1100?

I actually think that this is related to flak lag, a problem I've had since years ago. Whenever scripted multi-part flak explodes, the game stutters and the page file partially empties. Edit: No, it's not flak. Scenes where nothing is shooting also stutter. Actually, the game stutters in every mission, not just BP.

(Oh yeah, and Win10)
Title: Re: Strange Memory behavior/stutter
Post by: MatthTheGeek on November 06, 2015, 03:15:35 am
I would suggest disabling all visual features (shadows, normals, env, everything) in order to minimize the percentage of frame time eaten by them and narrow down the culprit more easily. Helped me before.
Title: Re: Strange Memory behavior/stutter
Post by: Kolgena on November 06, 2015, 01:21:20 pm
I have done so, still isn't telling me the problem. At calmer scenes, where the heavy hitters like Submit Draws and Renderer are <10%, I stutter regularly. In heavy scenes when Collisions, Renderer, Postmove, Submit Draws, etc are >30%, I stutter regularly.

I don't think it's a CPU problem. My framerates remain >100 at all times, but there's frame hitching.
Title: Re: Strange Memory behavior/stutter
Post by: niffiwan on November 06, 2015, 04:32:10 pm
If I turn on stats, I see 0 bytes used in physical, 800-1100 in page, and about 1000 in virtual. (the free space is around 2000 for each otherwise) Thing is, physical never budges from 0 bytes, and page file keeps filling rapidly from 800 to 1100, stuttering for a split second, then dropping back down to 800.

Which stats are you enabling here? I can't see a "page" value in the FSO onscreen memory stats? I guess you're probably referring to Task Manager -> Performance?
Title: Re: Strange Memory behavior/stutter
Post by: Kolgena on November 06, 2015, 07:14:01 pm
Under launcher dev tools, Show Statistics. I see:

FPS: 75.1

Using Physical: 0 Meg
Using Pagefile: 143 Meg (<- this one bounces around in sync to the game's hitches)
Using Virtual: 957 Meg

Physical Free: 2047/2047 Meg
Pagefile Free: 3952/4095 Meg
Virtual Free: 947/2047 Meg

Title: Re: Strange Memory behavior/stutter
Post by: niffiwan on November 06, 2015, 07:46:40 pm
 :sigh: I don't seem to get the same output under Linux... I guess it's code spelunking time to figure out what the "Using Pagefile" figure represents (& why Physical is zero...)
Title: Re: Strange Memory behavior/stutter
Post by: Kolgena on November 07, 2015, 02:58:25 pm
A quick update: I installed the 15.11 beta drivers just now, and now pagefile usage stays at a constant zero. Stuttering still persists, and is as bad as before.
Title: Re: Strange Memory behavior/stutter
Post by: m!m on November 08, 2015, 05:06:51 am
@niffiwan: The memory tracking code is windows specific and also uses deprecated functions so it's not particularly surprising that it doesn't work correctly.

@Kolgena: You can try adding the -show_mem_usage ("Show memory usage" in the launcher) option. That will enable the in-engine tracking of where memory is allocated which may show in which file all that memory is allocated.
Title: Re: Strange Memory behavior/stutter
Post by: Kolgena on November 26, 2015, 02:17:09 pm
Installed the new Crimson drivers, still stuttering.

I tried the -show_mem_usage flag, but I don't see anything on the HUD that displays info.
Show statistics now shows the Using Pagefile: stat bouncing around between 0 and ~90 in time to the stutters.
Title: Re: Strange Memory behavior/stutter
Post by: Kolgena on February 19, 2016, 03:58:49 pm
Update:

Still having this problem with 15.12 and nightly 3_7_3_AVX_20160215_801b808.exe. I tried the SSE2 and the AVX variations. No difference.

I've tried turning off sound, all mods (retail FS2), all the graphics settings, and still experience the same stutter. FPS meter shows 120 throughout. Issue is isolated to the AMD card, since force running it on intel HD 4000 in the same computer shows no stutter at all (despite maxing at 50 fps in the same mission). At this point, considering just playing FS on all lowest on the intel, since it's far more playable at 40 fps than at 120fps with hitches.

I also remember a long time ago the OEM drivers for this laptop didn't hitch at all. Which dlls do I need to move over to the root directory to get the GPU to use those instead of the installed ones? opengl32.dll?

On a whim, tried the ATI+Linux input lag fix, did nothing.
Title: Re: Strange Memory behavior/stutter
Post by: tomimaki on February 21, 2016, 06:52:59 am
You need atioglxx.dll
Title: Re: Strange Memory behavior/stutter
Post by: The E on February 21, 2016, 07:00:41 am
tomimaki: While the issue seems to be related to the driver, without knowing which specific version of atioglxx.dll you refer to, your advice here is pretty useless.
Title: Re: Strange Memory behavior/stutter
Post by: tomimaki on February 21, 2016, 07:14:53 am
Hm?

....
I also remember a long time ago the OEM drivers for this laptop didn't hitch at all. Which dlls do I need to move over to the root directory to get the GPU to use those instead of the installed ones? opengl32.dll?
...
Title: Re: Strange Memory behavior/stutter
Post by: The E on February 21, 2016, 07:37:30 am
Oh.

Sorry for that, apparently I can't read. Do carry on.
Title: Re: Strange Memory behavior/stutter
Post by: Kolgena on February 23, 2016, 03:36:26 pm
Thank you! I'll test and report back if it fixes things.

Do I need to rename the .dll? I just drop it in the same folder as the exec, correct? The xx is 32 for FSO, or 64 for Windows 10 x64?
Title: Re: Strange Memory behavior/stutter
Post by: tomimaki on February 23, 2016, 05:46:18 pm
Uh, why rename?
If you extracted atioglxx.dll from driver then drop it in the same folder as the fs2 exe.
Title: Re: Strange Memory behavior/stutter
Post by: Kolgena on February 24, 2016, 01:48:19 pm
cuz i r stupud.

I remember there was a thing where if you wanted to load a separate openal dll in the root, you needed to rename it or something. I thought maybe the same was true for the ati driver.

Anwyays, I got the oldest OEM driver for win10 I could find from samsung. It still stutters. For the hell of it, I also tried loading the win8 and 8.1 drivers (the win8.0 one is the one I recall working) but obviously the exe fails to launch with those. That sucks :(
Title: Re: Strange Memory behavior/stutter
Post by: tomimaki on March 25, 2016, 07:05:00 pm
Small tip if you'll see this topic again.
In Radeon Settings try "Frame Pacing off" for FSO.
Recently I noticed that game stutters, even if I got 60 fps.
With FP disabled I see more stable framerate and stuttering is gone.
Title: Re: Strange Memory behavior/stutter
Post by: Kolgena on March 30, 2016, 02:48:17 pm
Thanks for the tip. Unfortunately the option doesn't exist in my crimson driver panel. AMD likes to randomly hide UI settings on laptops, even though they may still be on/off/toggleable under the hood...