參考網頁:
Solid State Drive (SSD): optimize it for Ubuntu 14.04, Linux Mint 17.1 and Debian – Easy Linux tips project
永遠的真田幸村: Linux平台使用SSD必讀 (範例為Ubuntu) – yblog.org
修改方式:
1. 備份原 /etc/fstab
$ sudo cp /etc/fstab /etc/fstab.$(date +%F)
[@more@]2. 修改 /etc/fstab
這裡 120G SSD 的分割是
92G / 根目錄
2G swap
25G /windows 備份區
# vim /etc/fstab
加入紅字的部份
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=1bfa9571-c711-4d02-8a65-a61e6c2f790f / ext4 noatime,nodiratime,discard,errors=remount-ro 0 1
# /windows was on /dev/sda2 during installation
UUID=85E0-42F0 /windows vfat utf8,umask=007,gid=46 0 1
# swap was on /dev/sda3 during installation
UUID=324d38ce-b71d-4872-82a3-bb262397c221 none swap sw 0 0
# 將 /tmp 以 tmpfs 形式掛上
tmpfs /tmp tmpfs nodev,nosuid,noexec,mode=1777 0 0
tmpfs /var/spool tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/log tmpfs defaults,noatime,mode=0755 0 0
3. 將 Firefox 瀏覽器的暫存檔指到 /tmp
開啟 Firefox 於瀏覽網址輸入
about:config
按我發誓,我一定會小心的!
於偏好設定名稱按 右鍵->新增->字串
新增 browser.cache.disk.parent_directory
數值設定 /tmp
4. 改用 I/O Scheduler 提供系統效率
$ sudo cat /sys/block/sda/queue/scheduler
在 Ubuntu 12.04 顯示的可能是:
noop deadline [cfq]
修改 /etc/default/grub 設定檔
$ sudo vim /etc/default/grub
將
#GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”
改成
GRUB_CMDLINE_LINUX_DEFAULT=”elevator=deadline quiet splash”
5. 讓設定生效
$ sudo update-grub
Generating grub.cfg …
Found linux image: /boot/vmlinuz-3.2.0-74-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-74-generic-pae
Found linux image: /boot/vmlinuz-3.2.0-67-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-67-generic-pae
Found memtest86+ image: /boot/memtest86+.bin
done
6. 重新啟動電腦
$ sudo reboot