PDA

View Full Version : Lag and Freezes? This MAY Help


onemyndseye
10-15-2008, 07:38 AM
Over the last few weeks Ive noticed RO's performance on my laptop to be decreasing dramatically. Overall FPS have reduced by 10 or more with periodic drops to 1-2fps in conditions where this really should not be the case...

So I started gathering info and logging performance data about my machine while RO is running and found that RO was consuming ALL of my 1gig of ram at most times and especially noted at times where my FPS dropped and/or the game froze. ... Memory leaks. We all knew they were there... now lets talk about how to fix.... errr HELP the problem with memory management.


A simple virtual memory tweaks may help RO's performance by allowing more data to be swapped and more ram to be made available to a ram hungry program like RO

Before running RO issue this simple command in a terminal window:


sudo sysctl vm.swappiness=100




The default swappiness value may be found in /etc/sysctl.conf (atleast on Debian-like systems) which is usually 30.. and I must admit for day to day desktop use a lower value certainly make for a more responsive system. But for large applications that like their ram... setting a temp value of 100 can be a big help. It should also be noted that in systems with more that 1gig of ram this setting will likely have little effect.

Also.. In my post here (http://regnumonline.com.ar/forum/showthread.php?t=31247) I described how raising the priority of the RO binary increased performance... and it does. However with further testing I think some system's could benefit equally from LOWERING the priority.
It all depends on where your bottleneck is. You see a lower priority means more CPU power can be allocated to processing TCP/IP data for instance...

That being said... one may want to change the value in my script to a positive value... i.e. 15 or 20.. or renice the game binary by hand:



renice -n 20 $(pidof game)





Hope this helps,
-One Mynds Eye
Srytis LVL50 Hunter: Elusis

Znurre
10-23-2008, 07:52 PM
Thank you! :)

Since I applied your fix, my game is running smoother than ever.
I do not experience any freeze lags until a certain point when I have played for several hours when it feels like running into a wall.
Suddenly everything is really laggy and I have to restart the client.

But it is still better than before, so you really earn some karma for this :)

PS. On openSUSE I had to use "su -c" instead of sudo, else I would get "command not found".
PS2. It seems like I already gave you too much karma lately, but just wait, your time will come ;)

Mikan
10-23-2008, 08:41 PM
Even though I have 2GB of RAM, and Regnum (and other programs) doesn't usually use anything beyond 1GB of it unless I've been in some major war for some hours, I will still try this out anyway!

Thanks.

onemyndseye
10-24-2008, 04:11 AM
Znurre,

Glad my ramblings helped ya :)... as to the "command not found" it sounds like you do not have the sudo package installed... trying installing it through Suse's package manager...

su will work just as well..... but sudo keeps you from having to use roots password... instead you use your own. Allows for privileged access to users without compromising root's passwd :)

Karma!! Thanks :) In addition, How about you switch to a rubber hammer next time we fight? :P You are one kickass barb :)


Katiechan - Yes, with 2gigs of RAM it probably will not help much....if at all. However - you may try going to the other extreme and setting swappiness to 0 with ' sudo sysctrl vm.swappiness=0 ' telling the system to not swap unless in extreme cases since writing to and from RAM is MUCH faster.

Take care,
-One Mynds Eye
Srytis LVL50 Hunter: Elusis

Znurre
10-24-2008, 11:47 AM
as to the "command not found" it sounds like you do not have the sudo package installedI do have it installed.
I think it's rather something about the way it is configured as default in openSUSE.

The sysctl binary resides in /sbin in openSUSE, and because of that I cannot run it using sudo, if I don't use "sudo /sbin/sysctl" ofcourse.

arlick
10-24-2008, 11:55 AM
I do have it installed.
I think it's rather something about the way it is configured as default in openSUSE.

The sysctl binary resides in /sbin in openSUSE, and because of that I cannot run it using sudo, if I don't use "sudo /sbin/sysctl" ofcourse.

you can add this to your .bashrc :P

PATH=/sbin/:/usr/sbin/:$PATH

its sometimes really helpfull.

then "sudo sysctl" should work.