If I put Linux on my machine, what steps should I take so that it ONLY tries to access the hard drive when I physically work on it. i.e., the grinding sounds are annoying me when I try to fall asleep.
You can use iotop (preferably with a large interval and the
-o option) to find out which program is writing to disk.
If you have enough RAM, you may also want to turn off swap with:
$ sudo swapoff -a
, or permanently by removing the swap line from
The typical culprits for I/O in the night are:
- cron. This daemon allows one to schedule commands (like "update at 2am" or "clear sessions every 30 minutes"). Have a look at /etc/cron* and use
crontab -e(there is one for each user) to find out what is being executed, and when, and remove the offending lines. Since most of the preconfigured cronjobs are indexing in some way, you can safely turn cron off if you don't depend on any action being scheduled.
- logfiles Have a look at
/var/log. If some file is constantly growing in there, consider reducing the program's log level. If you don't care about logs, turn them off in the programs and/or mount a memory filesystem at
/var/log. You can find out which files change with what with
$ sudo tail -f /var/log/*
- On-disk temporary files. Usually, that means some process is writing to
/tmp(you can find out with iotop). Consider mounting a memory-based filesystem (
tmpfs) on there if you have enough RAM and the size of these files is limited.
You may also be interested in powertop, which shows which programs are waking up your CPU. If something unexpected is in there, consider filing a bug against the program.
On the hardware side, you can get a silent disk (an SSD has no movable parts, so it's a good candidate) or put the HDD to standby manually. hdparm (particularily the
-y options) is a good tool for that.
Get a Solid State Drive (SSD), they contain no moving parts. That is the only guarantee.
You can try to use the
hdparm command, it can change the HDD status. But not all HDDs suport it. Take a look at this page at the -s -y -Y or -z parameters.
You could also try alternatives:
- buy one SSD
- Search how to make your computer less noisier (using foam inside it, in very specific places, if you know how to build a computer and dissipate the heating
- Change your HDD for another one, quieter (like the ones used in notebooks)
It might take a little work, but you might consider setting up a USB or livecd boot, and manually setting your /home location to your hard drive. Periodically remaster your livecd with something like remastersys for better efficiency.
You might also want to consider some other witchcraft with unionfs
All that being said, grindy hard disks are BAD BAD BAD BAD. You might want to have them checked out.
a) those file systems that don't write directly to the disk
b) get a good hdd, google SPCR and look at their silent hdd list
c) don't listen, you don't need an SSD, especially for a linux box for downloads.
My NAS is 4x WD caviar green, they are barely audible although they're running 24/7 due to downloads.
Samsung Ecogreen or WD caviar green . easy green = silent (wtf).
Use a separate low-power box in a separate room for background tasks and only power up your main machine when you use it. The power savings offset the initial investment within a year.
My broom closet box is an Atom (fanless design, so less chance for failure) that has gained more and more harddisks as my storage requirements expanded -- but it still uses only a third of the power of my desktop machine, saving me 250 EUR/year. The harddisks are in a RAID6 with hot-swap bays, so I can handle disk failures easily, and the desktop runs a weekly backup to the storage array.
Isolate the drives from the chassis so that it doesn't act as a soundboard for vibrations. You can buy elaborate noise-isolating drive enclosures or simple rubber mounts or grommets for this purpose, but the most effective solution I know of is this one you can make by yourself using just a piece of elastic cord. I've used it, and it makes an amazing difference.
There is a setting somewhere that allows you to click a box to "spin down HDDs when not in use" I know on Ubuntu 10-10 its in preferences somewhere.
I couldn't rememeber so I did some searching and found this link.
Depending on your flavor or linux it may be helpful
There seems to be a file you can edit as well.
If it is grinding, you may have a bigger problem :)