SRCDS Steam group


test server not staple fps and lag.
#1
Hi there!

im currently testing a server from home.
I installed centos 5.2 and no further configuration there.

my specs are:
3. 0 xeon ghz x 2
4 Gig RAM
15 000 rpm disk
50 mbit upload

My question is why my server doesn't have a staple fps when no one is playing on it. The fps jumps between 160-240 and the fps is set to 300
no other servers is currently running, and my cpu usage is 0-5 % and I have used the affinity function here is my cfg.
Code:
hostname "*********************"

    // Rcon - WARNING: Enter a secure Rcon!
    rcon_password "**********"


    // General Settings//
    mp_friendlyfire 0
    mp_falldamage 1
    mp_footsteps 1
    mp_autoteambalance 0
    mp_limitteams 0
    mp_autokick 0
    mp_flashlight 1
    mp_tkpunish 0
    mp_forcecamera 0
    sv_password none
    sv_alltalk 1
    sv_pausable 0
    sv_cheats 0
    sv_allowupload 1
    sv_allowdownload 1
    sv_friction 4.000
    sv_client_interpolate 1
    sv_client_predict 1
    sv_client_min_interp_ratio 1
    sv_client_max_interp_ratio 5
    sv_client_cmdrate_difference 20

    // Cvars for round
    mp_freezetime 3            
    mp_roundtime 5
    mp_startmoney 800
    mp_c4timer 35
    mp_fraglimit 0
    mp_maxrounds 0
    mp_winlimit 0
    mp_playerid 0
    mp_spawnprotectiontime 5

    // Rates for server
    sv_mincmdrate 66
    sv_maxcmdrate 66
    sv_minupdaterate 66
    sv_maxupdaterate 66
    sv_minrate 2000
    sv_maxrate 25000
    decalfrequency 10
    fps_max 300

    // Server Log
    log off
    sv_logbans 0
    sv_logecho 1
    sv_logfile 1
    sv_log_onefile 0

    // Region and Lan
    sv_lan 0
    sv_region 3

    // execute ban files
    exec banned_user.cfg
    exec banned_ip.cfg
Reply
#2
fps_max wont get you 300 it will get you about 250 try increasing it see if it becomes more stable the higher it goes
~ trewq
Reply
#3
Hi!

I just did that, here is the result, when the enourmes drop is because I tried to lower the fps, at fps max 50 it jumped between 45-50 at 100 80-100 at 150 110-140
when players joined was 3 bots and me.


.jpg   fps.jpg (Size: 42.77 KB / Downloads: 25)
Reply
#4
albert Wrote:Hi!

I just did that, here is the result, when the enourmes drop is because I tried to lower the fps, at fps max 50 it jumped between 45-50 at 100 80-100 at 150 110-140
when players joined was 3 bots and me.

Do you have a multi-core box? If so, it might help setting cpu affinity.

For example, if the process id of the srcds instance is 6789, you could assign the server to core 0 by typing the following command.
Code:
taskset -pc 0 6789
If you wanted to assign it when you run the process, you could add the following to your startup script.
Code:
taskset -c 0 ./srcds....

The next thing you will want to do is chrt on the process (thanks to hrg).
Code:
chrt -f -p 98 6789

By doing this, you should see a huge decrease in fps drops.
Good luck.
[Image: banner.php?t=2&bg=002244&amp...p;id=82023]

[Image: banner.php?t=2&bg=002244&amp...p;id=82024]
Reply
#5
http://wiki.fragaholics.de/index.php/EN:Linux_Kernel_Optimization#Trouble_Shooting_.2F_FAQ
(last section Trouble Shooting / FAQ)
http://www.fpsmeter.org
http://wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
Reply
#6
Code:
chrt -f -p 98 6789

Did the trick for me but i cant get it to work automagicly. Needs to do that manually.

Have tried:
Code:
#!/bin/sh

PIDS=`ps ax | grep sirq-hrtimer | grep -v grep | sed -e "s/^ *//" -e "s/ .*$//"`
for p in $PIDS; do
  sudo chrt -f -p 99 $p
done

PIDS=`pidof srcds_i686`
for p in $PIDS; do
  sudo chrt -f -p 98 $p
done

PIDS=`pidof srcds_i486`
for p in $PIDS; do
  sudo chrt -f -p 98 $p
