4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

SSDのためのLinux設定

Last updated at Posted at 2015-09-05

自分用メモ

1 ファイルシステムはxfs
2 swapは使わない
3 アクセスタイムの記録をしない。→noatime
4 Trimを使う。→discard
5 一時ファイルをRAMディスク上へ持っていく。→tmpfs
6 ブラウザのキャッシュをRAMディスク上へ持っていく。

1と2はパーティション作成の時。
3〜5は/etc/fstabに追記する。
6は5が終わったあとでシンボリックリンクを貼る。
僕はchromium派なので
$ cd ~/.cache/chromium
$ rm -rf ./Cache
$ ln -s /tmp/ ./Cache

(以下今のfstabの設定)
※マウントオプションはdefaultsとかでいいみたいだけど、動かなくなったりしたら怖いのでパーテション作成の時のものにnoataimeとdiscardを追記している。
※/var/tmpはtmpfsにマウントしてはいけないという話もあるが,今のところ問題なく動いているのでよしとする。

# /dev/sda2
UUID=1f7c220c-d69a-49d1-96cc-18e5deb1beab / xfs rw,relatime,attr2,inode64,noquota,noatime,discard 0 1

# /dev/sda1
UUID=AD0C-6837 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro,noatime,discard 0 2

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
tmpfs /var/log tmpfs defaults,noatime,mode=0755 0 0

4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?