Hi,
I wanted to run some Counterstrike Source Server with a 100 tickrate on my Root server.
The Server is running with CentOS (64Bit), has a AMD X2 5600+ Dualcore CPU and 4GB RAM.
After installing all the stuff and preparing the server.cfg file (adding name, 6 bots, ...), I checked how much of the CPU the process actually uses.
Shock!
It uses about 30%-60% of a X2 5600+!!! Is this normal? I hope not, otherwise I wont be able to host 2 CS:S Servers ...
An strace of the process shows, that it's calling 3 functions like every 10ms. Here is an example:
Question: Is this the normal behavior or did I do something wrong?
I just start a server like this (on a screen called css-server)
Any hints, links, rtfms, ... for "how to reduce the CPU amount of SRCDS" appreciated!
Thanks in advance,
Alex
PS: I heard that I should use custom kernels. Problem is, that I'm quite new to the whole UNIX world.
There is also a MySQL Database, Apache with PHP and Teamspeak running on that machine.
Changing the kernel and stuff would hopefully not affect these services?
I wanted to run some Counterstrike Source Server with a 100 tickrate on my Root server.
The Server is running with CentOS (64Bit), has a AMD X2 5600+ Dualcore CPU and 4GB RAM.
After installing all the stuff and preparing the server.cfg file (adding name, 6 bots, ...), I checked how much of the CPU the process actually uses.
Shock!
It uses about 30%-60% of a X2 5600+!!! Is this normal? I hope not, otherwise I wont be able to host 2 CS:S Servers ...
An strace of the process shows, that it's calling 3 functions like every 10ms. Here is an example:
Code:
time(NULL) = 1229409318
gettimeofday({1229409318, 456573}, NULL) = 0
gettimeofday({1229409318, 456653}, NULL) = 0
nanosleep({0, 1000000}, NULL) = 0
select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
gettimeofday({1229409318, 460042}, NULL) = 0
gettimeofday({1229409318, 460106}, NULL) = 0
gettimeofday({1229409318, 460164}, NULL) = 0
gettimeofday({1229409318, 460221}, NULL) = 0
nanosleep({0, 1000000}, NULL) = 0
select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
gettimeofday({1229409318, 463033}, NULL) = 0
nanosleep({0, 1000000}, NULL) = 0
select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
gettimeofday({1229409318, 466046}, NULL) = 0
gettimeofday({1229409318, 466105}, NULL) = 0
gettimeofday({1229409318, 466161}, NULL) = 0
gettimeofday({1229409318, 466217}, NULL) = 0
nanosleep({0, 1000000}, NULL) = 0
select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
gettimeofday({1229409318, 469060}, NULL) = 0
nanosleep({0, 1000000}, NULL) = 0
select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
gettimeofday({1229409318, 472072}, NULL) = 0
gettimeofday({1229409318, 472131}, NULL) = 0
gettimeofday({1229409318, 472188}, NULL) = 0
gettimeofday({1229409318, 472243}, NULL) = 0
nanosleep({0, 1000000}, NULL) = 0
select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
gettimeofday({1229409318, 475087}, NULL) = 0
nanosleep({0, 1000000}, NULL) = 0
select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
gettimeofday({1229409318, 478101}, NULL) = 0
gettimeofday({1229409318, 478159}, NULL) = 0
gettimeofday({1229409318, 478216}, NULL) = 0
gettimeofday({1229409318, 478271}, NULL) = 0
gettimeofday({1229409318, 478327}, NULL) = 0
accept(7, 0xff92f920, [727806191404580880]) = -1 EAGAIN (Resource temporarily unavailable)
gettimeofday({1229409318, 478516}, NULL) = 0
gettimeofday({1229409318, 478572}, NULL) = 0
recvfrom(4, 0xff919250, 96016, 0, 0xff9191e0, 0xff9191dc) = -1 EAGAIN (Resource temporarily unavailable)
gettimeofday({1229409318, 478726}, NULL) = 0
time(NULL) = 1229409318
gettimeofday({1229409318, 484901}, NULL) = 0
gettimeofday({1229409318, 484981}, NULL) = 0
nanosleep({0, 1000000}, NULL) = 0
select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
gettimeofday({1229409318, 488169}, NULL) = 0
gettimeofday({1229409318, 488232}, NULL) = 0
gettimeofday({1229409318, 488291}, NULL) = 0
gettimeofday({1229409318, 488353}, NULL) = 0
nanosleep({0, 1000000}, NULL) = 0
select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
gettimeofday({1229409318, 492165}, NULL) = 0
gettimeofday({1229409318, 492224}, NULL) = 0
gettimeofday({1229409318, 492281}, NULL) = 0
I just start a server like this (on a screen called css-server)
Code:
./srcds_run -game cstrike -pingboost 0 +map de_dust2 +maxplayers 12 -secure -tickrate 100 -autoupdate +ip 78.XX.88.77 -port 27015 +servercfgfile css-server1.cfg -pidfile css-server1.pid
Any hints, links, rtfms, ... for "how to reduce the CPU amount of SRCDS" appreciated!
Thanks in advance,
Alex
PS: I heard that I should use custom kernels. Problem is, that I'm quite new to the whole UNIX world.
There is also a MySQL Database, Apache with PHP and Teamspeak running on that machine.
Changing the kernel and stuff would hopefully not affect these services?