SRCDS Steam group


strange walues using
#1
PHP Code:
top 08:52:01 up 19:20,  2 users,  load average0.010.030.00
Tasks
:  86 total,   1 running,  76 sleeping,   9 stopped,   0 zombie
Cpu0  
:  0.3%us,  0.0%sy,  0.0%ni99.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu1  
:  7.0%us,  0.7%sy,  0.0%ni92.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem
:   3501256k total,   546388k used,  2954868k free,    66824k buffers
Swap
:  2650684k total,        0k used,  2650684k free,   313112k cached

  PID USER      PR  NI  VIRT  RES  SHR S 
%CPU %MEM    TIME+  COMMAND
 2884 xxx     
-99   0  227m 121m  20m S   52  3.5 564:33.49 srcds_i486 

I have used taskset -pc 1 2884 to lock my match server to cpu no 2 (physical cpu not core)
If you look you will se two diff walues of cpu usage. I have two physical cpu´s. And if you look there cpu1: 7.0%us... and if you then look at the pid for my srcds server. You will se an cpu usage of 52%
Reply
#2
that's why I always say, don't look at the cpu usage ;-) something close to 100% might indicate a problem, but everything else can be fine. better look at the stability of the fps, that's what matters for the server quality.
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
#3
But still it feels strange is there no accurate tool to measure cpu usage.
Reply
#4
(10-15-2009, 11:08 PM)lhffan Wrote:  But still it feels strange is there no accurate tool to measure cpu usage.

You can use command:

Code:
vmstat 3

After the first line you see statistics of three second intervals. The first line is average statistics since boot.

Here are the column explanations (in the last --- cpu --- part):

Code:
CPU
       These are percentages of total CPU time.
       us: Time spent running non-kernel code. (user time, including nice time)
       sy: Time spent running kernel code. (system time)
       id: Time spent idle. Prior to Linux 2.5.41, this includes IO-wait time.
       wa: Time spent waiting for IO. Prior to Linux 2.5.41, included in idle.
       st: Time stolen from a virtual machine. Prior to Linux 2.6.11, unknown.

For example here's how it looks on my system:

Code:
vmstat 3
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
4  0   9528 215892 207588 2534336    0    0    38   135    0    0 10  1 83  6

1  0   9528 214648 207600 2534472    0    0     0  1121 2043 7994 16  1 83  0
1  1   9528 214040 207636 2534360    0    0     1 23888 2515 3531 12  1 83  4
2  0   9528 213900 207648 2534576    0    0     0   515 2027 4745 16  1 83  0
1  0   9528 201564 207660 2534620    0    0     0   599 2043 3070 14  1 85  0
1  0   9528 201448 207664 2534640    0    0     7   309 1950 3060 15  1 84  0

The important part is the "us" column, which is how much srcds is actually using CPU. System time "sy" column is also important, but it should be very low. Otherwise there is this so called "overhead" running the system. The column "id" means "idle" and should be high, "wa" is "wait" and it should be most of the time 0. If it's not 0, then there is very much disk operations and the system is waiting for the hard disk to spin around.
Reply
#5
Empty server:

Code:
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
0  0      0 2968464  94844 314844    0    0     2     2   21  106  2  0 98  0
0  0      0 2968432  94844 314864    0    0     0     0    2 2578  1  0 99  0
0  0      0 2968432  94860 314864    0    0     0    44   10 2597  1  0 99  0
0  0      0 2968432  94860 314864    0    0     0     0    1 2567  1  0 98  0
0  0      0 2968432  94860 314864    0    0     0     0    3 2580  0  0 99  0
0  0      0 2968432  94860 314864    0    0     0     0    1 2563  1  0 99  0
0  0      0 2968432  94860 314864    0    0     0     0    2 2573  1  0 99  0
0  0      0 2968432  94860 314864    0    0     0     0    2 2579  1  0 99  0
0  0      0 2967804  94860 314864    0    0     0     0    2 2619  1  1 98  0
0  0      0 2967812  94860 314864    0    0     0     9    2 2574  1  0 99  0
0  0      0 2967812  94872 314864    0    0     0    19    4 2579  1  0 99  0
0  0      0 2967812  94872 314864    0    0     0     0    2 2571  0  0 99  0
0  0      0 2967812  94872 314864    0    0     0    20   11 2571  1  0 99  0
0  0      0 2967812  94872 314864    0    0     0     0    1 2566  1  0 99  0
0  0      0 2967812  94872 314864    0    0     0     0    1 2568  1  1 98  0
0  0      0 2967812  94872 314864    0    0     0     0    1 2567  1  0 99  0
0  0      0 2967812  94872 314864    0    0     0     0    2 2575  1  0 99  0
0  0      0 2968068  94880 314864    0    0     0     4    3 2597  1  0 99  0
0  0      0 2968052  94880 314864    0    0     0     0    2 2575  1  0 99  0
0  0      0 2968052  94880 314864    0    0     0     0    2 2577  1  1 99  0
0  0      0 2968060  94880 314864    0    0     0     4    4 2585  1  0 99  0

Will trye to get an on sunday 6 vs 6
Reply
#6
I am also not sure if vmstat always is correct there. I've seen strange things there as well...

what do you want to use the cpu usage for? I mean, ok it's fine if you look at the different values. But with the cpu usage alone you cannot come to any conclusions.

E.g.: you could think, if you have one server running at (little less than) 25% cpu usage while full, you could run 4 of those servers at the same time. Well, that is just not true. The reason is quite simple: The server does not only need a certain portion of the cpu to run smoothly, it also requires to have the cpu resources at the right time. Performance will already be degraded if your server gets the required cpu amount but only too late. That will already be a fps drop.
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


Forum Jump:


Users browsing this thread: 1 Guest(s)