在Ubuntu 16.04上,使用三星850 EVO SSD,是否需要任何后期配置?

三星Evo 850 http://www.samsung.com/semiconductor/minisite/ssd/product/consumer/850evo.html

以下post表明,对于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 –all按预期工作(这可能只是我的紧张和缺乏对这方面的理解) 。

其次,我在别处读到应该在/ etc / fstab中设置noatime选项。 这仍然是相关的; 我目前在该文件中没有看到noatime或relatime?

最后,我读了,我认为这是旧的,应该选择不同于默认的调度程序。 这是真的,如果是的话,哪一个?

谢谢你的时间!!! 关于固态硬盘的大部分信息已经过时了,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]  Discard unused blocks on a mounted filesystem. Options: -a, --all trim all mounted filesystems that are supported -o, --offset  the offset in bytes to start discarding from -l, --length  the number of bytes to discard -m, --minimum  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使用smartctl (如果需要,使用sudo apt-get install smartmontools安装它)来检查Life_Curve_StatusSSD_Life_LeftLifetime_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_StatusSSD_Life_Left具有百分点值:当它们降低到20%或10%以下时,您将需要更换SSD。如果可以,请在运行smartctl之前将终端smartctl 132列。)

最后,请记住850 EVO是来自信誉良好的制造商的高品质昂贵的SSD。 它具有弹性,可以使用很长时间,可能比任何旋转盘都长。 你唯一可以做的就是三星承认它会有所帮助,就是过度配置它,也就是说,当分区留下大约5%的未分区空间时。 (这将使内部重映射/垃圾收集算法更有效地工作;您决定这样做,然后仅在SSD是新的时或在完全盘修整或安全擦除之后才执行此操作,以便过度配置的空间完全由块组成已知不使用。)