MSI Wind Disk usage
The latest version of Hardy Heron seems to do a lot of disk access resulting in a clicking noise on the Wind. This seems to be partly to do with the energy saving available from the drive and continual parking of the heads and partly that the swapping in and out is set too agressively.
I have played with both and it has given some improvement possible at the cost of power consumption
Power Management: The first step is to make power management less aggressive. This one hopes has the following results:
- the drive will park its heads a lot less thus the drive will have substantially prolonged life.
- the drive will be warmer (the right underside of the Wind may heat up a bit).
- battery span will be reduced but how much is not known.
To try the setting without rebooting run:
sudo hdparm -B 192 /dev/sda
To make a permanent change one needs to modify a setup file so open a terminal and type:
sudo gedit /etc/hdparm.conf
At the end of the file, paste the following:
hdparm -B 192 /dev/sda
The value in the above line can be any where from 1 – 254 unless you want to switch power management off completely when you should use 255 instead of 192. It will make the drive run slighly warmer and use slightly more power but probably better than mad head parking. I currently have 255 to switch power management off completely.
The changes to power management seem to be an important part of getting suspend to work.
Swap file management:
The second way to reduce disk usuage is to reduce the use of the swap file. There is a parameter called swapiness which is normally reduced on netbooks using solid state memory which wears out faster than a hard drive! See Performance tuning with ”swappiness” Swappiness controls the tendency of the kernel to move processes out of physical memory and on to the swap disk. As disks are much slower than RAM, this can lead to slower response times for system and applications if processes are too aggressively moved out of memory and wear on solid state disks.
- swappiness can have a value of between 0 and 100
- swappiness=0 tells the kernel to avoid swapping processes out of physical memory for as long as possible
- swappiness=100 tells the kernel to aggressively swap processes out of physical memory and move them to the swap cache
- Ubuntu uses a default setting of swappiness=60
Reducing the default value of swappiness will actually improve overall performance for a typical Ubuntu desktop installation. There is a consensus that a value of swappiness=10 is recommended for a desktop and 60 for a server.
To check the swappiness value
For a temporary change (lost on reboot) with a swappiness value of 10:
sudo sysctl vm.swappiness=10
To make a change permanent you must edit a configuration file:
sudo gedit /etc/sysctl.conf
Search for vm.swappiness and change its value as desired. If vm.swappiness does not exist, add it to the end of the file like so:
Save the file and reboot.