Hard Light Productions Forums

General FreeSpace => FreeSpace & FreeSpace Open Support => Topic started by: AV8R on February 16, 2015, 04:49:55 pm

Title: Frame Rate Drop
Post by: AV8R on February 16, 2015, 04:49:55 pm
Hey everyone, I'm wondering if someone can have me try some things that may help me find what causing a sudden drop in frame rate when I play a mission with a Sathanas on screen. The frame rate drop starts to occur when I get within 4000m of the Sath at which point my fps drops from 75 (v-sync on) to 37.5. When I get really close to it (less than 1000 meters) my fps will drop to 25. When I turn my ship away from the Sath, as soon as it's off screen my fps instantly jumps back to 75 again. I can't image why my system would struggle with this.

System stats:

Windows 7 SP1 x86
Intel i5 3350P (3.1Ghz)
2GB DDR3 @ 1600Mhz 9-9-9-24
ATI FirePro 3D v4800 1GB GDDR5 (PCIe 2.1)
Monitor resolution 1440x900 @ 32-bit

There are plenty of resources available on my system (I run it very lean) but I can't seem to find where the bottleneck is. It's strange because it seems that this just started happening recently. Here's what I've done so far:

1) Tried different FSO exes (3.7 - 3.7.5)
2) Tried different video drivers (from recent to up to 2 years ago)
3) Tried various resolutions (1024x768 - 1440x900)
4) Tried turning FXAA and other features off in the launcher

And just to rule anything else out, since I recently upgraded my processor from a Sandy Bridge-based Pentium dual-core @ 3.0Ghz to an Ivy Bridge-based i5 quad-core @ 3.1Ghz I took it upon myself to format my HD and reload Windows 7 from scratch this past weekend - but no dice; even after a clean OS install the FPS drop remains.

Any suggestions on systematically tracking this down?
Title: Re: Frame Rate Drop
Post by: zookeeper on February 16, 2015, 06:01:21 pm
Well, the distances where the FPS changes are probably the LOD distances, and my first guess would be that it's struggling with the textures somehow. If it's one of the fancy HTL/MediaVPs models then it probably has pretty heavy textures (in addition to the model itself being complex). You could try lowering the "3D Hardware Textures" slider in the in-game detail options screen, or toggling normal, specular and glow maps off in the launcher. If none of those help, then the problem ought to be something else.
Title: Re: Frame Rate Drop
Post by: AdmiralRalwood on February 16, 2015, 06:24:17 pm
1) Tried different FSO exes (3.7 - 3.7.5)
3.7.5!? Care to share your time machine with the rest of us? ;)

In all seriousness, I'm looking askance at your GPU:
ATI FirePro 3D v4800 1GB GDDR5 (PCIe 2.1)
That's a workstation graphics card, not one optimized for gaming.
Title: Re: Frame Rate Drop
Post by: AV8R on February 17, 2015, 10:38:45 am
Well, the distances where the FPS changes are probably the LOD distances, and my first guess would be that it's struggling with the textures somehow. If it's one of the fancy HTL/MediaVPs models then it probably has pretty heavy textures (in addition to the model itself being complex). You could try lowering the "3D Hardware Textures" slider in the in-game detail options screen, or toggling normal, specular and glow maps off in the launcher. If none of those help, then the problem ought to be something else.

Thanks, I'll give those suggestions a try and report back.
Title: Re: Frame Rate Drop
Post by: AV8R on February 17, 2015, 10:46:30 am
1) Tried different FSO exes (3.7 - 3.7.5)
3.7.5!? Care to share your time machine with the rest of us? ;)

In all seriousness, I'm looking askance at your GPU:
ATI FirePro 3D v4800 1GB GDDR5 (PCIe 2.1)
That's a workstation graphics card, not one optimized for gaming.

3.7.5 was a short-handed was of saying 3.7 RC5.   ;)

