Detecting Disk I/O Problems

If your system spends a lot of time idle, even under heavy load, you have the right to suspect disk I/O problems. Remember that memory problems and I/O problems are often related. Here are some steps that will help to confirm that your system is suffering disk problems:

� Run iostat 5 (sar-d, if your system supports it). Compare that result with your "healthy system" data. Is disk activity much higher than normal?

� Is disk activity distributed fairly among the system's disks?

� If not, are the most active disks also the fastest disks?

� Run sadp (some System V, but not all) to get a seek histogram.

� Is activity concentrated in one area of the disk (good), spread evenly across the disk (tolerable), or in two well-defined peaks at opposite ends (bad)?

� Are you using NFS? Are users reporting slow file access working locally, or are they accessing a remote filesystem? If they are using remote files, look at your network situation. You don't have local disk I/O problems.

� Look at your memory statistics by running vmstat 5 (sar -rwpg). If your system is paging or swapping consistently, you have memory problems, and they are undoubtedly making disk I/O worse than it would be otherwise. Attack your memory problems first.

If any of these tests indicates a problem, try these approaches:

� Reorganize your filesystems and disks to distribute I/O activity as evenly as possible.

� Use your fastest

Requires Free Membership to View

disk drive and controller for your root filesystem - this will almost certainly have the heaviest activity. Alternatively, if single-file throughput is important, put performance-critical files into one filesystem and use the fastest drive for that filesystem.

� Put performance-critical files on a filesystem with a large block size: 16 KB or 32 KB for BSD, 2 KB for System V.

� For System V.4, use UFS (BSD-style) filesystems instead of the System V (S5) filesystem.

� Increase the size of the buffer cache by increasing BUFPAGES (BSD), NBUF (V.3), or BUFFERS (XENIX, V.2). This may hurt your system's memory performance.

� Rebuild your filesystems periodically to eliminate fragmentation. System V.4 users can use dcopy; other System V and BSD implementations should do a backup, build a new filesystem, and restore.

� dcopy has some options to concentrate heavily used files at the beginning of the filesystems. If sadp indicates that you have a bad seek pattern (two distinct peaks, many long seeks), try using dcopy to fix the situation.

Source: O'Reilly - System Performance Tuning - Help for UNIX System Administrators

This was first published in June 2000

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.