View Full Version : How to improve your client performance on Linux (with some hints useful also on Win)
platyna
07-18-2009, 11:57 AM
Well lag is obvious design flaw of the game, however it can be relieved by the following steps, that allows up to 2x performance gain comparing to default setup.
1. Captain Obvious: newest drivers from producent's site (Nvidia), in case of Intel cards - newest Mesa3d, newest Xorg drivers, newest libdrm - those that comes with your distribution are usualy old.
For Nvidia (especialy Ubuntu users, since their packaged nvidia driver sucks badly):
http://www.nvidia.com/object/unix.html
Intel users:
ftp://ftp.freedesktop.org/pub/individual/driver/
http://dri.freedesktop.org/libdrm/
http://www.mesa3d.org/
WARNING for Intel users - recompilling those to not screw up your OS is easy, but requires some knowledge how are original distro packages built (configure options), when I will sexy enough, I will write some howto.
ATI: Sorry guys, never touched this sh!t.
2. Get rid of eye candies in your setup - compiz etc. has to go - refer to your distribution documentation.
3. Renice 19 game client, so it doesn't fight for resources with other things, after getting char screen open a console and paste in it the following command:
renice 19 `ps axu | grep game | head -n 1 | awk '{print $2}'`
4. Use your native resolution.
5. Close all currently not needed resource hogging programs - use htop to see what is going on your system ("yum install htop" or "apt-get install htop")
6. Use safe mode, however turning it on has some bugs (eg likes to wear off between logins), plus turn off unnecessary eye candies (set your options exactly like on pictures below)
First set your options like that:
http://platyna.platinum.linux.pl/misc/ro/perf/1.png
Then set advanced options like that:
http://platyna.platinum.linux.pl/misc/ro/perf/2.png
Now set safe mode:
http://platyna.platinum.linux.pl/misc/ro/perf/3.png
Mind that "advanced options" button is inactive now. And this is how it should be when safe mode is realy set.
But sometimes it looks like that:
http://platyna.platinum.linux.pl/misc/ro/perf/4.png
You need to check it every login, then unset and set safe mode again. When safe mode is correctly set then eg. you can't see paint on armours.
Also make sure your in game options looks like that:
http://platyna.platinum.linux.pl/misc/ro/perf/5.png
Ok, now some nvidia stuff:
http://platyna.platinum.linux.pl/misc/ro/perf/6.png
http://platyna.platinum.linux.pl/misc/ro/perf/7.png
7. Few notes about sound: as several people pointed out - turning off the sound is also performance gain, however keeping the sound on (at least for me) improves game play, so I am leaving it up to your consideration.
Let me know if it helped you. ;-)
Regards.
Pornstar
07-18-2009, 12:17 PM
Turning off the sound increase performance a lot. Also turn off the fog options in game.cfg.
platyna
07-18-2009, 12:25 PM
I know that turning off the sound increases performance, but it also makes game play more difficult (you can eg. hear aca comming). ;-) Well it is up for individual consideration.
Regards.
Arafails
07-20-2009, 03:51 AM
Really renice 19? You want to incurr a massive performance penalty on the client? You didn't mean renice to -19? Better yet, set it to rt priority (but only if using fullscreen and no VoiP applications).
Anyway, guide for ATi users:
(a) Make sure you have something with dedicated VRAM (preferably over 32Mb). An integrated X200M for example will not cut the mustard. Sorry, it's just facts. I expect this applies to nVidia, Intel, VIA, etc...
(b) Use the latest fglrx drivers if you have an r600 or newer chipset (So Radeon HD2000 +). Older chipsets may either work fine with Mesa, in which case see above (but I think you have double buffer performance penalties), or use an fglrx release that supports olders cards.
(c) Turn water quality right down, because the shader was written by an nvidia monkey and having it turned on will just use linking cycles for no reason.
(d) Turn off Anti-Aliasing
(e) Having Anisotropic Filtering anything 4x or below is unlikely to hurt performance.
(f) Safe mode is craptastic. Leave it off unless you're having huge performance problems.
(g) Compositing (Compiz, etc) really is not an option until they sort out the performance bottlenecks. You can unredirect fullscreen windows but your manager will probably draw things you don't want to see over the top of the game.
(h) Enjoy, just don't expect a mumble overlay.
Znurre
07-20-2009, 08:18 AM
Just a tip.
Use the NVidia 177* drivers if you have a GeForce 7000 series card, I found that it gives me around 20 more fps than the 180*drivers. Not tested on other GPU series, feel free to report how it worked out for you if you decide to try it.
Oh, and platyna - about the sound...
You recommend turning on Safe Mode, but keeping sound? oO
To me, it's way more important to see who is knocked, stunned, etc than hearing footsteps.
Good camera usage ftw.
platyna
07-20-2009, 08:20 AM
Arafails, I meant renice to 19 - RO client doesn't need high priority, it is better for it to run with lowest possible priority, I have explained above why, RO hogging resources interferes with other system components eg. xserver that may cause it to crash as described in several threads here. Hints included above were actualy tested, since I am very concerned about my system's stability and performance. ;-)
Znurre, as I said abose, I use the sound, despite the fact that turning it off is performance gain, because without sound it seems less playable (eg I can hear who casts what spells without seeing them etc.). I think I will add the comment to my howto about it then.
About turning off the fog - I have tested it, indeed gives few fps more, however I noticed weird hang ups when turning around.
Post your other hints guys, and I will edit my posting further more.
Regards.
Nightchill
07-20-2009, 10:43 AM
do not turn on safe mode, rather tweak the game.cfg since safe mode doesn't disable all
-Edge-
07-20-2009, 10:46 AM
The game is playable for me, but I like to have it look, I dunno, like other games? This is what I get when I auto-detect my graphic settings:
http://i379.photobucket.com/albums/oo238/100PercentRatedR/Beztytuu-4.jpg
[Note: Anisotropics and Antialiasing are not affected by Auto-Detect, they are manually selected]
And that's reasonable, I run on a pretty nice computer where I can get like ~70 FPS in heavy graphical games like Guild Wars.
OS: Windows Vista
Graphics: nVidia 9200M GS (256MB)
Processor: Intel Pentium Dual CPU T3200 @ 2.00GHz (2 CPU's) 2.00GHz
Memory: 2GB RAM
DxVersion: Direct X10
But when I log on those graphics lag my computer to no end. And if I want to play I have to tune everything down on the lowest possible point, looking back at recordings I did months ago (before 1.0.6) the record rate and FPS were amazing, I just can't believe things are this way now. I actually thought that my graphics card was corrupted too, and the reason Regnum was lagging so badly was due to overheating and graphic corruption, but I went to the store all ready to return my new computer, and the support there tested quite a few games on my computer, and it turns out that everything is fine, its just Regnum.
Fuck Safe Mode, I should be able to play and record videos in Regnum on maxed details just like any other game, the problem lies in the game itself. You run on a notebook too don't you? You should know its obvious you get different results depending on battery and power management.
platyna
07-20-2009, 12:44 PM
Autodetect is bullshit. ;-)
Regards.
onemyndseye
07-20-2009, 08:34 PM
Good HOWTO...
2 notes from my end concerning renice:
1. Renice to +19 causes VERY poor performance on all 3 of my PC's
2. Renice to -X helps but note that this is known to cause sound lags if set to high. -15 works well (about +15fps over the default) on my laptop but -10 causes sound lag on another.
Also you may add that on any Linux PC I have ever run this game on (20+ including testing for the Debian Package)... setting MALLOC_CHECK_=1 helps GREATLY with overall stability.. as well as taking care that RO is launched from its own directory..
I use a small script to launch. (All of these "tweaks" are included in the Debian/Ubuntu package except for resetting the video mode)
rolauncher.sh
#!/bin/bash
## Set variables
## Set this to the full path of your regnum install
GAME_DIR=~/regnum
RO_PRIO="-15"
# Store Current video mode so it may be recalled later. This is because RO does not
# always return my display to the correct mode. This part is optional
OLD_VIDMODE="$(xrandr |grep "Screen 0" | awk '{print $8 $9 $10}' |sed '{s|,||}')"
wait_game() {
## Simple function to sleep until RO exits
##
RO_EXIT="0"
while [ $RO_EXIT = "0" ]
do
TMP1=$(ps -U $USER |grep game |grep -v grep |awk '{print $1}')
if [ -z "$TMP1" ]; then
RO_EXIT=1
fi
# This is a very short sleep that probably should be increased to reduce CPU cycles
sleep 0.5
done
}
## Attempt to make sure no other regnum process is running
#
killall -9 game
killall -9 rolauncher
### Setup the env and start laucher
# Change Current working directory to where RO is installed
cd "$GAME_DIR"
# Set MALLOC_CHECK and start RO
export MALLOC_CHECK_=1
./rolauncher
## Adjust Priority Level (Optional)
##
## Uncomment this section and give yourself NOPASSWD access to renice in /etc/sudoers
## if this feature is needed/wanted
#
# example: myuser ALL = NOPASSWD: /usr/bin/renice, /usr/sbin/rovclock
#
#PID="$(pidof game)"
#sudo renice "$RO_PRIO" $(pidof game)
## Wait for main process to exit. Use a loop to get this done
#
sleep 2
wait_game
## Clean up and reset video mode
xrandr -s "$OLD_VIDMOD"
export MALLOC_CHECK_=0
Thanks again!
-onemyndseye
Zodar
07-20-2009, 09:00 PM
I've spent a lot of time playing with nice levels too and your settings are completely the opposite to mine Platyna:
The best frame rate I get is reniceing game with a negative value, or leaving it at normal priority. I've tried variations of giving game more favourable scheduling than X, X more than game, but If I nice + the game, its unplayable - I'm talking about 1 fps if I'm lucky. I'm running a fairly light config ( fvwm2 with all the shit turned off) and everything else killed, or running at around nice +10 (such as named, etc).
My resolution needs to be 800x600x16, not native (which would be 1280x1024).
Editing game.cfg and reducing vg_camera_far_plane helps a little, if you don't care about scenery in the distance. I've also started playing with the sound off, because if you renice the game, the sound can be a good few seconds behind, which is so confusing that there's no point having it on at all.
The problem I have is not with the overall frame rate, which I can more-or-less adjust to after a while, but for me its the constant lock ups. The whole game freezes for anything between 10 and 60 seconds. As of the new update, I froze for almost 2 minutes just before, with the occasional one or two frame jump in between.
My PC is shit (AMD Sempron(TM) 2800+, GeForce FX 5200, 4 gig RAM), but it used to be fine 2 updates ago.
-Edge-
07-20-2009, 09:04 PM
Autodetect is bullshit. ;-)
Regards.
Your posts are bullshit :)
Regards.
This is supposed to be a game, if I showed you video's I recorded from before 1.0.6 and now on the same ratio the results would be drastic. Why do you think NGD has started work on a new engine? Something is wrong, if I go to stores and professional personnel tell me the problem is with the game itself, surely it means something is wrong.
But nah, perhaps you are smarter.
platyna
07-20-2009, 10:59 PM
You are pathetic. I tested those changes and they were good for me. I even stated my rationale behind those hints, however there are many systems and many configurtions. You don't like my hints - don't use them, instead of posting insults. Grow up.
Regards.
KnuckOne
07-21-2009, 07:41 AM
Load Regnum into RAM :)
Or cache resources :
[resources]
res_cache_compressed = 0
res_cache_enabled = 1
res_cache_size = 768
res_database = live_rgn
Would be nice if NGD documented those options :p
platyna
07-21-2009, 09:44 AM
Last time I experimented with them I experienced weird behaviour - eg game handing on loading. It seems I need to experiment with it again. :)
Regards.
Myxir
07-21-2009, 08:56 PM
Two lines that might improve performance in game.cfg
dbg_disable_shaders [or shader, don't remember]
dbg_disable_fog
But I cannot remember if the value must be 0/1 or true/false. I used that back when I had a weak ATI card and it gave a little boost.
Nikor
07-24-2009, 03:22 PM
renice 19 `ps axu | grep game | head -n 1 | awk '{print $2}'`
What's wrong with
renice 19 `pidof game`?
_dracus_
07-24-2009, 04:46 PM
What's wrong with
renice 19 `pidof game`?
It's not leet enought if you don't use awk!
Ok I was kidding. It's really common to write thoses kind of code for script since you don't really care if it's efficient or not, what matters is that it works (in a short time).
-Drv-
07-24-2009, 05:23 PM
6. Use safe mode, however turning it on has some bugs (eg likes to wear off between logins), plus turn off unnecessary eye candies (set your options exactly like on pictures below)
unfortunately if you play without particle effects some spell animation aren't shown (mobility, strategic position, stun effects, etc...)* this could be a problem.
7. Few notes about sound: as several people pointed out - turning off the sound is also performance gain, however keeping the sound on (at least for me) improves game play, so I am leaving it up to your consideration.
if you play not only at forts sound is really useful to detect enemies buffing or levelling, without sound you'll be taken by surprise really a lot more.
*at least on my pc
vBulletin® v3.8.7, Copyright ©2000-2025, vBulletin Solutions, Inc.