Filesystems: Difference between revisions
m the mentioned example is not part of the quote or relevant in the rest of the article |
m →SSD TRIM support: don't mention filesystem specific mount options |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 64: | Line 64: | ||
}; | }; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== Tips and tricks == | |||
=== 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| | |||
<nowiki> | |||
fileSystems."/".options = [ "noatime" ]; | |||
</nowiki> | |||
}} | |||
= References = | = References = | ||
<references /> | <references /> | ||