SRCDS Steam group


Proper way to measure CPU usage in Linux
#1
Hi.I have 2 CPU's with 4 cores each and Centos x64.When all my servers are full , using command "htop" i get 60-80% CPU usage, but on average it shows ~ 30 %.
How can i verify the real CPU usage on linux and maybie some tool to measure CPU temperature and fan speed ?
PS:It's not a desktop edition of Centos ...
Reply
#2
cpu usage is pretty much buggy.
Mostly I rely on the load: With 4 cores and a load above 4 you probably getting trouble running gameservers
Interactive web based config creator for CS, CSS, TF2 and DODS
Creates server and client configs in an explained dialog.

You`ll also find precompiled debian gameserver kernels for download
Reply
#3
there is no reliable way to measure the cpu load. srcds switches more often (or at least as often) between running and sleeping states as the cpu load is measured. that cannot work (and changing this would lead to a significant overhead). maybe you should look at the situation from the other end. what do you want to achieve? the cpu usage itself is usually nothing that really concerns :-) if you want just some hint you can always look at the load average (uptime command) which is defined as the average number of processes in "runnable" state (meaning either running or waiting until a cpu is free). if that gets larger than your numer of cpu/cores it clearly indicates an overload situation. but it still does not mean everything is fine if you are below it (for short periods of time you can still have an overload situation producing lags for a fraction of a second).

EDIT: @Terror: its not a bug, its a feature :-D no seriously, I cannot think of a reliable way to measure the cpu load in a way that it really helps us.
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
#4
So basicaly when my CPUs catch on fire i will know that i hosted to many gameservers Smile)
Reply
#5
(12-16-2010, 08:35 PM)saintjimmygd Wrote:  So basicaly when my CPUs catch on fire i will know that i hosted to many gameservers Smile)

Basically
~ trewq
Reply
#6
I would say, when you gameservers start lagging, you have too many of them ;-)

ps: measuring cpu temperatures etc. is a totally different thing. it depends on your mainboard of course. one possible way is lm_sensors, which can read out many "environmental" values. I am using munin to collect all the data and display it in nice graphs on a web page. munin can use lm_sensors to also collect cpu temperatures etc.
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)