LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-10-2009, 11:00 AM   #1
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 97
vmstat question


An otherwise good article recently in Linux magazine contained the following:
Quote:
If the interrupt rate is too high... you can use an interrupt utility, like sar, to help uncover the cause... A high number of context switches relative to the number of processes is undesirable because of the flushing of cached data.
However, like too many similar articles, it fails to say what a high ratio of context switches, or too high interrupt rate, would be. On a Pentium dual core laptop, I'm seeing 100 to 1,000 cs's and around 60 - 800 interrupts per second (but often zero running processes), just surfing the web, while an old PC that I'm currently flogging by making it compile gcc is showing less than 10 context switches, but more than 300 interrupts.

Obviously, these machines are doing very different jobs. The old PC isn't having to run a GUI, and doesn't have a user prodding it constantly. However, is there a table or a formula to tell me "how high is too high"?

Thanks,
Rob

Last edited by Robhogg; 04-10-2009 at 11:42 AM.
 
Old 04-10-2009, 11:07 AM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

Quote:
is there a table or a formula to tell me "how high is too high"?
The correct answer is:
Quote:
It depends...
You need to:
1. Establish a performance baseline
2. Determine what factors .. on your particular system ... affect performance (one way or the other)
3. Decide what should be done

For example:
1. Let's assume your system gets "slow" when you run a particular app
2. Is the app CPU bound? I/O bound? Memory bound?
3. These are precisely the questions you need "vmstat" and "sar" to help answer
4. Whether you buy a new CPU, buy more RAM, tune your app or just live with the problem: that's completely up to you

'Hope that helps .. PSM

Last edited by paulsm4; 04-10-2009 at 11:13 AM.
 
Old 04-10-2009, 12:09 PM   #3
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Original Poster
Rep: Reputation: 97
Quote:
Originally Posted by paulsm4 View Post
Hope that helps .. PSM
I was wondering whether the answer might be something like that. I suppose a high load for a single core machine running at 166MHz and a dual core one running at 10 times the clock rate is quite different.

Thanks,
Rob
 
Old 04-10-2009, 05:00 PM   #4
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

Yes, in general a 2GHz CPU should perform 100x the work of a 200MHz CPU, or a dual-core about twice the work of a single core.

However, if an app has code like this, you're always going to get 100% CPU:
Code:
while (TRUE)
  i++;
In any case, the answer is "it depends..."
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
vmstat lucifer_smiles Linux - Server 1 01-29-2008 06:09 PM
issue with VMSTAT Linux_Kidd Red Hat 1 12-30-2006 06:15 AM
vmstat vs. sar danieldinu Solaris / OpenSolaris 10 10-27-2006 04:07 PM
vmstat UltraSoul Solaris / OpenSolaris 9 07-14-2006 10:11 PM
regarding vmstat output cnkhandar Linux - Newbie 1 07-07-2006 08:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:22 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
Open Source Consulting | Domain Registration