TRIM/Discard schedule vs discard

baalkor

New Member
Feb 24, 2025
13
0
1
Hello,

We're using an LVM on top of iSCSI presented by a SAN. We've seen that the de-duplication factor sold by the vendor (Dell PowerStore) promised to be 5:1 is definitely not reached.
However, the vendors told us that we might need to enable TRIM for disk configuration and either trigger fstrim or using /etc/fstab discard option to help reducing the de duplication rate to go above our 1.5:1.

- In my understanding, the TRIM was more interesting regarding thin provisioned drive and had little to do with de duplication, am I correct ?
- If I'm wrong, the advertised trim schedule by fstrim man page is once per week is enough, is it correct in our scenario (~200 VMs) ?
- I'm not able to tell which method is better than the other (discard vs fstrim.timer), do you have some guidance ? Since I assume that if all timer triggering all together at the same time ,can render the storage quite slow. What would be the best option ?
- On some big file server, it made FS access very very slow, is discard option better in case ?

Thanks for your time

Appreciate your help.
 
I prefer the timer approach. I wrote a little bit about it here: https://gist.github.com/Impact123/3dbd7e0ddaf47c5539708a9cbcaab9e3#discard
INI:
# systemctl cat fstrim.timer
[Timer]
OnCalendar=weekly
AccuracySec=1h
Persistent=true
RandomizedDelaySec=100min
As you can see here the exact execution time isn't fixed so it probably won't be the case that all guests will be trimming at the same time.
If your data changes a lot a daily timer can be considered. I'm guessing the garbage/scratch space in the LV cannot be deduplicate properly.
Disclaimer: I don't use iSCSI or a SAN.
 
Last edited:
  • Like
Reactions: _gabriel