LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 11-03-2006, 12:27 PM   #1
bastupungen
Member
 
Registered: Nov 2003
Posts: 53

Rep: Reputation: 15
"us" CPU usage in "TOP"


Hello!

I am being sponsored by a company with a counterstrike source server. I am trying to optimize the server CPU usage.

The problem I am having is that it seams that a severe part of the servers CPU usage is being used by "US" part, around 60%. I am seeing the is the "top" command. This is a little wierd because on my other linux server the US part of the server is only using about 4-5% TOP!

How can i see which processes (or systemfunctions) are using these 60% (well around 30 since its an HT CPU)

This is how it looks like in TOP:
Cpu0 : 1.7% us, 2.7% sy, 0.0% ni, 95.7% id, 0.0% wa, 0.0% hi, 0.0% si
Cpu1 : 58.0% us, 0.7% sy, 0.0% ni, 38.3% id, 0.0% wa, 1.0% hi, 2.0% si

It MIGHT be that i have totally missinterped the TOP command and the "us" part is unused CPU space. Then the question is how can i get the server program to use that space. Because the server is lagging and dropping in FPS, obviously not getting the CPU power it needs.

The server is an P4 at 3.6 running debian.

Thanks in advance! /Bastu
 
Old 11-03-2006, 02:02 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,113

Rep: Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985
Perhaps you should read the manpage for top.
Merely sort it by %CPU to see the top consumers
 
Old 11-03-2006, 04:33 PM   #3
bastupungen
Member
 
Registered: Nov 2003
Posts: 53

Original Poster
Rep: Reputation: 15
It is sorted by CPU by default
 
Old 11-03-2006, 05:26 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,113

Rep: Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985
How about that - seems it is too. Too long since I ran with the default obviously.
So, ... I take it that means you aren't seeing any candidate(s) as the big consumer ???.
Start looking for several (lots) of the same thing then - maybe a script, maybe just a setting somewhere causing spawning.

You aren't mis-interpreting the data; "us" is user (i.e. non-kernel) CPU consumption - idle time is listed as "id".
 
Old 11-03-2006, 09:33 PM   #5
bastupungen
Member
 
Registered: Nov 2003
Posts: 53

Original Poster
Rep: Reputation: 15
I cant get this out... really..

I am running a gameserver, Low-Latency high-performance program. The server program is lagging, not getting enough performance, and IF top is correct there are still alot of CPU space to be used. Why doesn't the server program get access to this unused CPU space?

Would the program get access to the CPU space if i would renice it to like -10 or something?

Or are there some other kind of command i can process to give it access to more beef? =)
 
Old 11-03-2006, 10:42 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,113

Rep: Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985
O.K. - that's a different question than I thought you were asking.
Start with the obvious - seems you have no need of multithreading, so turn off H/T and see if that helps. Some code works worse with it rather than better.
Some (most ???) BIOS have an option to turn it off.
Run with that and see how it goes.
Re-nice'ing might work, but if it's the only workload, possibly won't be of any benefit.

Other than that, you might be looking at kernel options (like pre-emptible) and tunables (like swappiness). Have a search on LQ for appropriate threads - I don't run servers that need this sort of attention.
 
Old 11-04-2006, 07:02 AM   #7
bastupungen
Member
 
Registered: Nov 2003
Posts: 53

Original Poster
Rep: Reputation: 15
Yeah, HT would be a good option to turn off. The strange part about HT in srcds (Counterstrike source server software) is that the performance is accually diminised without HT, I guess the software is somehow optimized for HT (It does say that it uses the I686 arch and if I recall correctly I686 har HT tech involved in it, I may be wrong on this point though.

Yeah, I've thought about recompiling the kernel to. The only problem is that I am not root on the server and the server manager hasn't installed the programs a wan't him to so i can compile a new kernel. A new kernel would probobly help alot.

Exacly what options do you think I would need to get the most out of my P4 server? I know some but more advice is always better
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Suggestion: for "subscribed threads" & "top of page" buttons Old_Fogie LQ Suggestions & Feedback 7 07-10-2006 05:10 PM
high cpu usage on process "event/0" rioch Linux - Laptop and Netbook 6 05-03-2006 03:03 PM
Where to download precompiled bash binaries, such as "time" and "top"? elinuxqs Linux - Newbie 12 11-14-2005 08:36 PM
"top" cpu usage edgjerp Mandriva 2 11-12-2005 05:21 AM
"User" & "System" CPU load difference JJX Linux - General 3 06-06-2004 01:42 AM


All times are GMT -5. The time now is 10:15 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration