Jon*_*her 4 ssd trim samsung scheduler
三星 Evo 850 http://www.samsung.com/semiconductor/minisite/ssd/product/consumer/850evo.html
以下帖子建议使用 Ubuntu 16.04 和 850 EVO,默认启用 TRIM。
然而,
cat /etc/cron.weekly/fstrim
Run Code Online (Sandbox Code Playgroud)
返回
#!/bin/sh
# trim all mounted file systems which support it
/sbin/fstrim --all || true
Run Code Online (Sandbox Code Playgroud)
我在别处读到,最新的 Ubuntu 版本需要什么 SSD 优化?,David Ambarsumov 的回答,即 16.04 没有 -all 选项。那么每周的 TRIM 会起作用吗?我知道引用是 fstrim-all 不可用,但我不知道这是否相同以及 fstrim --all 是否按预期工作(这可能只是我的紧张和对这方面缺乏了解) .
其次,我在别处读到应该在 /etc/fstab 中设置 noatime 选项。这仍然相关吗?我目前在该文件中看不到 noatime 或 relatime?
最后,我读到,我认为这是旧的,应该选择一个不同于默认的调度程序。这是真的吗,如果是,是哪一个?
谢谢你的时间!!!很多关于 SSD 的信息都是过时的,Linux 和 Ubuntu 在那段时间取得了很大的进步,所以有点混乱。
fstrim支持--allUbuntu 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).
Run Code Online (Sandbox Code Playgroud)
默认情况下,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
...
Run Code Online (Sandbox Code Playgroud)
(Life_Curve_Status并且SSD_Life_Left有百分比值:当 SSD 下降到 20% 或 10% 以下时,您将需要更换 SSD。如果可以,请在运行前将终端设置为 132 列smartctl。)
最后,请记住,850 EVO 是来自信誉良好的制造商的高品质昂贵 SSD。它是有弹性的,会持续很长时间,可能比任何旋转盘都长。三星承认它会有所帮助,你唯一可以做的就是稍微过度配置它,也就是说,在分区时留下大约 5% 的未分区空间。(这将使内部重新映射/垃圾收集算法更有效地工作;如果您决定这样做,那么仅当 SSD 是新的或在全盘修剪或安全擦除之后才这样做,以便过度配置的空间完全由块组成已知未使用。)
| 归档时间: |
|
| 查看次数: |
7560 次 |
| 最近记录: |