Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Anubis-class Cruiser (12/20/24)

Pages: 1 [2] 3

Author Topic: Terrible performance on multiple OS, AMD GPU issues?  (Read 10895 times)

MesoTroniK

  • Admiral
  • *****
  • Posts: 1734
  • I am going to destroy your ships
    • View Profile
Re: Terrible performance on multiple OS, AMD GPU issues?
« Reply #15 on: August 31, 2019, 08:46:10 PM »

http://richg42.blogspot.com/2014/05/the-truth-on-opengl-driver-quality.html
This is just as true today as it was in 2014 if not even more so... TLDR, AMD video cards and especially their drivers are less than good and that is being charitable.

thenumber9734

  • Ensign
  • *
  • Posts: 10
  • An Esoteric Alien!
    • View Profile
Re: Terrible performance on multiple OS, AMD GPU issues?
« Reply #16 on: September 10, 2019, 04:45:16 PM »

Bit of a necro here, but you know how I said you can simply just throw more hardware at the problem and get better results? That's not entirely true. I'm losing my mind here and I'm about at my wits end, but I managed to make my average FPS worse across multiple OSes and driver packages.


I upgraded my R9 280X to a RX 580. The only way I've managed to bring my FPS back up was to put the old card back in. I thought perhaps there was an issue where Starsector was defaulting to software rendering, but Starsector is definitely utilizing the new GPU, although not much. I tried dropping either the Microsoft software OpenGL render DLL or the 4 ATI OpenGL renders in each of the Java.exe and Starsector.exe folders but this seemingly had no impact on utilization.


My roommate's PC still has no issue running the game (never goes below 30FPS), despite being entirely an AMD setup. His graphics card, a RX 560, is certainly not as good as mine. The positive differences between my current system and my roommate's system are the DDR4 RAM and the better performing Ryzen 5 2600X processor.


Alex had mentioned that the bulk of the work was done on a single thread. I see the Java EXE utilize as much as 40% of my total processor (3 cores/threads maxed out and some extra) but I'm wondering if the actual bottleneck here is one of these cores not being able to handle the load it is given. The processor I currently run, the FX-8350, was manufactured about a year before development for Starfarer really kicked off AFAIK. The gimmick behind the processor was the insane number (at the time) of physical cores on the die, 8 in total. Multi-threaded applications excelled and single-threaded applications suffered. For years, Intel had the lead in single core performance. We can generalize that Intel users would prefer nVidia GPUs over AMD and compound the very real issue of poor OpenGL drivers from AMD with the worse single-core performance that AMD CPUs have provided for the past half decade. The A10 APU series are no exception to this.


It may seem like a GPU issue and it definitely feels like one, but I'm no longer convinced it is.


I've repeated tests of both 2D and 3D OpenGL applications on both of my GPUs, most of which have used OpenGL 3.0-4.5, with no real issues with performance. The very simplistic OpenGL Extensions Viewer rendering test using the legacy OpenGL Context for OpenGL 1.2 showed nearly identical performance to that of a modern context running OpenGL 4.5, but again, this doesn't tell me a whole lot. "Modern" games that use OpenGL as their API (almost entirely 3D rendering...) don't generally seem to have the same kind of performance variance that Starsector does, at least not with my testing. This makes me lean more and more towards this month long goose chase actually just being Starsector's single-thread performance requirements being a lot higher than I anticipated and no one realizing this because of other very real issues concerning AMD hardware. Even the majority of older Intel laptops have better single-thread performance than my CPU. Sheesh.


I'll try to enlist some of my esports students in testing the game. I may however get the Netbeans Java profiler and start drilling down into specific items that may be thread-bound. The Starsector on PS3 idea sounds more and more enticing  :o


If you came to this thread thinking you may have an AMD GPU issue, read carefully and consider what your CPU is capable of on a single-thread basis. You probably still have an AMD GPU based OpenGL problem, but don't waste time like I did using a CPU that most likely is not capable of running the game adequately.
Logged
If anime=bad then I don't want to be good

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 25044
    • View Profile
Re: Terrible performance on multiple OS, AMD GPU issues?
« Reply #17 on: September 10, 2019, 04:57:01 PM »

Hmm, very interesting.

It maxing out 3 cores, though - that seems extremely strange. The main work is on one thread, and that's not likely to max out the one core even if the frame rate is dipping, because - if vsync is on - it'll spend some time waiting to sync up with the refresh rate. Work on other threads is minimal - music playback, and that's it. You might also see some garbage collection being done by Java on another thread, but that would be intermittent, not constant.

