三星Evo 850 http://www.samsung.com/semiconductor/minisite/ssd/product/consumer/850evo.html
以下文章建议使用Ubuntu 16.04和850 EVO,默认情况下启用TRIM。
然而,
cat /etc/cron.weekly/fstrim
退货
#!/bin/sh
# trim all mounted file systems which support it
/sbin/fstrim --all || true
我在其他地方读过,最新的Ubuntu版本需要哪些SSD优化?,David Ambarsumov的答案是16.04没有-all选项。那么,TRIM每周会工作吗?我知道报价是fstrim-all不可用,但我不知道这是否相同以及fstrim是否都按预期工作(这可能是我对此领域的紧张和缺乏理解) 。
其次,我在其他地方读到,应该在/ etc / fstab中设置noatime选项。这仍然有意义吗?我目前在该文件中看不到noatime或relatime吗?
最后,我读了一下,而且我认为这太旧了,应该选择与默认调度程序不同的调度程序。这是真的吗?如果是,那是真的?
谢谢你的时间!!!关于SSD的许多信息都是过时的,并且Linux和Ubuntu在那段时间取得了很大进步,因此有点令人困惑。
fstrim
--all
在Ubuntu 16.04上支持该选项。
$ lsb_release -dirc
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial
$ fstrim --help
Usage:
fstrim [options] <mount point>
Discard unused blocks on a mounted filesystem.
Options:
-a, --all trim all mounted filesystems that are supported
-o, --offset <num> the offset in bytes to start discarding from
-l, --length <num> the number of bytes to discard
-m, --minimum <num> the minimum extent length to discard
-v, --verbose print number of discarded bytes
-h, --help display this help and exit
-V, --version output version information and exit
For more details see fstrim(8).
默认情况下,Ubuntu 16.04使用挂载所有文件系统relatime
。这比noatime
只添加少量写入操作时要好得多。
不要搞乱I / O调度程序。
为了安心,你可以使用smartctl
(与安装它sudo apt-get install smartmontools
的时候如果需要的话),以时间来检查Life_Curve_Status
,SSD_Life_Left
以及Lifetime_Writes_GiB
:
$ sudo smartctl --all /dev/sda
...
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
...
194 Temperature_Celsius 0x0022 047 063 000 Old_age Always - 47 (Min/Max 21/63)
...
230 Life_Curve_Status 0x0013 100 100 000 Pre-fail Always - 100
231 SSD_Life_Left 0x0013 100 100 010 Pre-fail Always - 0
...
241 Lifetime_Writes_GiB 0x0032 000 000 000 Old_age Always - 388
...
(Life_Curve_Status
并且SSD_Life_Left
具有以百分比为单位的值:当SSD降低到20%或10%以下时,您将需要更换SSD。如果可以的话,请在运行之前将终端132列设置为smartctl
。)
最后,请记住,850 EVO是来自著名制造商的高质量昂贵的SSD。它是有弹性的,并且会持续很长时间,可能比任何旋转的光盘都更长。三星承认唯一可以做的事情是对它进行一些过度设置,也就是说,当分区留下大约5%的未分区空间时。(这将使内部重新映射/垃圾收集算法更有效地工作;您决定先执行此操作,然后仅在新的SSD或完全碟片修剪或安全擦除之后再进行操作,以便超额空间完全由块组成已知未使用。)
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句