Hmm, the FirePro card has never giving me an issue with Freespace or any other OpenGL optimized game. I prefer it since workstation-class drivers are super-optimized for OpenGL whereas "gaming cards" are super-optimized for DirectX. Also, workstation-class drivers are optimized for visual quality while gaming card drivers are optimized for frame rate. To each his own.

I'll keep poking around and see if I can narrow it down. More suggestions are welcome.
Title: Re: Frame Rate Drop
Post by: AdmiralRalwood on February 17, 2015, 11:18:52 am
3.7.5 was a short-handed was of saying 3.7 RC5.   ;)
There was no 3.7.0 RC5. :P

I don't mind shorthand, but "3.7.5" is in no way a useful shorthand for "3.7.2 Release Candidate 5".

Hmm, the FirePro card has never giving me an issue with Freespace or any other OpenGL optimized game. I prefer it since workstation-class drivers are super-optimized for OpenGL whereas "gaming cards" are super-optimized for DirectX. Also, workstation-class drivers are optimized for visual quality while gaming card drivers are optimized for frame rate. To each his own.
And your problem is a drop in frame rate, no? Workstation cards are usually optimized for things like CAD work, where you don't really need to refresh the image as many times per second as possible; it's still possible that something else is causing the slowdown, but I'd be surprised if you had the exact same performance with a different GPU.
Title: Re: Frame Rate Drop
Post by: Fury on February 17, 2015, 11:53:56 am
Okay, let's take a step back here.

From what I can tell, the only hardware change in his setup is new CPU, which is better than the last one. GPU has not changed, but in-game performance of FSO has. So this leads to following questions:
1) Did you update motherboard BIOS before CPU upgrade, and reset BIOS settings to defaults after CPU upgrade?
2) Did the performance problems in FSO start right after your CPU upgrade?
3) Has performance changed in other games?
Title: Re: Frame Rate Drop
Post by: AdmiralRalwood on February 17, 2015, 12:41:55 pm
Actually, come to think of it, your new CPU may have an integrated GPU that FSO may be using instead of your FirePro. A debug log (http://www.hard-light.net/forums/index.php?topic=56279.msg1180359#msg1180359) might be helpful.
Title: Re: Frame Rate Drop
Post by: AV8R on February 17, 2015, 01:11:58 pm
Okay, let's take a step back here.

From what I can tell, the only hardware change in his setup is new CPU, which is better than the last one. GPU has not changed, but in-game performance of FSO has. So this leads to following questions:
1) Did you update motherboard BIOS before CPU upgrade, and reset BIOS settings to defaults after CPU upgrade?
2) Did the performance problems in FSO start right after your CPU upgrade?
3) Has performance changed in other games?

Good points - I'll test your theories tonight.

