LinuxQuestions.org
Visit Jeremy's Blog.
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 01-18-2008, 09:16 AM   #1
Horos23
LQ Newbie
 
Registered: Jan 2005
Posts: 27

Rep: Reputation: 15
High load of linux box


Hello,

I need a good way to determine what exactly is causing a high load on a linux server ? Meaning, I tried to find a method on google or other forums and didn't find a good, precise method. And I don't really have the time now to read "Understanding Linux Kernell" and learn C, and make my own profiler/logger/debugger. I mean, when those three numbers (for 5 10 15 mins) are greater than 3 or 5, I get slow response from my box. And so do my clients. I learned the top command, and what it does, but I don't think it tells you all, or I don't know how to read. Because there is no single process taking up all the CPU. There are more. But I need a method to find out in the last 5 mins what are the top 10 processes that spent CPU cycle. Or other good information that tells me exactly what/who caused a high load.

Thanks,
Stefan

ps: or tell me what to learn/read
 
Old 01-18-2008, 10:13 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 256Reputation: 256Reputation: 256
If the load itself is not extremely high and an application isn't taking up 100% CPU or the like, sounds to me like it's Disk I/O causing the problem, either the disks have a high %wait and can't handle the read/writes going on or even a disk is failing.

Learn the command iostat to dig a little deeper and to start off with. http://man.linuxquestions.org/?query...ction=0&type=2
 
Old 01-18-2008, 11:54 AM   #3
Horos23
LQ Newbie
 
Registered: Jan 2005
Posts: 27

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by trickykid View Post
If the load itself is not extremely high and an application isn't taking up 100% CPU or the like, sounds to me like it's Disk I/O causing the problem, either the disks have a high %wait and can't handle the read/writes going on or even a disk is failing.

Learn the command iostat to dig a little deeper and to start off with. http://man.linuxquestions.org/?query...ction=0&type=2
You could be right. I tried the sar command to view the history of stats for the day, and also I see in what interval the load is jumping. But the sar -b gives me 0.00 for all indicators. Any ideas why ?
 
Old 01-18-2008, 01:22 PM   #4
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 548

Rep: Reputation: 33
top is the tool I would use in your situation. Normally one single process will not take up the cpu. That is why the processes will fluctuate which ones are at the top of the list in top. For each interval of top the process at the top of the list is using the most resource. If you have a lot of processes fighting for time, it makes figuring out your issue all the harder.

The 3 numbers you spoke of are Load Average. The rule of thunb on those is anything below 2.0 is good. Above 2.0 can cause slow down in response time but not always.

The ps command will show you all proceesses running on your server (ps -eaf).
That can also be good info.

iostat 1
will show disk stats every one seoond indefinately (until you hit control C).
iostat 5
or
iostat 10
might work better for you. Just control C whn you are done.

vmstat works the same way only for memory.
vmstat 10
would show you memory stats every 10 seconds.
Or you could expand and go:
vmstat 10 500
This would show you vmstat info every 10 seconds 500 times. usually you would redirect the output to a file like this:
vmstat 10 500 >> /tmp/vmstat.out

note: iostat works the same way:
iostat 10 500 >> /tmp/iostat.out
would give you 500 observations of iostat output in the file /tmp/iostat.out

hope this helps.

Last edited by DotHQ; 01-18-2008 at 01:23 PM.
 
Old 01-20-2008, 06:03 AM   #5
Horos23
LQ Newbie
 
Registered: Jan 2005
Posts: 27

Original Poster
Rep: Reputation: 15
Thanks for your answers. I will make some simple scripts using iostat vmstat and top commands to make my custom log of what processes are running and in that time what happens with disk writing, memory and cpu, and I think I will understand the causes of high load. Because I'm not always near the server when the high load is happening to check the things in that moment.
 
  


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
tool to reboot my box if there's high load? Guru Mind Linux - Server 3 05-19-2007 05:10 PM
Load Avg High/Phys Mem High teamh Debian 2 12-26-2006 05:03 PM
DL380 + Linux + High Load=Network Drop king0770 Linux - Hardware 0 05-25-2006 04:53 PM
Linux keeps crashing under high load..help bruce1271 Linux - Hardware 14 06-06-2003 02:57 PM
One linux box and nic card, two high-speed internet connections ajnunes Linux - Networking 3 10-24-2002 04:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:48 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration