Sunday, February 20, 2011

Hard drive tuning

I just installed Ubuntu Netbook 10.10 on my girlfriend's netbook. I expected it to be slow, but not that slow. It's a ACER ASPIRE ONE 110 netbook, pretty simple, small SSD drive, low memory, though pretty light to carry around.

After googling around a bit, I found some common optimizations for netbooks. Here are the ones I actually did:

1. Remove journaling from ext4

Some previous research indicate that the overhead caused by journaling could be from 4% to 12%. While installing Ubuntu, you can disable the journaling right after the partitions are done (shift to a different tty and use following command). I did it another way around: boot to a live USB drive. The command is

sudo tune2fs /dev/sdN -O ^has_journal

and it removes the journaling feature flag.

2. Mount flags

"noatime" avoids updates on files' access time information for every read you perform on it. I basically prepended "noatime" to the mount flags on /etc/fstab. For more information on other special uses, check this page.

I also tweaked the initialization procedures for moving/removing unimportant stuff for the netbook's use, such as moving bluetooth initialization to user runtime, sudo checks, etc. Another thing that gave a good boost was setting vm.swappiness=20 on /etc/sysctl.conf, which will decrease swapout (throwing programs to the hard drive). This is somehow a dangerous trade-off: RAM is faster but this netbook has only 512MB, it'll be faster as long as you don't keep lots of applications open.

Cheers

0 comentários: