Hi all,
I have found the reason to the bad fsync performance using ext4 on SSD with proxmox. The reason is caused by using the mount option discard which has the effect that for each commit a trim is performed. This extra trim action will dramatically slow down your fsync performance.
Using mount option discard: fsync -> 284.14
Without mount option discard: fsync ->1428.61
Since trim is crucial to maintain performance use this instead:
Enjoy your new speedy SSD
I have found the reason to the bad fsync performance using ext4 on SSD with proxmox. The reason is caused by using the mount option discard which has the effect that for each commit a trim is performed. This extra trim action will dramatically slow down your fsync performance.
Using mount option discard: fsync -> 284.14
Without mount option discard: fsync ->1428.61
Since trim is crucial to maintain performance use this instead:
Code:
1) drop mount option discard
2) do the following instead:
- create this file '/etc/cron.daily/fstrim'
- containing this (assuming SSD partitions on / and /var/lib/vz):
#!/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin
ionice -n7 fstrim -v /
ionice -n7 fstrim -v /var/lib/vz
3) chmod a+x /etc/cron.daily/fstrim