|
October 2000
Content
- Abstract
- Background and test case
- Hardware and software details
- Summary of results
Abstract
In this report we characterize the performance of internal SCSI and IDE
IO subsystems for doing synchronous sequential writes with varying transaction
sizes. This involves the following:
- We compare two ways to commit data to a disk, using
fdatasync() and directIO() system calls.
- We compare different CPU speed, ecache, and system clock speed.
- Finally, we also study the throughput performance of both SCSI and IDE
IO devices by having multiple processes write to the same disk concurrently.
Back to Top
Background - System Calls and the Test Program
System calls:
pwrite(): The pwrite() function performs the same action as write(), except that it writes
into a given position without changing the file pointer. The first three arguments to pwrite() are the same as
write(), with the addition of a fourth argument offset for the desired position inside the file.
fdatasync(): The fdatasync() function forces all currently queued I/O operations associated with the file indicated by file descriptor fildes to the synchronized I/O completion state.The functionality is as described for fsync(), with the exception that all I/O operations are completed as defined for synchronized I/O data integrity completion.
directIO(): Provides advice to the file system to activate directio for a specified file descriptor. The directio() function provides advice to the system about the expected behavior of the application when accessing the data in the file associated with the open file descriptor fildes. The system uses this information to help optimize accesses to the file's data. The directio() function has no effect on the semantics of the other operations on the data, though it may affect the performance of other operations. Values for advice are defined in sys/fcntl.h. A small sequential IO generally performs best with DIRECTIO_OFF, while a large sequential IO performs best with DIRECTIO_ON, except when the file is sparse or is being extended and is opened with O_SYNC or O_DSYNC.
O_DSYNC: A flag passed to the open() function, which is used to create and open a file. Use of O_DSYNC instructs that write I/O operations on the file descriptor complete as defined by the synchronized I/O data integrity completion state (a write will return after the data is
written to the disk, but not necessarily the full inode information and metadata).
Further details on directio and UFS IO performance are available from the relevant man pages.
Seek time: The amount of time required by the disk drive to position
the arm to the proper disk cylinder.
Disk latency: The time it takes for the disk to spin under the read/write heads.
Disk internal transfer rate: The amount of time required to transfer the
data between the device's cache and the actual device media.
External transfer rate: The amount of time required to transfer the data
from the driver's host controller to the interface controller.
Source code for the test case:
Input: file name, transaction size (k), fdatasync/directio
Output: Average transaction time in microseconds
Link: test.cc
Back to Top
Hardware and Software Details of Benchmarking Systems
Both Solaris 7 and Solaris 8 were tested. Disks specs,
machine configuration, and transaction times (results) are summarized in the Disks chart.
Summary of Results
Summary by disk type
SCSI disks: Our results show that for the case of a single process
writing to SCSI disks, both fdatasync() and directIO() perform almost the same
( directIO() is better on the average by 3% ), as shown in Figure 1.
However, in the case of multiple processes writing to the same disk, the
performance of the SCSI device improves by 21% (for 48 Kbytes txn size) compared
to the case of one process writing to the disk, as shown in Figure 2.
SCSI Specs:
Speed: 7200 rpm
Seek time: 9.4 milliseconds
Average Latency: 4.17 milliseconds
Internal Transfer Rate : 80 - 122 MBits/Sec
IDE disks: In the case of a single process writing to IDE disks,
using directIO() performs up to 125% better than fdatasync(), as shown in Figure 1.
In the case of multiple processes writing to the same disk, the performance
of the IDE device decreases compared to one process writing to the disk, as shown in
Figure 2.
IDE Specs:
Speed: 7200 rpm
Seek time: 9.5 milliseconds
Average Latency: 4.16 milliseconds
Internal Transfer Rate: 193 Mbits/sec (Max)
Back to Top
 |
| Figure 1: SCSI, IDE - Single write |
 |
| Figure 2: SCSI, IDE - Multiple write |
Back to Top
Summary by internal transfer rate
 |
|
Figure 3: Seagate SCSI disks |
As the internal transfer rate increases, the time it takes to
transfer 48 Kbytes to a disk decreases.
Our tests show that the CPU speed and CPU ecache have no impact on the transaction time. See results row 1 (296 MHz),
2 (360 MHz), and 6 (248 MHz) for the same disk.
Back to Top
Conclusion:
Our test results show that the optimal performance for single
sequential writes can be obtained by using IDE disks with directIO().
However, for multiple writes, the best performance can be achieved by using SCSI
disks with directIO().
We saw that the CPU speed and the ecache have no impact on the performance,
while the internal transfer rate does impact the speed in which data
is committed to disk.
October 2000
Back to Top
|