This tip is the continuation of ATA tuning in Linux part 1, part 2 and part 3. Notes: As noted above, the -m sectcount and -u 1 options should be used with caution at first, preferably on a read-only file system. Most drives work well with these features, but a few drive/controller combinations are not 100% compatible. File system corruption may result. Backup everything before experimenting! Some options (e.g. -r for SCSI) may not work with old kernels as necessary ioctl()'s were not supported. Although this utility is intended primarily for use with (E) IDE hard disk devices, several of the options are also valid (and permitted) for use with SCSI hard disk devices and MFM/RLL hard disks with XT interfaces. (The above list of parameters and notes derived from the Linux man (manual) pages) As you can see, we can alter or control about every aspect of the ATA/IDE drive environment and report on some aspects (-r for read only status and -g for geometry, as well as the -T and -t testing parameters) of the SCSI environment on Linux using the hdparm command. Let's go through an example disk tuning on a LINUX server using hdparm.
We have just installed a brand new 40 GB EIDE disk drive into our Linux server (aultlinux2.) Knowing about the hdparm command, we run it against the disk after we have configured it for use:
This doesn't look very good. After all, this is a fairly new drive and should have lots of good features, let's do a -Tt check (
'); // -->
give us the performance corrected for any buffering effects): It is as we feared, 4.51 MB/sec is very poor performance for this drive. It is supposed to give at least 10 MB/sec and usually much more! First, we will leave things as is except we will goose up the IO support from 16 bit to 32 bit (the c1 setting): Well, a 6.53/4.51*100=144.8 percent improvement with just one setting! Let's make sure it is doing a proper multi-read of 16. We know the controller is capable of DMA2 level support (mdma2), and in order to turn on DMA support, we will need to use the d1 setting and the -X setting to set the proper DMA level. While we are at it, lets set the unmask IRQ setting, so IO is enhanced. All right! That's much better! A 14.92/4.51*100 = 330.8 percent improvement in throughput! On this one's companion drive, /dev/hda, (from a different manufacturer), we were able to get it from 2.15 MB/sec to a whopping 25.7 MB/sec (that's over 1000 percent improvement)! You will need to add the settings to your startup scripts (usually put it in the database start or Oracle kernel configuration script you use) since they will not be retained between reboots. In addition, you should add the -K flag to retain the settings between soft resets of the drive. Even if you are only using the ATA drives for system software and swap area, you can see where tuning them using hdparm can make a significant performance difference for your system. Click to buy the book, "Oracle disk I/O tuning," by Mike Ault. About the authorMike Ault is a SearchOracle.com expert and a senior Oracle consultant with Burleson Consulting, and one of the leading names in Oracle technology. The author of more than 20 Oracle books and hundreds of articles in national publications, Mike Ault has five Oracle Masters Certificates and was the first popular Oracle author with his landmark book "Oracle7 administration and management." Mike also wrote several of the "Exam Cram" books, and enjoys a reputation as a leading author and Oracle consultant. Ask Mike a question today!
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Oracle Development Solutions - SQL, J2EE, XML, SOA |
| About Us | Contact Us | For Advertisers | For Business Partners | Site Index | RSS |
|
|
|
|||||||