EDIT: MB already has latest BIOS - but a reset back to defaults may be necessary. Problem did start to become apparent after CPU swap. I'll post my findings tonight.
Title: Re: Frame Rate Drop
Post by: AV8R on February 17, 2015, 01:13:49 pm
Actually, come to think of it, your new CPU may have an integrated GPU that FSO may be using instead of your FirePro. A debug log (http://www.hard-light.net/forums/index.php?topic=56279.msg1180359#msg1180359) might be helpful.

This is one of the few Intel processors that does NOT have integrated graphics - 3350P.
Title: Re: Frame Rate Drop
Post by: coffeesoft on February 18, 2015, 02:35:42 am
I´m not sure if helps, but i was trying to play FSO with a Nvidia QuadroFX some time ago, with horrible FPS.

These cards are made as well for Workstations and specially for 3D Design, but for gamming they don´t support too much textures.
Title: Re: Frame Rate Drop
Post by: AV8R on February 19, 2015, 12:45:39 pm
I´m not sure if helps, but i was trying to play FSO with a Nvidia QuadroFX some time ago, with horrible FPS.

These cards are made as well for Workstations and specially for 3D Design, but for gamming they don´t support too much textures.

I respectfully disagree about the textures - workstation-class video cards are made to do just that and do it very well, especially in the OpenGL environment. However, they are made to stress (visual) quality over quantity (frames per second) so there is a valid difference in performance that could occur depending on application. But I digress...

I tried reset my BIOS settings to default but it had no effect. I guess the next thing I'll check is Zookeeper's suggestion to turn down 3D Hardware Textures setting and see its affect on frame rates. Maybe a less busy textures will bring the FPS back up again. I'll also post a LOG file when I get a chance.

I do plan on trading in the FirePro for a true gaming card (got my eye on an NVidia GTX 750 Ti) which will also boost graphics transfer speeds to PCIe 3.0 levels from PCIe 2.0 on the FirePro card. We'll see.
Title: Re: Frame Rate Drop
Post by: AV8R on February 28, 2015, 05:34:55 pm
Ok, I had some time to experiment today and after an hour of trying various setting changes, I've finally narrowed down my frame rate drop issue, the drop is caused by the Lighting setting under Details. Anything above 3 dots and my frame rate plummets by 50-75% (but only when in close proximity to a large model like the Sathanas). Unfortunately, anything below 4 dots and you lose a LOT of detail - most models are blacked out with only the glow maps visible. Not fun to look at.

Interestingly, as I was doing my testing, at one point I was sitting directly behind the Sathanas (about 1500m away) and I was watching the frame rate meter (which was 50% less than what it should have been) at which point a corvette passed right in front of me so close that it completely obscured the Sath from sight. Seeing this I thought that, with the Sath completely blocked from view, the frame rate would go up again - but it did not. Simply having my ship pointed in the direction of the Sath, even unseeable, dropped my frame rate by 50%. Just to make sure the corvette model wasn't causing the frame rate drop also, I flew beside another corvette so close that I bumped into it, flew around every side of it and even sat by the engines, with all of the white flames dancing out of them - but no frame rate drop.

So what settings in the game or launcher 5.5g can I try to see if they will have an affect on the in-game Lighting setting? Or anything else on my system I can adjust or look at (video card settings, etc)? My system specs are listed above.

Strange how this all seemed to start after a processor change. Maybe I should slip the Sandy Bridge Pentium back into the PC - this Ivy Bridge i5 is killing my performance.  ;)
Title: Re: Frame Rate Drop
Post by: AV8R on February 28, 2015, 06:48:59 pm
After some more testing, I have some strangely mixed results. I began to wonder if this was a systemic issue, or an issue with my custom mission I had recently created. So I opened FRED and created a mission with just my ship and a Sathanas so I could fly around it and check for frame rate drops. Once I entered the mission and began fly around the Sath the frames rates held and never budged from 75fps. So I turned up all of the Detail settings to max and still no change in frame rates. Odd.

Well, now I started thinking something is up with my mission file so I opened it up and decided to replace the in-mission Sath. I deleted it, created a new one and made sure all of the SEXP pointers were correct for the new ship and re-entered the mission. While the frame rates didn't improve (still dropping by 50-75% at time depending on proximity to the Sath if the Lighting setting was 4 or 5 dots) the lighting appeared to work better if I turned the setting below 4 dots. I wouldn't lose textures like I did before. But now, while pointing my ship at the Sath didn't drop my frame rates like before I replaced it in my mission, now the beam weapon fire would drop the frame rates. When a corvette fired a beam, the frame rate dropped 50% (this was with the Lighting setting at 3 dots or less).

So it seems there may be an issue with my FREDed mission. Whatever the issue may be wasn't apparent before the hardware change to my system but now there is. Of course that could just be coincidence too. Could my mission be mildly corrupt? When I check the mission for errors, FRED says there are none (but I'm sure this is more of a SEXP logic check than a file integrity check). I'd hate to have to rebuild the mission from scratch.

Any ideas?
Title: Re: Frame Rate Drop
Post by: jr2 on February 28, 2015, 07:56:19 pm
UL the mission for someone to check?
Title: Re: Frame Rate Drop
Post by: AdmiralRalwood on February 28, 2015, 08:21:27 pm
This really sounds like the problem is with the GPU/drivers, and the effect of the mission file is incidental (or the precise set of circumstances in the mission file is causing the issue to appear in the first place). Still, it wouldn't hurt to upload the mission file.
Title: Re: Frame Rate Drop
Post by: AV8R on February 28, 2015, 08:27:51 pm
Here you are. See how it goes on your systems.

