Solved

Troubleshoot High System CPU Usage on Linux

Posted on 2010-11-29
5
1,186 Views
Last Modified: 2012-05-10
I know how to troubleshoot application related problems on Linux but when the system process is the one choking my box, how to I isolate what is happnening?

I am not looking for help with this specific problem, but more a "how to" on isolating problems like this.

I have a server that is running with high System CPU of 96-99%

How do I go deeper in to what is happening

0
Comment
Question by:brittonv
5 Comments
 
LVL 76

Expert Comment

by:arnold
ID: 34231908
run iostats to make sure that the choking is not because of I/O.
vmstat deakls with the system swapping.

you can use top to see which process is tying up the CPU
top -n 1
and see which process is at the top and how many percent of the CPU it is using.
Also look at the CPU load breakdown, system, user, io wait, idle,etc.

What applications do you have on the system?  You may have an application that is waiting for a resource that is deadlocked.
0
 
LVL 19

Expert Comment

by:jools
ID: 34232066
atop is also useful IMHO, it allows logging of data so you can run thru at a later date.

System CPU is (I believe) kernel related processing, you need to collect stats using a number of tools over a period of time, you could find that a high system is related to network or disk IO.
0
 
LVL 8

Author Comment

by:brittonv
ID: 34232079
I can not install iostat... long story.  Is there a way to get the same information otherwise? cat /proc/interrupts etc...

Forgive me but top only shows what users processes are running right?  I mean if I run top I see some things running at low cpu usage, with sys running at 99%.

0
 
LVL 76

Accepted Solution

by:
arnold earned 300 total points
ID: 34232361
You would first have to determine what the issue is. If a tool that is necessary for such an evaluation is not available, your task is made much more complicated.  the system waiting for data from memory/disk or is impacted because the system is swapping i.e. the process needs XMB of memory and only a small amount is available. The system is then has to write to disk the current state of inactive processes to make space available for this process to run.

It is somewhat similar to a restaurant. i.e. you've an reservation of 10 people. The restaurant has to arrange the tables, and chairs, if you look at the employees prior to your reservation time, all sees ok, but right before you are seated, you see a bunch of activity around where your table will be i.e. several workers will be running around cleaning up the recently freed up tables, and then others will be arranging those tables to fit your group and then others still will be bringing the plates utencils. etc.

How long will your wait for seating be if there was only one person available to do all those steps?
 
0
 
LVL 25

Assisted Solution

by:madunix
madunix earned 200 total points
ID: 34232649
Root cause of high cpu usage could be looping process, application performing cpu intensive operation(s), paging due to process size exceeding resident memory (RAM), excessive logging..etc.
On linux system run the commands "vmstat, top, iostat, free, sar"  to give you a top like display of memory totals, paging amount, swap numbers, interrupts per second and much more. they are useful to determine where the performance bottleneck is on a machine.
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now