done

PIDS=`pidof hlds_i686`
for p in $PIDS; do
  sudo chrt -f -p 98 $p
done

but in debian it cant find sudo... and if i removes it wont work either. Note. I have two servers on the box. Both for day of defeat source
Reply
#7
lhffan Wrote:
Code:
chrt -f -p 98 6789

Did the trick for me but i cant get it to work automagicly. Needs to do that manually.

Have tried:
Code:
#!/bin/sh

PIDS=`ps ax | grep sirq-hrtimer | grep -v grep | sed -e "s/^ *//" -e "s/ .*$//"`
for p in $PIDS; do
  sudo chrt -f -p 99 $p
done

PIDS=`pidof srcds_i686`
for p in $PIDS; do
  sudo chrt -f -p 98 $p
done

PIDS=`pidof srcds_i486`
for p in $PIDS; do
  sudo chrt -f -p 98 $p
done

PIDS=`pidof hlds_i686`
for p in $PIDS; do
  sudo chrt -f -p 98 $p
done

but in debian it cant find sudo... and if i removes it wont work either. Note. I have two servers on the box. Both for day of defeat source

In debian you can only chrt your own users pid's. Make sure you are executing chrt as the same user that ran the server. Of course, you could always apt-get install sudo and then vi /etc/sudoers to make sudo work.
[Image: banner.php?t=2&bg=002244&amp...p;id=82023]

[Image: banner.php?t=2&bg=002244&amp...p;id=82024]
Reply
#8
just install sudo using your favorite package manager... ;-)
or omit the sudos (write "chrt ..." instead of "sudo chrt ...") and run the script as root.
http://www.fpsmeter.org
http://wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
Reply
#9
I have done the folowing:

Code:
apt-get install sudo

^ non config to sudo done

created a file called resched.sh and i have putted it into /usr/local/sbin/

That file contains

Code:
#!/bin/sh

PIDS=`ps ax | grep sirq-hrtimer | grep -v grep | sed -e "s/^ *//" -e "s/ .*$//"`
for p in $PIDS; do
  sudo chrt -f -p 99 $p
done

PIDS=`pidof srcds_i686`
for p in $PIDS; do
  sudo chrt -f -p 98 $p
done

PIDS=`pidof srcds_i486`
for p in $PIDS; do
  sudo chrt -f -p 98 $p
done

PIDS=`pidof hlds_i686`
for p in $PIDS; do
  sudo chrt -f -p 98 $p
done

after that i chmodded the same file:

Code:
chmod 755 /usr/local/sbin/resched.sh

crontab -e

Code:
5 * * * *  root  /usr/local/sbin/resched.sh > /dev/null 2>&1

and also:

Code:
/etc/init.d/cron restart

IT wont work: Note

This part below did i not understand, so i have probably missed some editing in the resched.sh file

Code:
ps ax | grep hrtimer

result
Code:
12 ?        S<     0:00 [sirq-hrtimer/0]
   24 ?        S<     0:00 [sirq-hrtimer/1]
   36 ?        S<     0:00 [sirq-hrtimer/2]
   48 ?        S<     0:00 [sirq-hrtimer/3]
3545 pts/2    S<+    0:00 grep hrtimer

Also note that i checked it like this:

Code:
chrt -p 2537      <--- my screen session

result
Code:
pid 2537's current scheduling policy: SCHED_OTHER
pid 2537's current scheduling priority: 0
Reply
#10
don't check your screen session but your game server! i.e. srcds_i686 or what ever binary you use (*not* srcds_run, that's only a starter script!).
http://www.fpsmeter.org
http://wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
Reply
#11
How i start the server does it matter?

server 1
Code:
screen -S match ./srcds_run -autoupdate -game dod +IP 90.255.223.255 +hostport 27035 +map dod_donner +maxplayers 12 -tickrate 100 +exec match.cfg +fps_max 0

server 2

Code:
screen -S public ./srcds_run -autoupdate -game dod +IP 90.255.223.255 +hostport 27015 +map dod_donner +maxplayers 32 -tickrate 100 +exec public.cfg +fps_max 0

did the chrt -p <pid>

priority 2
Reply
#12
it worked well. Exept for the idler that not works so far. I had make a typo in crontab -e so the justched.sh was not exec. But that is fixed now.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)