Unless for some reason the OS keeps switching the process between the threads? I have no idea if it's actually possible to do this, especially quickly enough to max out three threads.

That you got good performance using the legacy OpenGL context does argue against it being a graphics issue, though. Hmm. One thing you might try would be getting into a big fight, preferably with lots of carriers and fighters (maybe one of the missions fits the bill?) and then pausing the game to see what that does to the framerate. You'd expect it to improve, naturally, but the question is how much? When the combat is paused, CPU use drops off drastically, so if it's mainly CPU-bound, you'd expect the framerate to probably get all the way to 60, with some decent idle time to boot.
Logged

thenumber9734

  • Ensign
  • *
  • Posts: 10
  • An Esoteric Alien!
    • View Profile
Re: Terrible performance on multiple OS, AMD GPU issues?
« Reply #18 on: September 10, 2019, 06:09:17 PM »

The 3 cores maxing out may be due to me setting the processor affinity to 4 cores maximum for those tests. I was verifying how few cores could be assigned to the game without creating a CPU bottleneck. When the affinity is set to all 8 cores, I generally only see one core get near-max while the remaining 7 have between 0-25% utilization. The primary thread seems to switch cores somewhat frequently which is also part of why I was trying to force core-affinity but I haven't been accurately able to track this. I have core-parking disabled in Windows so I don't believe there's any kernel interference with hardware assignment, though threads bouncing around and CPU cores being parked by the OS actually has been an issue for some titles such as the original launch of Metro2033.


I did the quick test you mentioned and played The Last Hurrah with all ships deployed. At about where I was getting 15FPS, I paused the game. My FPS was wildly changing from about 25-45 without settling in place. This was a raw pause without strategic view and no camera movement. This would suggest that it is still a GPU issue as you say, but it still doesn't make sense to me how a less powerful GPU using the same exact driver package can have drastically better performance. The only thing that makes the RX 560 stand out from what I've personally tested is its PCIe 3.0 ×8 128-bit interface. The architecture is the same with an inferior core clock, lesser number of compute units, and some other trimmings that don't say to me they would enable better drivers for OpenGL. In fact, looking at all the AMD cards I've seen reported so far having issues, all of them are x16 and not x8 with a 256-bit or greater memory bus regardless of how new or old. This may be a coincidence but I find it very weird that the one AMD card to work fairly well is the only one using an inferior bus. If I put my roommate's GPU into my PC and suddenly have much better performance, I wont know what to think, but I'm going to try it.
Logged
If anime=bad then I don't want to be good

Innominandum

  • Commander
  • ***
  • Posts: 167
    • View Profile
Re: Terrible performance on multiple OS, AMD GPU issues?
« Reply #19 on: September 17, 2019, 03:55:17 PM »

@Alex
Not to necro but seeing how this is the latest AMD thread and out of curiosity, LWJGL VBO or Display Lists ?
Logged
"The early worm catcheth the bird."

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 25044
    • View Profile
Re: Terrible performance on multiple OS, AMD GPU issues?
« Reply #20 on: September 17, 2019, 04:27:22 PM »

Yeah, please don't post tangential stuff in this subforum. I'd even prefer a PM over that.

To answer your question, it's both, though IIRC VBO is only used for ship damage decals.
Logged

Thermi

  • Ensign
  • *
  • Posts: 19
    • View Profile
Re: Terrible performance on multiple OS, AMD GPU issues?
« Reply #21 on: September 20, 2019, 11:16:51 AM »

The problem is of a general nature with AMD and OpenGL. I read that the AMD drivers simply aren't optimized in any way for multithreaded usage of the OpenGL API. I suspect the problem can be solved in three ways:
1) Rewriting Starsector to use Vulkan (out of the question)
2) Making AMD fix their driver
3) Using an OpenGL to Vulkan translation layer (there are two projects in the works that do that:
     1) Zink (https://www.collabora.com/news-and-blog/blog/2018/10/31/introducing-zink-opengl-implementation-vulkan/ and https://gitlab.freedesktop.org/kusma/mesa/tree/zink)
      2) GLOVE (https://github.com/Think-Silicon/GLOVE)
      The two are not usable yet.

EDIT: Why is Vulkan a solution? AMD actually bothered to make that perform well in a multithreaded environment.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 25044
    • View Profile
Re: Terrible performance on multiple OS, AMD GPU issues?
« Reply #22 on: September 20, 2019, 11:35:35 AM »

Hmm, interesting! The game mostly (except for save/loading) uses OpenGL from a single thread, though.
Logged

Innominandum

  • Commander
  • ***
  • Posts: 167
    • View Profile
Re: Terrible performance on multiple OS, AMD GPU issues?
« Reply #23 on: September 20, 2019, 12:16:21 PM »

3) Using an OpenGL to Vulkan translation layer (there are two projects in the works that do that:
     1) Zink (https://www.collabora.com/news-and-blog/blog/2018/10/31/introducing-zink-opengl-implementation-vulkan/ and https://gitlab.freedesktop.org/kusma/mesa/tree/zink)
      2) GLOVE (https://github.com/Think-Silicon/GLOVE)
      The two are not usable yet.
1) While this is a cool project, it doesn't supp OpenGL 1.X and probably won't supp it for the foreseeable future, if ever. Even if it did it wouldn't mean that it would give you any performance advantages.
2) Pretty much the same as above, just that the Glove DEV team never aimed at supporting OpenGL Version 1.X.
2) Making AMD fix their driver
AMD fixing their drivers ... m8 no way in hell ... The best course of action to take on AMD GPU's running Opengl 1.x Apps is to go driver version 16.1 for non legacy and anything below 15.16 for legacy (AMD Forums advice).