(Please be kind - it's my first attempt at FRED)   :)

[attachment deleted by nobody]
Title: Re: Frame Rate Drop
Post by: AV8R on March 01, 2015, 10:28:18 am
Sorry, forgot to post this last night also.

Log file including starting up my custom mission.

[attachment deleted by nobody]
Title: Re: Frame Rate Drop
Post by: AV8R on March 01, 2015, 01:10:16 pm
So I played with some more settings in the Launcher to see if I could further narrow down this issue. After enabling and disabling specular, glow maps, normal maps and others with no effect, I recalled a "fix" given to others here who have had frame rate issues in the past - especially those using onboard CPU video solutions. So I found the Disable GLSL option under Troubleshooting in the Launcher and tried it out. Well, that did the trick. No more frame rate drops - even with Lighting and other Detail settings turned all the way up.

What exactly does this do and what effect does it have on visual quality? While most of the textures seemed a bit more flat and less metallic-looking (lack of specular highlights?) most of the overall modeling looked ok.

Seems rather strange that an ATI FirePro v4800 suddenly wouldn't handle this type of OGL functionality well - especially since it's designed to do just that. Very odd.
Title: Re: Frame Rate Drop
Post by: The E on March 01, 2015, 01:35:41 pm
Because it wasn't designed for this type of work, no matter what you believe.

By disabling GLSL, you fall back on the old fixed-function render pipeline, this means no normal maps, no advanced lighting, no post-processing.
Title: Re: Frame Rate Drop
Post by: AV8R on March 01, 2015, 05:34:19 pm
Respectfully, what I believe is irrelevant. The fact is, workstation-class cards are highly tuned for OpenGL rendering. And yes, not necessarily for frame rates but for image quality (although, when working with 3-D modeling you still want high frame rates so models can be viewed smoothly). What has changed on my system that is suddenly causing a bottleneck somewhere is what's bothering me. Everything in the technical numbers shows I should be getting better performance but I'm not:

1) Pentium dual-core @ 3.0Ghz upgraded to i5 quad-core @ 3.1Ghz; 3.3Ghz Turbo (faster processor, more cores)
2) Memory running at 1333Mhz @ 8-8-8-24 upgraded to 1600Mhz @ 9-9-9-24 XMP (more memory bandwidth)

