5 Useful Linux Performance Utilities

Filed Under (Linux) on 09-10-2008

Ever wondered what was going on with a server or desktop that just wasn’t performing “right”? Sure the load average is a good representation of the overall load as described here, but, how do you track down the actual source of the issue? Try out these five utilities to help you track down any load-related issues with your Linux-based installation.

 

  1. top

    image

    Yes, that’s right, good ol’ fashioned “top”. If you haven’t already used the top command then you may not have been using Linux that much. Top provides a real-time look at processor time, processes that are using high amounts of memory/CPU and also an overview of physical and swap memory.  A preview of top can be seen to the right. Press “1” to show all CPU’s available (if running multiple-core processors or HT-enabled processors).

  2. htop

    There are also other top variants out there which can provide more information in the same “top-like” format. Enter htop. Htop has been around for quite imagesome time and has, as far as I know, gone generally unknown around the Linux world. htop provides colorful (who doesn’t like colors?) views of the system state and shows tree views for processes that provide even more detail. A screenshot of the htop interface can be seen on the right. Obtain more information about htop here.

  3. iostat

    Got disk performance issues? Find out with iostat! iostat is used for monitoring speed, ops/sec and cpu time spent waiting on input/output devices to respond. This command is quite useful when attempting to see what is causing your load averages to spike. If your system has high i/o wait times you may consider purchasing faster disks or tuning the performance of your application to be less disk-intensive. Performance tuning, for instance, image of a MySQL database can greatly decrease the amount of disk i/o needed. Adding indexes and re-constructing queries can speed up MySQL systems that have high i/o wait times. Of course, you can always throw hardware at the issue as well. For more information on iostat see this article.

  4. vmstat
     

    Direct from the vmstat man page: “vmstat reports information about processes, memory, paging, block IO, traps, and cpu activity.” The data shown in vmstat is the average since last reboot.
    image 
    Direct from man page:

    Procs
           r: The number of processes waiting for run time.
           b: The number of processes in uninterruptible sleep.

    Memory
           swpd: the amount of virtual memory used.
           free: the amount of idle memory.
           buff: the amount of memory used as buffers.
           cache: the amount of memory used as cache.
           inact: the amount of inactive memory. (-a option)
           active: the amount of active memory. (-a option)

    Swap
           si: Amount of memory swapped in from disk (/s).
           so: Amount of memory swapped to disk (/s).

    IO
           bi: Blocks received from a block device (blocks/s).
           bo: Blocks sent to a block device (blocks/s).

    System
           in: The number of interrupts per second, including the clock.
           cs: The number of context switches per second.

    CPU
           These are percentages of total CPU time.
           us: Time spent running non-kernel code. (user time, including nice time)
           sy: Time spent running kernel code. (system time)
           id: Time spent idle. Prior to Linux 2.5.41, this includes IO-wait time.
           wa: Time spent waiting for IO. Prior to Linux 2.5.41, shown as zero.

  5. ps

    Although the ps “process list” command does not show real-time updates it can provide useful information as to why your system may be slow. I typically use the “aux” options that shows enough detail but also adding “ww” to the end of “aux” yeilds good results for long commands. Run “ps aux” and look for multiple processes. This is good for troubleshooting if a process like Apache or Exim have spawned many children and caused the system to slow. Use the “e” flag to show children in a tree format.

    image 

IBM Brings new Power 560 Express to Market

Filed Under (Linux) on 08-10-2008

"A new server for mid-size companies, the Power 560 Express, is due on Nov. 21. It uses a 3.6Ghz Power6 processor, comes in four-, eight- and 16-node configurations, and packs a hefty 384GB of memory. It’s designed for companies looking to run multiple applications on a virtualized system. It will be offered with Linux, AIX or i."

IBM brings a new line of processors and machines to the market with unreal memory capacities.

Linus Torvalds has a Blog

Filed Under (Linux) on 08-10-2008

Linux Trovalds is the father of Linux. He has been very active in the development of the Linux kernel and recently decided to start a blog. Read his blog here.

 

It will be interesting if he keeps the blog updated or if he posts a lot at the beginning then tapers off.

 

So, having avoided the whole blogging thing so far, yesterday Alan DeClerck sent a pointer to his family blog with pictures of the kids friends, and I decided that maybe it’s actually worth having a place for our family too that we can do the same on.
Of course, I’ll need to see what Tove wants to do, but in the meantime, here’s a trial blog.

Good Information on Linux Semaphores

Filed Under (Linux) on 27-08-2008

What is a Semaphore? An article I found here is very useful. It says that “Semaphores can be thought of as simple counters that indicate the status of a resource. This counter is a protected variable and cannot be accessed by the user directly.

This recently came up when the Dell OpenManage storage service would not start on a Linux system. It complained that there were no more Linux semaphores available. Check out the article for more information.

“ROOT Filesystem is Currently Mounted Read Only”

Filed Under (Linux) on 18-07-2008

This error can be a bit unnerving if your Linux system doesn’t reboot cleanly. To remount your root filesystem as read/write (rw) issue this command:

 

# mount -n -o remount rw /