If your struggling with an (legacy) AMD Gpu then you could go through a starsector performance benchmark for catalyst driver versions from 15.12 to 12.1 for windows 10 and to 10.x for win 7. I would do it myself, but I'm running leshcat's modded drivers and nothing else will run for me.   
« Last Edit: September 20, 2019, 12:37:19 PM by Hastur »
Logged
"The early worm catcheth the bird."

Thermi

  • Ensign
  • *
  • Posts: 19
    • View Profile
Re: Terrible performance on multiple OS, AMD GPU issues?
« Reply #24 on: September 29, 2019, 05:23:02 AM »

I'm on Linux and I'm already trying an asortment of tricks to get it all working well to no avail up to now.
How much of  a PITA would it be to rewrite the engine to use vulkan and is this something one could do without the game's source code (i.e. decompiling it would work to have something to work on. Explicitely not via the mod API)?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 25044
    • View Profile
Re: Terrible performance on multiple OS, AMD GPU issues?
« Reply #25 on: September 29, 2019, 07:37:17 AM »

Well, let's just say I wouldn't want to attempt it with the source code. The translation-layer projects you've linked earlier seem to be the only practical way of doing this.
Logged

eamax

  • Ensign
  • *
  • Posts: 28
    • View Profile
Re: Terrible performance on multiple OS, AMD GPU issues?
« Reply #26 on: December 30, 2019, 07:05:28 PM »

I'm having the same problem, before I had a GTX 750 and runs the game at 60FPS, I switched to an RX 580 OC and now every battle gets under 20fps
It makes no sense even for the RX 580 with bad OpenGL drivers to lose that much performance. My old card was running smoothly .... I've been suspecting it is because of my "FX 8300" processor, somehow the game is very CPU dependent, I had problems when using "graphicLibs" enabled on my gtx 750, should work without problems.

sometimes i think windows is not forcing running using the video card

FX 8300 - RX 580 - 6GB RAM

« Last Edit: December 30, 2019, 07:40:49 PM by eamax »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 25044
    • View Profile
Re: Terrible performance on multiple OS, AMD GPU issues?
« Reply #27 on: December 30, 2019, 07:19:44 PM »

I suspect on some AMD gpus the driver ends up running in software rather than hardware, which would explain the drop in performance. If that were the case, you'd probably not see any load on your gpu and would see the game - or just your system, not sure how it'd be reported - using more cpu than you'd expect.
Logged

eamax

  • Ensign
  • *
  • Posts: 28
    • View Profile
Re: Terrible performance on multiple OS, AMD GPU issues?
« Reply #28 on: December 30, 2019, 07:42:47 PM »

I suspect on some AMD gpus the driver ends up running in software rather than hardware, which would explain the drop in performance. If that were the case, you'd probably not see any load on your gpu and would see the game - or just your system, not sure how it'd be reported - using more cpu than you'd expect.

By the tests I did my GPU gets around 10% usage (20fps~)

Edit: Can virtualization help anything in this case? (bios option)
« Last Edit: December 30, 2019, 07:46:48 PM by eamax »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 25044
    • View Profile
Re: Terrible performance on multiple OS, AMD GPU issues?
« Reply #29 on: December 30, 2019, 08:35:30 PM »

Edit: Can virtualization help anything in this case? (bios option)

I don't know for sure; apologies. I kind of doubt it - if the drivers can't support it at good performance, I'm not sure how that'd change it.
Logged
Pages: 1 [2] 3