DiskTester™ 2.0 User ManualLast updated: 22 April, 2006 Table of Contents Legal and and contact Command Syntax Primer Distribution or copying without the express written permission of diglloyd, Inc is prohibited. No warranty, either express or implied is given and you use this program entirely at your own risk. Please read the License Agreement. For inquiries regarding licensing disktester, please see http://diglloyd.com/diglloyd/software/index.html. Email contact: software@diglloyd.com Please include “disktester inquiry” in the subject of your email (click on the email link just above). Due to a large volume of spam, messages may be inadvertently ignored without an appropriate subject. DiskTester is a Universal Binary, and will run on either PowerPC-based Macs or Intel-based Macs. Mounting the install volume If you’re reading this file from the installation volume, you’ve already done this step. Skip to Step by Step below, or if you prefer, you can perform the installation manually. Double-click the “DiskTester.dmg” file to cause it to be mounted as a volume icon on your desktop. An icon should appear on your desktop that looka like this: 1. Open a Terminal window. Terminal is found in the Utilities folder within the Applications folder (/Application/Utilities). You will see something like the following: Last login: Sun May 7 11:37:37 on ttyp1 2. Type the commands shown in blue: llcG5:~ lloyd$ cd /Volumes/DiskTester_Install/ You should see output similar to this: llcG5:/Volumes/DiskTester_Install lloyd$ cd /Volumes/DiskTester_Install/
llcG5:/Volumes/DiskTester_Install lloyd$ sh install.sh
Installing DiskTester...
*** Done. DiskTester ('disktester') is now ready to use. ***
DiskTester 2.0 (C) 2003-2006 diglloyd, Inc. All Rights Reserved
Available commands:
show-info show information about one or more volumes
run-area-test test sequential speed across a volume
run-sequential test sequential speed for a specific chunk size
run-sequential-suite test sequential speed for a range of chunk sizes
run-random test random speed for a specific chunk size
run-async-test perform asynchcronous multi-threaded I/O
test-reliability test the reliability of a volume
create-hierarchy-template scan volumes/files/folders and write a
template file for use with 'create-hierarchy'
create-hierarchy create a file hierarchy using a template file
created by 'create-hierarchy-template'
create-files create files of a specified size
read-files read specified folders(s) or volume(s) as fast as possible
help display usage and examples for the available commands
To see examples for a specific command, use
"disktester help <cmd-name>" where <cmd-name> is the name of the command.
To see detailed help for all commands, use 'help all'
3. After step 2, you may begin using DiskTester (disktester). Assuming you have a volume named “Macintosh HD”, try: llcG5:~ lloyd$ disktester run-area-test "Macintosh HD" 1. Drag the “DiskTester” folder (found inside “install-items”) anywhere on your hard disk. Uninstalling The automated install performs the following actions:
1. Drag the /Applications/Utilities/diglloyd/DiskTester folder into the trash (if DiskTester is the only diglloyd program you have installed, you can drag the /Applications/Utilities/diglloyd folder into the trash instead). 2. [Optional, not required]. Remove the following line from your “.bash_profile” file: export PATH=/Applications/Utilities/diglloyd/disktester:... If you’re a DiskTester 1.0 user, please see Version 2.0 changes. DiskTester (“disktester” as the command-line name as used in Terminal) tests disk performance on Mac OS 10.3 through 10.4 (It might work on 10.2, but has not been tested). It measures the combined performance of a volume and the Mac OS X operating system. Some test utilities bypass the operating system and test a disk directly; this is not as realistic because real programs use the operating system to read and write files; they do not read and write directly to the hard disk. Situations in which you might want to use DiskTester include:
DiskTester uses the Mac OS X file system calls for its testing. No direct driver access is performed. For this reason, you can expect that DiskTester’s results are real-world numbers achievable by any competently-implemented Mac OS X program. DiskTester uses no special system privileges, no kernel extensions, etc: it cannot crash your system by itself, though it can provoke an underlying hardware or software problem, which is one of its useful features, as distressing as a system crash can be. Performance and reliability testing guidelines The following guidelines apply to hard drives in general, but are of particular importance with RAID configurations. Don’t assume all similarly specified hard drives will perform equivalently Take 3 drives from 3 vendors, all of which are 7200rpm with a 16MB-buffer. Test them singly and in a striped RAID configuration and you’ll often find that there are distinct performance differences. It is best to seek out expert advice which tested in a manner similar to your intended usage. General benchmarks from generic testing sites are often worthless for determining actual performance with your particular hardware and software, providing little more applicability to your particular purpose than a specification sheet would have provided. Factors that can influence performance include:
This is not an exhaustive list, but it should serve to illustrate that getting top performance from any particular setup is not something you can be assured of from a generic review of a hard disk. There are some sites that do a particularly good job of characterizing performance. Here are two of my favorites when it comes to high-performance RAID systems: Don’t assume a device is reliable until you’ve tested it Multiple factors can induce flaky performance in a disk subsystem. These include:
Use DiskTester’s test-reliability command to verify that your volumes are reliable (including network volumes). Do not assume your disk/volume is reliable before using it for “production”. Always have a recent backup. The most troublesome type of failures are intermittent failures, which are difficult to detect except with the help of programs like IntegrityChecker. Though rare, intermittent failures are particularly insidious, because they can alter data without being detected. Bad data then gets backed up, replicating the damage. There are outright hardware failures such as a disk drive just “going south”. The author recently had a 1-month-old hard drive fail abruptly. It was part of a 3-drive striped RAID—all the data was lost. Fortunately, multiple redundant and recent backups existed, so only a few hours work was lost. Conventions used in this document When referring to the program as a product, it is written “DiskTester”. When referring to it as the command typed when invoking it, it is written “disktester”. Entering “DiskTester” as the command name in Terminal will work when you have formatted the MacOS X volume with a case-insensitive file system (the default). Still, it’s better to get in the habit of typing it correctly (all lower-case). All commands and output as typed or viewed in Terminal while using DiskTester are shown in a fixed-width font. Commands that you are to enter are additionally shown like this. For example, in the command shown below, “[llcG5:~] lloyd” is the command prompt (waiting for you, the user, to enter a command), and the text to be entered by the user is “ cd /Applications”. [llcG5:~] lloyd% cd /Applications This section describes using DiskTester. There were no reported bugs in DiskTester 1.0. If you think you have found a bug in DiskTester 2.0, please report it. DiskTester never opens your files in anything but “read only” mode. By itself, it cannot change, modify or corrupt your files. Certain tests, such as run-area-test do create a temporary file into which data is written, but existing files are always opened read-only. The most common user error occurs when testing a volume with a name that contains a space character. If the volume name contains a space character, you must enclose it in straight quotes. Failure to enclose the volume name in quotes causes the Terminal shell to break the name up into multiple arguments. For example, suppose you want to test the volume “My Fast Volume”. You would enter the command below using quotes around the volume name: [llcG5:/] lloyd% disktester run-area-test "My Fast Volume" If you mistakenly forget the quotes, you will get an error: llcG5:/ lloyd$ disktester run-area-test My Fast Volume ERROR: illegal command usage [-40000], msg = "Wrong number of operands for command run-area-test (exactly one operand required [3 supplied])" The error occurs because the volume name "My Fast Volume" would be delivered to DiskTester as three arguments: "My", "Fast", and "Volume" instead of simply "My Fast Volume". Working with command lines is more of a hassle when spaces are used; many advanced users do not use spaces in file names for this reason. Running other programs while testing The DiskTester commands intended for determining maximum hard disk performance, such as the run-area-test command, can be affected by other programs if they access the disk being tested (or in some cases even if non-test disks are accessed). Other programs also consume memory—which might mean that MacOS will be forced to use virtual memory, which can cause disk access and erratic results while testing. For these reasons, you should run performance-oriented tests only after quitting other applications, and making sure “background” programs like Apple’s SpotLight are not indexing the disk during the test (System Preferences => SpotLight => Privacy). It is best to add the volume being tested to the Privacy list in SpotLight. Activity Viewer (Applications => Utilities => Activity Monitor ) can be a helpful tool to observe system activity, and it won’t affect DiskTester results. The most useful items are the “%CPU” column (click on it to sort by max/min CPU usage), the “Disk Activity” tab, and the “CPU Monitor” window. When you start Activity Monitor, use the “Window” menu to show the windows seen below: DiskTester is supplied as a command-line utility named “disktester” (not “DiskTester”), which must be run in a Terminal window (Applications => Utilities => Terminal). You might want to add disktester to your “path”, but the simplest approach is run it from the directory in which it resides. To do this, change to the directory in which you installed DiskTester (using the “cd” command). When running DiskTester, add “./” in front of “disktester”. The “./” tells Terminal to “look only in the current directory for the 'disktester' command. For example, suppose DiskTester is in your Applications => Utilities folder and you want to run the run-area-test command on your volume “RAID”. You would enter the following commands: [llcG5:Dev/CodingX/DiskTester] lloyd% cd
/Applications/Utilities DiskTester will start running: llcG5:~ lloyd$ cd /Applications/Utilities/ => Allocating maximum size contiguous file on "RAID" (8.00GB)...7.90GB
(98.8% of volume size) To stop an in-progress test, use control-c (you must be in the Terminal window with the running disktester process). Hold down the control key and press 'c'. The control key is the key labelled “control” on the standard Apple US keyboard; it’s right next to the “option” key. A control-c sends a “signal” to disktester that it needs to quit. You should immediately see a message similar to this one: Caught signal: 2 In most cases, disktester will quit within a second or two, though it might take longer with certain tests and/or very large chunk sizes. If you do not see something like the above immediately (ie nothing at all), it means that disktester has “hung”, typically within a MacOS file-manager call. DiskTester no longer has control and isn’t running in the sense that it is waiting for a request to finish and no longer has any control over what happens. This can be caused by hardware problems of various kinds, such as a bad cable, driver bug, bad drive, etc. It could also be caused by an operating system bug (rare) or driver bug or hardware bug. In such cases, disktester typically is using 0% CPU time (you can check using Activity Monitor). If DiskTester has not responded to control-c, you can try control-z, which means “stop the process (disktester) from running”. Always try control-c first! After typing control-z, you should see something like the following: ^Z Now you can attempt to kill the running 'disktester' process. The “kill” command means what it says: the “-9” part means to do it with no warning to the program, and the “%1” part means “job number 1”: llcG5:/Applications/Utilities lloyd$ kill -9 %1 [1]+ Stopped /disktester run-async-test X8 What the above output is saying is that the program is stopped; sometimes it can’t actually be killed until it is told to run again (after issuing the “kill” command). Use the “fg” command to do this. If successful, you’ll see something like the following: llcG5:/Volumes/MasterQuad/MasterData/Coding/DiskTester
lloyd$ fg If none of the above works, you can try waiting a minute or so to see if there is any change (unlikely); if not it’s “pull the power plug” time. But first, if possible, save any unsaved files and quit open programs. (This may or may not be possible for some programs if a hardware bug is in progress). Then pull the plugcle Invoking DiskTester in the above manner will emit the output shown below. (If the lines wrap-around in Terminal, make the window wider for better readability). llcG5:~ lloyd$ disktester
DiskTester 2.0 (C) 2003-2006 diglloyd, Inc. All Rights Reserved
Available commands:
show-info show information about one or more volumes
run-area-test test sequential speed across a volume
run-sequential test sequential speed for a specific chunk size
run-sequential-suite test sequential speed for a range of chunk sizes
run-random test random speed for a specific chunk size
run-async-test perform asynchcronous multi-threaded I/O
test-reliability test the reliability of a volume
create-hierarchy-template scan volumes/files/folders and write a
template file for use with 'create-hierarchy'
create-hierarchy create a file hierarchy using a template file
created by 'create-hierarchy-template'
create-files create files of a specified size
read-files read specified folders(s) or volume(s) as
fast as possible
help display usage and examples for the available commands
To see examples for a specific command,
use "disktester help <cmd-name>" where <cmd-name> is the name of the command.
To see detailed help for all commands, use 'help all'
To get help on a particular command, use the 'help' command: llcG5:/ lloyd$ disktester help run-area-test The output will look like this. If that is hard to understand, please see the Command Syntax Primer. llcG5:~ lloyd$ disktester help run-area-test DiskTester 2.0 (C) 2003-2006 diglloyd, Inc. All Rights Reserved SUMMARY run-area-test: test sequential speed across a volume SYNTAX run-area-test [--output-level|-l <terse|normal|verbose[+log]>] "normal" [--iterations|-i <count>] "1" [--chunk-size|-c <size[K|M|G|T]>] "4M" [--test-size|-t <size[K|M|G|T]|max>] "512M" [--delta-percent|-p <percent>] "10%" <volume-name> EXAMPLES disktester run-area-test X8 disktester run-area-test --chunk-size 32M --delta-percent 10 --iterations 3 X8 Command "help" executed in 0.01 seconds.
This section describes all available commands, their syntax, and usage. Abbreviations and units
Abbreviations available for conveniently specifying quantities and positions are shown in the table below. Please note that DiskTester considers one Kilobyte to be 1024 bytes, not 1000 bytes. A Megabyte is 1024 Kilobytes, etc. All rates shown in DiskTester results are calculated using these units.
In the table below, click on the “Examples” link to see the results from the example command(s). NOTE: all disktester commands bypass the MacOS X file system cache. Test timings and rates are always real throughput to the disk(s)/volume. However, large caches on some disks, especially striped RAID volums can hav very large caches necessitating relatively large test sizes. For example, an 8-way strip of disks each having a 16MB cache means that 128MB of cache memory is present. As a rule of thumb, use a test size that is at least 8 times larger than the total size of the disk caches, with 16 or 32 times preferred for the most consistent results.
Each option has a long name, which must be prefixed by "--", and a short name, which must be a single "-" followed by a letter. Please see Appendix A —Command syntax explained for details on syntax.
Changes in version 2.0 from version 1.0 DiskTester 2.0 is a major revision from version 1.0. This section describes the changes and additions made.
|