Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
performance:linux-performance-tracking [2009-10-09 16:41:46]
garrett.plasky
performance:linux-performance-tracking [2010-03-09 15:21:00]
garrett.plasky
Line 3: Line 3:
  
 ===== Using Top ===== ===== Using Top =====
-Top is an ubiquitous utility in the Unix admins arsenal. It is provided by the procps package and is available by default on just about every major Linux distribution. It displays process info in real-time, both about the system as a whole and about individual processes. For this particular guide, we are mostly concerned with a particular line (or lines if you have a multi-core/​processor system, reading:+Top is an ubiquitous utility in the Unix admins arsenal. It is provided by the procps package and is available by default on just about every major Linux distribution. It displays process info in real-time, both about the system as a whole and about individual processes. For this particular guide, we are mostly concerned with a particular line (or lines if you have a multi-core/​processor system), reading:
 <code console>​Cpu(s): ​ 4.2% us,  0.6% sy,  0.0% ni, 94.9% id,  0.9% wa,  0.0% hi, 0.0% si</​code>​ <code console>​Cpu(s): ​ 4.2% us,  0.6% sy,  0.0% ni, 94.9% id,  0.9% wa,  0.0% hi, 0.0% si</​code>​
  
Line 23: Line 23:
 Together all of these figures add up to 100%. Generally you don't need to be concerned with all of these metrics, however there are a few that are very important. Any activity that generates CPU activity will reduce the **id** % and depending on how the load was generated, increase one of the others. In most cases these are either **us** or **wa**. Depending on your hardware, it is normal to see anywhere from 1-100% **us** usage. **wa**, however, should ideally be 0%, or as near to 0% as possible. ​ Together all of these figures add up to 100%. Generally you don't need to be concerned with all of these metrics, however there are a few that are very important. Any activity that generates CPU activity will reduce the **id** % and depending on how the load was generated, increase one of the others. In most cases these are either **us** or **wa**. Depending on your hardware, it is normal to see anywhere from 1-100% **us** usage. **wa**, however, should ideally be 0%, or as near to 0% as possible. ​
  
-As this value increases, there is more and more CPU time being spent waiting for system I/O to finish (usually harddrive). Values of even as much as 0.5% have been known to cause slowing on older SATA and PATA drives. This number will almost always be >1% when your server is using swap space (more on that later). Next we'll cover how to get more information about what in particular might cause undesirable **wa** percentages.+As the value of **wa** ​increases, there is more and more CPU time being spent waiting for system I/O to finish (harddrives/​disks). Values of even as much as 0.5% have been known to cause slowing on older SATA and PATA drives. This number will almost always be >1% when your server is using swap space (more on that later). Next we'll cover how to get more information about what in particular might cause undesirable **wa** percentages.
  
-===== Using VMStat ===== 
-http://​strugglers.net/​wiki/​Linux_performance_tuning 
 {{tag>​performance}} {{tag>​performance}}