| Hard Drive Tweaking Guide |
Davion's HD-Tweaking mini-guide v. 1.1.0 Okay, first, a warning. This is by no means 'safe' for everyone. I can't guaruntee the safety of your files if you fiddle around with these settings, so I suggest you take your time and read more than just this guide before you try anything. With that being said, on to the fun stuff.
hdparm hdparm is the utility that is used to control the settings of your hard drive, both in the kernel and in the drive itself. It has a _very_ thorough man page written, which you should read before actually doing anything in this guide. Much of what is in this guide is covered in various places in that man page. This guide is an attempt to summarize the various settings that tend to be off by default, and what you can do to turn them on safely so as to increase the performance of your hard drive. Have you read the hdparm manpage yet? (man hdparm) For starters, you're going to want to know how to get the current settings your drive is using. The command is simply: /sbin/hpdarm /www.hda you would subsitute /www.hda with the drive you wanted to look at. /www.hda is the first hard drive by default, and since I only have one hard drive, that's what you'll see me using as an example. You'll also want to know how to get information on your drive's actual capabilities. This is important later on. The command for this is: /sbin/hdparm -i /www.hda It will put out some information like this: /www.hda:
Model=QUANTUM BIGFOOT_CY4320A, FwRev=A03.0500, SerialNo=16470872 Most of this is fairly useless to you. The value you're looking for in all of this is the MaxMultSect value. As you can see above, mine is 32. Have you read the hdparm manpage yet? C'mon, I know you want to. Now, these tweaks only work if you're using a modern IDE hard drive. SCSI folks, you're out of luck. I'm sure there are tweaks out there for SCSI drives, but as I don't have a SCSI system, I have no method for testing any of them. With that being said, the first thing you can try is turning on 32-bit access. If you have an IDE hard drive made within the past couple of years, this should work just fine. The command is: /sbin/hdparm -c 1 /www.hda The number 1 turns it on, the number 0 turns it off. It is usually off by default. You can test your hard drive's performanace both before and after setting these various commands by typing: /sbin/hdparm -T -t /www.hda This will run a series of tests and give you some useful output as to how fast your hard drive is transferring data. Assuming everything works out fine (no strange lock ups or grinding noises coming from your drive), the next thing to turn on is your drive's write-cache. Not all drives support this, but most modern ones do. The command is: hdparm -W 1 /www.hda Once again, make sure to test/benchmark your drive. If you don't notice any improvement after running serveral tests in a row (I usually run five in a row to get a nice average), then switch the setting back off. It's safer to leave it off than on, and there's no need to turn it on if you don't get any benefit from it. The last setting you can easily tweak on all IDE drives involves the information we gathered using the -i parameter above. The MaxMultSect value from before tells us what number we need to put into the following command. Mine is 32 (and it's 32 on a lot of drives, apparently), so that's what I'm using here. When you examine the current settings of the drive using /sbin/hdparm /www.hda This setting is the 'multcount' setting. I believe it defaults to 0, or 'off'. hdparm -m 32 /www.hda Now, once again, go through and make sure that everything works like it should. Run several -T -t benchmarks, try copying and moving files around, do large transfers of information, etc... Keep in mind that some of these settings can result in massive file system corruption (i.e. they can wreck your partition), so be careful when playing around with the values for them. None of these settings are saved over a reboot. You'll have to add the appropriate commands to your /etc/rc.d/rc.local file to be sure they're run automatically on startup. I suggest letting your system run for well over a week with these settings before putting them into your rc.local file. You'll want to make sure everything is working fine before you make something like this permanent.
Last Updated: 5/21/99 Having trouble? Got questions? Require further assistance? If so please feel free to visit our Help Forums and ask the experts! |
|
Copyright © 1997 - 2012 Private World Domination Inc. All rights reserved. |
|