網頁

2016年8月26日 星期五

EeePC 之 SSD 優化

安裝偵測工具
# pacman -Ss sysstat
# pacman -S sysstat
# iotop -oPa
# iostat -d 3 3

查詢磁碟分割是否對齊,對齊返回0
# blockdev --getalignoff /dev/sda1
I/O Scheduler 使用 NOOP
# cat /sys/block/sda/queue/scheduler
noop deadline [cfq]
# echo noop > /sys/block/sda/queue/scheduler // 不能使用 vi 編輯
# cat /sys/block/sda/queue/scheduler
[noop] deadline cfq
設定開機使用 NOOP
# vi /boot/syslinux/syslinux.cfg
APPEND root=/dev/sda1 elevator=noop

關閉 journal
# tune2fs -O "^has_journal" /dev/sda1

/etc/fstab 說明
discard: 使用 TRIM 指令
noatime: Do not update inode access times on this filesystem (e.g, for faster access on the news spool to speed up news servers).
relatime: Update inode access times relative to modify or change time. Access time is only updated if the previous access time was earlier than the current modify or change time. (Similar to noatime, but doesn't break mutt or other applications that need to know if a file has been read since the last time it was modified.)
data=ordered: This is the default mode. All data is forced directly out to the main file system prior to its metadata being committed to the journal.
data=writeback: Data ordering is not preserved - data may be written into the main filesystem after its metadata has been committed to the journal.
journal_checksum: Enable checksumming of the journal transactions.
journal_async_commit: Commit block can be written to disk without waiting for descriptor blocks.

$ cat /etc/fstab
#
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda1
#UUID=f46258e7-e1ef-4127-a93e-ed8962b14f90 /         ext4       rw,relatime,discard,data=ordered 0 1
#UUID=f46258e7-e1ef-4127-a93e-ed8962b14f90 /         ext4       rw,noatime,discard,data=ordered 0 1
UUID=f46258e7-e1ef-4127-a93e-ed8962b14f90 /         ext4       rw,relatime,discard,journal_checksum,journal_async_commit,data=ordered 0 1
#UUID=f46258e7-e1ef-4127-a93e-ed8962b14f90 /         ext4       rw,noatime,discard,data=writeback 0 1
#UUID=f46258e7-e1ef-4127-a93e-ed8962b14f90 /         ext4       rw,noatime,discard 0 1
tmpfs /tmp tmpfs size=1G,noatime,mode=1777 0 0

做了上述的動作,但其實也分不出那些有用,那些沒用

沒有留言:

張貼留言