Urban Terror Forums: FPS drops could be attenuated by Threaded Optimization for Nvidia - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

FPS drops could be attenuated by Threaded Optimization for Nvidia Rate Topic: -----

#1 User is offline   karnute Icon

  •   community dev   
  • Account: karnute
  • Joined: 09-August 11
  • Posts: 157

Posted 09 May 2018 - 08:43 PM

After reading a post in Windows support forum about fps drops and that disabling Threaded Optimization in Nvidia could attenuate the problem, I have read more about it for Linux (see at end of the page).
It is the case that, in Linux with the Nvidia proprietary driver (since version 319) and more than 1 CPU, enabling Threaded Optimization can improve performance and reduce fps drops.

To do this, you can try to execute (in a console or inside your launching script) before the UrT executable the following commands:
export LD_PRELOAD="libpthread.so.0  libGL.so.1"
export __GL_THREADED_OPTIMIZATIONS=1


Edit: libpthread must be loaded before libGL. In case of some other program was using libGL previously to run urbanterror, the optimization could fail.

Note that in Linux Threaded Optimizations are disabled by default, so the potential improvement could only be done by enabling it (contrary to the Windows case) and that this only applies with multi-core/cpu.
A short explanation: Threaded Optimizations enabled allows the Nvidia driver to split between more CPUs the load of some parts of OpenGL operations carried by the CPU, instead of doing it only with the same CPU running the engine. This can improve the case with many players, because the rendering of more detailed models (players or guns) in recent releases of UrT require a lot of extra OpenGL operations.

This post has been edited by karnute: 28 June 2018 - 08:57 PM


#2 User is offline   zyzz Icon

  • Account: zyzz
  • Country:
  • Joined: 08-August 12
  • Posts: 63

Posted 26 June 2018 - 08:20 PM

I just tried it. SAdly it doesn't work for me. It even makes it war worse. Instead of 125fps I get 25.

Linuxmint LMDE, AMD FX-6100 (6-core), Nvidia GTX660, Nvidia proprietary driver: 340.16

I just added the two lines to my start script. Any idea why it makes it so much worse?

#3 User is offline   karnute Icon

  •   community dev   
  • Account: karnute
  • Joined: 09-August 11
  • Posts: 157

Posted 27 June 2018 - 08:47 PM

View Postzyzz, on 26 June 2018 - 08:20 PM, said:

I just tried it. SAdly it doesn't work for me. It even makes it war worse. Instead of 125fps I get 25.
Linuxmint LMDE, AMD FX-6100 (6-core), Nvidia GTX660, Nvidia proprietary driver: 340.16

In my case it is Debian testing (~10), CPU Intel Core 2 Duo (2 core), Nvidia GTX650 propr. driver 390.48.
In theory it was implemented since driver 319. So, it should work, but maybe it could be the AMD CPU cores work in other way.

Quote

I just added the two lines to my start script. Any idea why it makes it so much worse?

I suppose you just copy/pasted exactly those lines (no spaces around "=" and 2 low dash "_" before GL...).
Be sure you have updated to latest versions of LinuxMint and its nvidia packages, also that you are running the x86_64 binary (not the i386).

Is there any error/warning message in the console different with those lines?

I have no other clues about why it doesn't work for you, but in the documents explaining it there are some comments about it could be worse in some cases or some games...

#4 User is offline   zyzz Icon

  • Account: zyzz
  • Country:
  • Joined: 08-August 12
  • Posts: 63

Posted 28 June 2018 - 08:18 AM

Yes I copy pasted the two lines.
System is up to date (drivers are from standard repository that's why I'm still on 340.16)

I started a demo with both settings, saved the log from the console and looked at it with diff.
There's no different at all (except some different loading times for "VM file cgame compiled" and "VM file ui compiled" but that will vary for each time I load it even with the same settings).

Have you benched your improvements with this setting?

I found this:
https://www.phoronix...aded_opts&num=4
He also tested UrT and had the same drops as I experienced. (He tested it with 310.xx driver version though.)

#5 User is offline   zyzz Icon

  • Account: zyzz
  • Country:
  • Joined: 08-August 12
  • Posts: 63

Posted 28 June 2018 - 07:16 PM

Alright I also tested the new engine from 4.3.4:

Random Timedemo,

- no extra settings, m9 engine: 272fps
- the settings from 1st post, m9 engine: 301fps
- no extra settings, original engine: 266fps
- the settings from 1st post, original engine: unbearable, aborted

Improvement by 29fps (only one try though) so I quite like it. :D

bullet_loaderAdvertisement

#6 User is offline   karnute Icon

  •   community dev   
  • Account: karnute
  • Joined: 09-August 11
  • Posts: 157

Posted 28 June 2018 - 09:06 PM

View Postzyzz, on 28 June 2018 - 08:18 AM, said:

Have you benched your improvements with this setting?

I have improvement only with less fps-drops in crowded servers. With threaded optimization enabled I can have almost always 125fps with lots of players and no fps-drops (with both engines: m9 and original).

Quote

I found this: https://www.phoronix...aded_opts&num=4
He also tested UrT and had the same drops as I experienced. (He tested it with 310.xx driver version though.)

I tried the current "phoronix-test-suite benchmark urbanterror" (it uses UrT 4.3.2), first with threaded optimization: 508fps, and then without optimization: 456fps.

View Postzyzz, on 28 June 2018 - 07:16 PM, said:

Alright I also tested the new engine from 4.3.4:
Random Timedemo,
- no extra settings, m9 engine: 272fps
- the settings from 1st post, m9 engine: 301fps
- no extra settings, original engine: 266fps
- the settings from 1st post, original engine: unbearable, aborted
Improvement by 29fps (only one try though) so I quite like it. :D

There is one more thing (i added it now to 1st post) that could affect, it is the loading order of libpthreads and libGL. If some program used libGL before loading libpthread, the optimization could fail, so it is better to test first threaded optimization.
Maybe the m9 engine uses libSDL2 and it reset libpthread before libGL...

In any case, the important benefit of using thread optimization is with high number of players/bots in server, because models (players/guns) rendering is more cpu consuming for openGL operations that can affect frame time.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Advertisement


Copyright © 1999-2024 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942