Raised This Month: $ Target: $400
 0% 

Question about CSGO cpu usage.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fard
AlliedModders Donor
Join Date: Dec 2015
Old 12-06-2015 , 12:13   Question about CSGO cpu usage.
Reply With Quote #1

I'm dealing with some technical optimization problems with my server and i have few questions.
Is this normal that my server's console says it uses 10.0 of CPU? Does it mean 10% or 100%?

Code:
stats
  CPU   NetIn   NetOut    Uptime  Maps   FPS   Players  Svms    +-ms   ~tick
  10.0 215346.6 856953.6    1151    48   78.28      15   12.66    1.80    0.74
stats
  CPU   NetIn   NetOut    Uptime  Maps   FPS   Players  Svms    +-ms   ~tick
  10.0 215611.9 863419.4    1151    48  127.65      15    5.91    1.24    0.25
stats
  CPU   NetIn   NetOut    Uptime  Maps   FPS   Players  Svms    +-ms   ~tick
  10.0 210175.1 789987.9    1151    48  128.06      15    6.76    2.04    1.19
stats
  CPU   NetIn   NetOut    Uptime  Maps   FPS   Players  Svms    +-ms   ~tick
  10.0 221560.5 768633.4    1151    48  126.84      15    7.74    2.02    0.95
stats
  CPU   NetIn   NetOut    Uptime  Maps   FPS   Players  Svms    +-ms   ~tick
  10.0 222678.4 731026.5    1151    48  104.11      15    9.47    4.25    3.52
My linux top:
Code:
top - 17:08:38 up 19:15,  1 user,  load average: 1.01, 0.92, 0.94
Tasks: 132 total,   3 running, 128 sleeping,   1 stopped,   0 zombie
%Cpu(s): 16.8 us,  8.4 sy,  0.0 ni, 72.6 id,  0.0 wa,  2.3 hi,  0.0 si,  0.0 st
KiB Mem:   3100412 total,  1362632 used,  1737780 free,    60456 buffers
KiB Swap:  1048572 total,        0 used,  1048572 free.   845036 cached Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
  864 steam     20   0  457328 353092  15756 R  90.1 11.4 485:01.15 srcds_linux
    3 root      20   0       0      0      0 S   0.7  0.0   1:11.18 ksoftirqd/0
    7 root      20   0       0      0      0 S   0.7  0.0   8:22.74 rcu_sched
   10 root      20   0       0      0      0 S   0.7  0.0   3:14.93 rcuos/2
    9 root      20   0       0      0      0 R   0.3  0.0   4:36.81 rcuos/1
   11 root      20   0       0      0      0 S   0.3  0.0   2:39.33 rcuos/3
 4839 steam     20   0  105628   2024    956 S   0.3  0.1   0:00.87 sshd
 5313 root      20   0  104548   3816   2740 S   0.3  0.1   0:00.11 sshd
 5315 steam     20   0   24820   1584   1128 R   0.3  0.1   0:00.02 top
    1 root      20   0   33380   2640   1400 S   0.0  0.1   0:01.61 init
    2 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kthreadd
    4 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kworker/0:0
    5 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/0:+
    8 root      20   0       0      0      0 S   0.0  0.0   2:51.17 rcuos/0
   12 root      20   0       0      0      0 S   0.0  0.0   0:00.00 rcu_bh
   13 root      20   0       0      0      0 S   0.0  0.0   0:00.00 rcuob/0
   14 root      20   0       0      0      0 S   0.0  0.0   0:00.00 rcuob/1
How can i force server to use second core?

Last edited by fard; 12-06-2015 at 13:12.
fard is offline
Amroth
Senior Member
Join Date: Apr 2013
Location: /root
Old 12-06-2015 , 13:20   Re: Question about CSGO cpu usage.
Reply With Quote #2

status is broken, use top instead.
You cant force to use second core in linux, but in windows srcds can use all cores.
Amroth is offline
NisQ
Member
Join Date: Feb 2012
Old 12-06-2015 , 20:08   Re: Question about CSGO cpu usage.
Reply With Quote #3

Quote:
Originally Posted by Amroth View Post
status is broken, use top instead.
You cant force to use second core in linux, but in windows srcds can use all cores.
How can you actually use all cores in windows srcds?
__________________
FRAGWAY GAMING UK - http://www.fragway.com

NisQ is offline
Send a message via Yahoo to NisQ Send a message via Skype™ to NisQ
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 12-06-2015 , 21:32   Re: Question about CSGO cpu usage.
Reply With Quote #4

Quote:
Originally Posted by Amroth View Post
You cant force to use second core in linux, but in windows srcds can use all cores.
Read the manual for taskset.
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 12-06-2015 , 21:55   Re: Question about CSGO cpu usage.
Reply With Quote #5

Quote:
Originally Posted by Amroth View Post
status is broken, use top instead.
You cant force to use second core in linux, but in windows srcds can use all cores.
Windows user here, I don't think srcds can use ALL the cores. It might be able to use at most one other.
Potato Uno is offline
Amroth
Senior Member
Join Date: Apr 2013
Location: /root
Old 12-06-2015 , 22:00   Re: Question about CSGO cpu usage.
Reply With Quote #6

Quote:
Originally Posted by NisQ View Post
How can you actually use all cores in windows srcds?
Its automatically use all cores, but you can set two or more core to one srcds process tho.. here the good article.


Quote:
Originally Posted by arne1288 View Post
Read the manual for taskset.
Taskset do not help, it stay mostly on only one core.
Amroth is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 12-06-2015 , 22:09   Re: Question about CSGO cpu usage.
Reply With Quote #7

Quote:
Originally Posted by Amroth View Post
Its automatically use all cores, but you can set two or more core to one srcds process tho.. here the good article.


Quote:
Originally Posted by arne1288 View Post
Read the manual for taskset.
Taskset do not help, it stay mostly on only one core.
Taskset does exactly the same on Linux as "the good article" above does on Windows.
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline
Amroth
Senior Member
Join Date: Apr 2013
Location: /root
Old 12-06-2015 , 22:31   Re: Question about CSGO cpu usage.
Reply With Quote #8

Quote:
Originally Posted by arne1288 View Post
Taskset does exactly the same on Linux as "the good article" above does on Windows.
Technically yes but not functionally at all.

You can give two or more cores to srcds, but its stay on only one. For example you give core 1,2 to srcds, but its just will jump core to core. not just stay %50,%50.

But windows does it. Dont know if all windows version does it tho, back in time Ive used Windows server 2008 and had successfully multi-threaded srcds. One srcds use two cores equally.
Amroth is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 12-06-2015 , 23:06   Re: Question about CSGO cpu usage.
Reply With Quote #9

Source engine is single threaded (AND not thread-safe) so I still question your lacking statement that srcds is multithreaded.
Potato Uno is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 12-07-2015 , 02:58   Re: Question about CSGO cpu usage.
Reply With Quote #10

If you run one server and check task manager. You can clearly see srcds uses all cores at once with small usage on each core.

If you set affinty to one core. You can see much higher usage on the assigned core.

Edit: i will mention when all cores are in use the sv var is bouncing / much less stable. I persume it's all the cache swapping.
__________________

Last edited by Neuro Toxin; 12-07-2015 at 03:17.
Neuro Toxin is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:07.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode