Filesystems: Difference between revisions

Pigs (talk | contribs)
SSD TRIM support: reflect current defaults and best practices
Pigs (talk | contribs)
m SSD TRIM support: don't mention filesystem specific mount options
 
Line 71: Line 71:
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.
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.
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.
Additionally, setting <code>noatime</code> can reduce the number of disk writes and can improve system performance.