Filesystems: Difference between revisions
Move ssd trim information from nixos-generate-config wiki page |
→SSD TRIM support: reflect current defaults and best practices |
||
| Line 69: | Line 69: | ||
=== SSD TRIM support === | === SSD TRIM support === | ||
On NixOS, [https://en.wikipedia.org/wiki/Trim_(computing) TRIM] support is enabled by default by the {{nixos:option|services.fstrim.enable}} option. This periodically discards unused blocks on supported storage devices, helping to maintain SSD performance over time. | |||
The trimming schedule is controlled by the {{nixos:option|services.fstrim.interval}} option. Continuous trimming (as set by the <code>discard</code> or <code>discard=sync</code>) mount option is not recommended as it can negatively impact SSD performance. | |||
Additionally, setting <code>noatime</code> can reduce the number of disk writes and can improve system performance. | |||
{{file|/etc/nixos/configuration.nix|nix| | {{file|/etc/nixos/configuration.nix|nix| | ||
<nowiki> | <nowiki> | ||
fileSystems."/".options = [ "noatime | fileSystems."/".options = [ "noatime" ]; | ||
</nowiki> | </nowiki> | ||
}} | }} | ||
= References = | = References = | ||
<references /> | <references /> | ||