higuita7

Mesa: Increase performance howto

Hi

 

I just found that war thunder likes the "OpenGL Threaded Dispatch", i get a increase performance , small on the max fps, but about 30% on the min fps ... and that is were it matters more!

This option is similar to the nvidia "__GL_THREADED_OPTIMIZATIONS" setting, but for MESA... this also say that on nvidia driver, the "__GL_THREADED_OPTIMIZATIONS" may also help.

 

Just set the environment

export mesa_glthread=true

And run the game from the same terminal.

 

Or run driconf, add a new application, name it War Thunder, executable is aces, add a setting "Performance->Enable Offloading GL driver work to a separate thread" and enable it.

After this just start the game as usual (steam, menu, etc)

 

Remember that this option is new and nom-standard and may cause bugs, so if you have problems or rendering problems, try with this option disable.

 

good luck

higuita

  • Upvote 2
medal medal

Share this post


Link to post
Share on other sites

Big thanks!

 

I've just read on reddit that a new Mesa version was published with this option but I didn't know how to activate it.

I also gonna install Solus instead of Ubuntu, cause it's always up-to-date on the main parts like kernel and mesa but is also stable and gonna.

Also as I heard, the devs are very responsive and quite fast at bug-fixing.

 

Gonna test War Thunder on that.

medal medal medal

Share this post


Link to post
Share on other sites

@higuita7, thanks for remembering me to activate this finally :)

 

BTW, i am very happy meanwhile with what radeonsi/amdgpu is offering in respect to performance.

WarThunder's native 64bit client is running absolute smooth with 60FPS (vsync on).

 

Quote

OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD TONGA (DRM 3.15.0 / 4.12.0-rc1, LLVM 5.0.0)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 17.2.0-devel (git-2322ddf548)
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 17.2.0-devel (git-2322ddf548)
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 17.2.0-devel (git-2322ddf548)
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

 

 

 

Edited by amsel41

Share this post


Link to post
Share on other sites

Actually i'm not that sure that this have any effect!

 

I found that loading the game, going to the benchmark -> tank battle (CPU) , after finish, we get a performance increase (mine, the GPU jumps from ~50% used to ~70% used)

 

So looks like the mesa_glthread is not the one increasing the performance, it was the benchmark test that  i have run that done that

 

Can anyone test this

medal medal

Share this post


Link to post
Share on other sites

I just now did four benchmark runs, two with glthread=true and two with glthread=false (battle of berlin):

 

mesa_glthread=true      112.2 avg FPS

mesa_glthread=false     105.1 avg FPS

 

I would say there is a good reason to enable glthread :)

Share this post


Link to post
Share on other sites

@PabloRamon It won't make a difference in Intel GPUs because they're a part of the CPU(aka. integrated GPUs(Intel), or APUs(AMD)).

If you look at your CPU graph split by cores(check your distros' system monitor for that), it is already splitting the workload between cores quite well.

 

This environmental variable only brings benefits on a dedicated graphics card with cooling that can keep up, because it splits off a core to exclusively delegate work to the GPU, which reduces GPU wait times. I mentioned cooling, because your GPU will throttle for safety reasons if it overheats, something it could do during the waiting time and won't be able to under full load. The same thing happens when people play on integrated GPUs in non-gaming laptops, they get decent performance for the first few minutes and then the laptops start thermal throttling, or the fans go crazy

medal medal

Share this post


Link to post
Share on other sites

... hmmm, looks like it is fixed now, no crashes anymore.

 

I am running latest kernel, libdrm, llvm and mesa git (see below):

 

OpenGL vendor string: X.Org
OpenGL renderer string: AMD Radeon R9 380 Series (AMD TONGA / DRM 3.18.0 / 4.13.0-rc1, LLVM 5.0.0)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 17.2.0-devel (git-373f707fbb)
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 17.2.0-devel (git-373f707fbb)
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 17.2.0-devel (git-373f707fbb)
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:

Not sure, which of my updates actually fixed this issue.

Edited by amsel41

Share this post


Link to post
Share on other sites

you are right

 

Something between 6b05c080f202c25531f59b547d5e6ba339cedd09 and 9ee67467c9ea592340aee10a55ba54d7266ff0a9 fixed this problem ... most changes where vulkan related, so i guess acf1e132afd1578eb7346635e1ca60f5ac6d05b1 was the one that was causing the problem.

 

Can some people do some benchmarks with this enable and give the fps differences? for me it gives 6% increase, but i have some problem with my system, as using steamOS on the same machine i get 90% better performance (i suspect something related to Xorg)

medal medal

Share this post


Link to post
Share on other sites

... i see ~9% (110.0/100.5) in benchmark (berlin).

 

Considering the "pure graphics" nature of this benchmark, i think the difference in real game could be a bit smaller.

 

 

Share this post


Link to post
Share on other sites

Hi since i was a newbier in this stuff before, i used the wrong command to test the game before.

 

Using mesa 17.2 (still not using automatic mesa gl trhead for war thunder)

 

i used the following command before, in steam launch options: 

mesa_glthread=true %command%

But this will make only the Launcher use the gl thread xD

 

to use the right command (this will only be usefull until mesa 17.3, but maybe for intel you will aways have to use it, who knows).

 

mesa_glthread=true $HOME/.local/share/Steam/steamapps/common/War Thunder/aces

aces is the actual game.

 

About the fps i can now play almost in medium setting and the game almost never gets bellow 30fps. as before it would margin around 23-28, i would say its at least a solid 5 fps gain for me all the time, but possible more (+15 fps is some use cases), also the game stalls a lot less, and fells much smooter experience overall.

 

Long story short... intel apus benefit a lot from this, contrary to popular believe, i hope when they whitelist war thunder for stable amd-mesa it does get whitelisted for intel-mesa too.

 

 

 

Edited by PabloRamon

Share this post


Link to post
Share on other sites

@Pigfoot, if you are already using mesa 17.3 or higher, you should not need to enable it anymore as mesa enable this by default for war thunder...

 

mesa 17.2 may need this option, but you can use driconf to change the default, create a new game, with the "aces" as process and set the glthread on. this way you can avoid the environment setting (that still have priority)

for lower mesa versions, you should not enable it because it still had several bugs

medal medal

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.