Filesystems: Difference between revisions
Move ssd trim information from nixos-generate-config wiki page |
m →SSD TRIM support: don't mention filesystem specific mount options |
||
| (One intermediate revision by the same user not shown) | |||
| 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>, see <code>man mount(8)</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 /> | ||