4.4 Disks

When setting up an email storage system, it's important not to overlook the most critical component the disk drives themselves. The disks that work best for email storage have fast platter rotation rates and very low seek times. Disk capacity is far less important. In fact, it's difficult to find appropriately small disks for most email systems. For very high I/O environments, there's no substitute for having large numbers of spindles. In general, buy the smallest and fastest (especially as measured by seek time) disks available. This choice isn't cost-effective in terms of megabytes per dollar, but it is cost effective in terms of I/O operations per dollar, the really important metric. These days, no matter how small the disk, expect that its entire capacity won't be effectively used for email storage, especially on systems such as an ISP's POP-based system, where mailbox storage is fairly transient.

4.4.1 ATA Versus SCSI

Most high-performance email servers should use SCSI disks, even if the server is implemented with hardware that supports ATA (Advanced Technology Attachment; also called IDE) disks. Even though they're more expensive, manufacturers typically quote longer mean time between failure (MTBF) numbers for their SCSI disks than their ATA disks, and robustness is a key feature when it comes to email servers' disk drives. Also, accessing data on SCSI disks requires fewer server CPU resources than accessing the same data on ATA disks. ATA controllers require the server's CPU to handle the transfer of data on and off the disk. With SCSI, the SCSI controller performs these operations. At the present time, the fastest SCSI controllers can transfer data at 160 Mbps. The fastest form of ATA, known as Ultra-ATA/133, can transfer data at a maximum rate of 133 Mbps.

In tests of single disks with otherwise identical characteristics, ATA disks may mildly outperform SCSI disks. This result may reflect the ATA disk's ability to take advantage of the system's fast CPU while the SCSI disk uses its own more modest processor to move the data to and from the disk. On a system whose CPU is used for tasks other than raw data movement, the test results might be quite different. If a test reveals that an ATA disk greatly outperforms its SCSI counterpart, the operating system or disk in question is likely treating the data differently. To give the illusion of better performance, some ATA-based systems will acknowledge a write before it has actually been written to the disk. Clearly, this behavior is unacceptable on an email server, and ATA storage should be avoided unless one can be certain that this behavior will not happen. One clear indication of this behavior is an ATA disk that performs impossibly well on a test using relatively small data sizes, on the order of a few megabytes or less. As with most things, if the numbers seem too good to be true, they probably are.

ATA disks are limited to 2 per channel, whereas even older SCSI-2 controllers can address 7 devices, more modern Wide SCSI controllers can address 15 devices, and Fibre Channel allows a maximum of 127 distinct devices on a single loop. The limitation in the number of devices per channel may not pose a problem for email queues, but the message store on a high-performance system should almost certainly be based on SCSI. Of course, it's rare that in a high-performance environment 15 SCSI devices, or even 7, will be connected to the same SCSI controller. Nevertheless, having the option for more than 2 devices is useful.

4.4.2 Stupid Disk Drive Tricks

Another trick is worth mentioning, even though it rarely justifies the effort required to implement it. Some filesystems will allow the formatting of just part of a disk. If one can make sure that just the outer cylinders (those that reside near the outside edge of the disk) are formatted, then some additional performance increases are possible. Let's consider an example. Pretend that we format an 18GB disk drive to only 9GB using just the outer cylinders. By cutting the disk storage capacity in half (roughly proportional to the area of the disk), we cut down the distance that the disk head must seek along the radius of the disk to about 30% of the original distance it would have to cover, because more of the disk's area occurs near the edge of the disk than in the center. This approach results in a considerable savings in terms of the amount of distance the disk head has to seek, thereby reducing the latency of disk operations. Moreover, the linear velocity of the disk underneath the heads at the outer edge of the disk is much faster than the linear velocity near the center of the disk, meaning that more data pass underneath the heads in any given time period, which also increases throughput a double bonus.

Even on systems where it isn't possible to format just the outer cylinders, a disk may be partitioned for example, into two equally sized parts. Once it has been determined whether the inner or outer cylinders belong to a given partition, one can use just the outer partition for email storage and ignore the rest, or use it for less frequently accessed data, such as log archival.

Generally, this sort of optimization should be reserved for true speed freaks. Most folks with the expertise to set up, document, and maintain a system in this manner would achieve a better return on their investment by just buying more disks, as these devices are cheap by almost everyone's standards, especially as compared to the value of the time spent by people with this sort of expertise. Further, most of today's filesystems start their storage on the outer (faster) cylinders anyway, so much of this benefit happens "by default," at least early in a disk's life, before data become scattered across the platters. Also, it's easier to configure a system by formatting the whole disk, and having the extra space as a "buffer" against mail bombing, network outage, or other unwelcome events can be very useful. Some data and additional considerations may be found in the literature [MET97].

The principal lesson is that on a very transient mail spool, if it will be necessary to access 100GB of email, don't buy three 36GB disks or even six 18GB disks and think that's enough. Disk space bears very little relation to server performance. Making sure a system can keep up with the transactional demands of the service is more important and difficult than finding space in which to store the data. Additional disks are purchased primarily to provide additional operations per second, and only secondarily to increase storage.



sendmail Performance Tuning
sendmail Performance Tuning
ISBN: 0321115708
EAN: 2147483647
Year: 2005
Pages: 67

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net