And while the video card is still running at PCIe 2.0 speeds, a card upgrade should push that up to PCIe 3.0 (and its increase in bandwidth). My real concern is that even if I swap out my video card later for a gaming-optimized card this issue will persist. But why the sudden rendering bottleneck after the above changes is just bizzare - and only FSOpen is affected (other OpenGL games I tried work fine, but in fairness, they're not as complex as FSOpen).

Oh well, unless anyone else has a suggestion to try I'll just press on with GLSL disabled until I get a vid card upgrade in the future.  :sigh:
Title: Re: Frame Rate Drop
Post by: jr2 on March 01, 2015, 05:56:00 pm
I'm not sure if this will work in your specific scenario, but you could try searching / posting over here to see if your card can be soft-modded back and forth between FirePro and Radeon HD as the FirePro M and Mobility Radeon HD series can do this at least sometimes (read post).

http://forum.techinferno.com/general-notebook-discussions/1144-%5Bsoftmod%5D-amd-6970m-firepro-m8900-*update*-6990m-works-too.html (http://forum.techinferno.com/general-notebook-discussions/1144-%5Bsoftmod%5D-amd-6970m-firepro-m8900-*update*-6990m-works-too.html)


EDIT:  Some mention over here, too:  http://forums.guru3d.com/showthread.php?t=313065&page=22 (http://forums.guru3d.com/showthread.php?t=313065&page=22)
Title: Re: Frame Rate Drop
Post by: tomimaki on March 01, 2015, 07:39:57 pm
Hm, maybe check for MB BIOS update. Sometimes it fixes problems with newer CPUs.
Title: Re: Frame Rate Drop
Post by: jr2 on March 01, 2015, 07:55:31 pm
That too.  I always did a BIOS update if one was available before attempting a CPU upgrade.
Title: Re: Frame Rate Drop
Post by: AV8R on March 01, 2015, 09:11:14 pm
My MB already has the latest BIOS version and the processor installed is on the compatibility list on the manufacturer's website. Unless I reflash the BIOS but that shouldn't be necessary. Maybe a BIOS reset via jumper on mobo? I'll try that too.
Title: Re: Frame Rate Drop
Post by: jr2 on March 02, 2015, 02:27:26 pm
You're supposed to reset the BIOS to factory defaults then reconfigure (at least, last time i did this).   Jumper or in - BIOS,  but jumper is prolly more foolproof.
Title: Re: Frame Rate Drop
Post by: AV8R on March 03, 2015, 03:14:41 pm
I did the jumper factory reset last night but haven't had a chance to test it. I'll give it a go tonight.

If that doesn't pan out, the final thing I'll try to make sure this is not a hardware issue is to flash the BIOS down a version (if it lets me) and then flash it back to the most recent. The previous version still supports the new processor model so it shouldn't cause a boot issue. This to me is the only sure-fire way to make sure all logical BIOS firmware is 100% factory and then can be properly configured with the hardware currently installed on the mobo.

I'll report my findings. Thanks for everyone's input. It's greatly appreciated.   :yes:
Title: Re: Frame Rate Drop
Post by: Fury on March 04, 2015, 01:06:02 am
From what I have understood so far, you really haven't done any proper testing whether the issue really exists in other OpenGL/D3D applications, since you mentioned FSO is the most demanding of them. Which should be unlikely if you have any even relatively recent games at all. Why not confirm that before you go reflashing your mobo and risk bricking it, unless it has a backup BIOS.
Title: Re: Frame Rate Drop
Post by: jr2 on March 04, 2015, 08:49:23 am
Do double-check the settings, too.  Some BIOSes have legacy settings to disable L2 cache, lock the processor to ridiculously low clock speeds, etc, etc.  I'm assuming you would notice things like that in Windows itself and other programs, though.

If all else fails, perhaps swap CPUs back and test the old one... this is just weird.  CPU-wise, FSO should have no clue between the two, I think.
Title: Re: Frame Rate Drop
Post by: Macfie on March 04, 2015, 09:46:37 am
It is my understanding that FreeSpace is not multithreaded and will only run on one core, so going to a quad core processor with similar values per core does not significantly improve performance.  The core size is typically the choke point for performance.  Programs tend to operate first on the first core and then spread to the others.  This could result in freeSpace sharing the first core with all the other programs that are running.  I vaguely remember that in an older thread for framerate drop there were directions for settings that would  allow you to select which core that freespace ran on.  selecting a higher number core would allow Freespace to in essence have a core to itself.
Title: Re: Frame Rate Drop
Post by: AV8R on March 04, 2015, 07:54:15 pm
Numerous utilities I've run (i.e. CPU-Z, GPU-Z, etc) have verified that nothing is amiss as far as clock rates, memory frequency and PCIe throughput. It's all where it should be (so the BIOS settings are all good for the processor, memory, etc). I even ran Intel's Processor Diagnostic Tool to make sure nothing was goofy with the processor (such as having one core not functioning properly). Everything checks out. I suppose I could use some benchmarking software and compare my results to others posted online to see if mine are grossly lower.

Question: is the complex lighting handled by the video card or the processor? (the Lighting setting under Details) I did a little research and found in some game engines, lighting is handled by the processor while textures are handled by the video card. Is this the case with FSO?

Macfie's post is certainly intriguing. Is there a way to steer FSO to use a specific core on a multi-core processor?

Edit: I did not get the i5 thinking FSO could utilize multiple cores of the processor at once. I knew it was single-core program all along. The reason I installed it was 2-fold: the i5 supports higher memory frequencies (1333Mhz to 1600Mhz) and higher video throughput (PCIe 2.1 to PCIe 3.0 - which is yet to be realized since I'll need a new video card). Since my mobo supported Ivy Bridge processors, I thought the benefit would be a no-brainer. I'm starting to regret it now.  :(
Title: Re: Frame Rate Drop
Post by: The E on March 05, 2015, 02:46:43 am
Question: is the complex lighting handled by the video card or the processor? (the Lighting setting under Details) I did a little research and found in some game engines, lighting is handled by the processor while textures are handled by the video card. Is this the case with FSO?

Rendering in FSO is entirely done on the GPU. The CPU is only responsible for physics (including collisions), gameplay logic and building scenes to be rendered, all the heavy lifting is done on the GPU.

Now, the interesting thing here is that by disabling shaders, you have actually put FSO into a more CPU-intensive mode, because more of the work associated with setting up scenes has to be done on the CPU. This is why I remain convinced that the issue isn't actually the CPU, but the GPU and its drivers instead.

Quote
Macfie's post is certainly intriguing. Is there a way to steer FSO to use a specific core on a multi-core processor?

Yes, there is. Here's a guide for Win 7 that should also work for other versions of Windows. (http://www.tech-recipes.com/rx/37272/set-a-programs-affinity-in-windows-7-for-better-performance/)
Title: Re: Frame Rate Drop
Post by: Fury on March 05, 2015, 03:37:46 am
Now, the interesting thing here is that by disabling shaders, you have actually put FSO into a more CPU-intensive mode, because more of the work associated with setting up scenes has to be done on the CPU. This is why I remain convinced that the issue isn't actually the CPU, but the GPU and its drivers instead.
Reasonable conjecture, but it does not explain why he did not have these performance issues in FSO prior to CPU upgrade. At least that is what he claims, but it is entirely possible something else has changed other than new CPU. But it is difficult for us to speculate what that could be.

Given the situation, it is entirely possible that upgrading GPU would not solve the real problem. Which is why I am more interested what the performance is like in other games. But given AV8R's GPU of choice, does he even have any other games to test with?

Which leaves me with:
1. Reset BIOS to defaults.
2. Reformat and reinstall OS.
3. Install only drivers and must-have software.
4. Re-test performance.
5. Deal with it.
Title: Re: Frame Rate Drop
Post by: AV8R on March 05, 2015, 11:55:31 am
Yes, there is. Here's a guide for Win 7 that should also work for other versions of Windows. (http://www.tech-recipes.com/rx/37272/set-a-programs-affinity-in-windows-7-for-better-performance/)

Interesting, I will play around with this and see what affect it has on FSO's performance.

BTW, did anyone try my mission or check the log file I uploaded? Anything worth noting in either case?

Reasonable conjecture, but it does not explain why he did not have these performance issues in FSO prior to CPU upgrade. At least that is what he claims, but it is entirely possible something else has changed other than new CPU. But it is difficult for us to speculate what that could be.

Nothing has changed hardware-wise other than the CPU. Why would I give misleading details when I'm trying to solve an issue? That would be counter-productive. The only other change is the bump in memory speed from 1333 to 1600. Again, a performance gain which should improve throughput, not hinder it (I've tried resetting it back to 1333 but it doesn't help).

Given the situation, it is entirely possible that upgrading GPU would not solve the real problem. Which is why I am more interested what the performance is like in other games. But given AV8R's GPU of choice, does he even have any other games to test with?

I've tried some of my other OGL-based games, such as Descent: Rebirth with all of its bells and whistles turned on and it runs smooth as glass - but then again if you've played Descent (even this graphics updated version) you'd know the textures are no where near as complex/detailed as FSO. So I can only really take the comparison with a grain of salt.

Which leaves me with:
1. Reset BIOS to defaults.
2. Reformat and reinstall OS.
3. Install only drivers and must-have software.
4. Re-test performance.
5. Deal with it.

1. Done
2. Done
3. Done
4. Done
5. Dealt.