2012年10月20日星期六

ubuntu ssd alignment

1.Use Gparted to create the partition align with MiB. Insert 1 Mb in front of the partition.
2. start trim for SSD
sudo cp /etc/fstab /etc/fstab_backup
sudo gedit /etc/fstab

add noatime,nodiratime,discard,  in front of defaults.

something like that
#/ was on /dev/sda1 during installation
UUID=xxxxxxx-xxxxxx-xxxx  /           ext4     discard,noatime,nodiratime,defaults        0       2

or

 #/ was on /dev/sda1 during installation
UUID=xxxxxxx-xxxxxx-xxxx  /           ext4     discard,noatime,nodiratime,errors=remount-ro 0       1

move /tmp to tmpfs

add lines at the end of the /etc/fstab

tmpfs   /tmp       tmpfs   defaults,noatime,mode=1777   0  0
tmpfs   /var/spool tmpfs   defaults,noatime,mode=1777   0  0
tmpfs   /var/tmp   tmpfs   defaults,noatime,mode=1777   0  0

If you use notebook or desktop(not server). You can move log to tmpfs.
tmpfs   /var/log   tmpfs   defaults,noatime,mode=0755   0  0

restart or use 
sudo mount -oremount /

use about:config in firefox to move the cache to tmpfs

type in the URL in firefox
about:config

add
browser.cache.disk.parent_directory
set value to
/tmp

You can check via this command in URL
about:cache

沒有留言: