Samsung 830 SSD EXT4 Performance & Mount Options

M

moefan

Guest
Interested in what others are seeing for performance and their mount options for ext4. Also has anyone tested fstrim with ext3 (may need a new kernel)? Here are a few of my tests, barrier=0 dramatically increases performance. Also tried a handful other options with no noticeable impact, is barrier=0 safe?

root@proxmox1:~# mount /dev/sda1 -o discard,noatime,nodiratime /boot
root@proxmox1:~# pveperf /boot
CPU BOGOMIPS: 52799.95
REGEX/SECOND: 1525293
HD SIZE: 0.48 GB (/dev/sda1)
BUFFERED READS: 170.33 MB/sec
AVERAGE SEEK TIME: 0.17 ms
FSYNCS/SECOND: 245.23

root@proxmox1:~# mount /dev/sda1 -o noatime,nodiratime /boot
root@proxmox1:~# pveperf /boot
CPU BOGOMIPS: 52799.95
REGEX/SECOND: 1510231
HD SIZE: 0.48 GB (/dev/sda1)
BUFFERED READS: 170.33 MB/sec
AVERAGE SEEK TIME: 0.17 ms
FSYNCS/SECOND: 243.60

root@proxmox1:~# mount /dev/sda1 -o discard,barrier=0,noatime,nodiratime /boot
root@proxmox1:~# pveperf /boot/
CPU BOGOMIPS: 52799.95
REGEX/SECOND: 1511311
HD SIZE: 0.48 GB (/dev/sda1)
BUFFERED READS: 170.33 MB/sec
AVERAGE SEEK TIME: 0.18 ms
FSYNCS/SECOND: 2645.28

root@proxmox1:~# mount /dev/sda1 -o barrier=0,noatime,nodiratime /boot
root@proxmox1:~# pveperf /boot
CPU BOGOMIPS: 52799.95
REGEX/SECOND: 1465755
HD SIZE: 0.48 GB (/dev/sda1)
BUFFERED READS: 170.33 MB/sec
AVERAGE SEEK TIME: 0.17 ms
FSYNCS/SECOND: 3982.58
 
is barrier=0 safe?

As 'man mount':

This enables/disables the use of write barriers in the jbd code. barrier=0 disables, barrier=1 enables. This also requires an IO stack which can support barriers, and if
jbd gets an error on a barrier write, it will disable again with a warning. Write barriers enforce proper on-disk ordering of journal commits, making volatile disk write
caches safe to use, at some performance penalty. If your disks are battery-backed in one way or another, disabling barriers may safely improve performance. The mount
options "barrier" and "nobarrier" can also be used to enable or disable barriers, for consistency with other ext4 mount options.
 
Here are a couple ext3 tests, it seems odd that FSYNCS are so low on ext4 without barrier=0 but FSYNCS are good on ext3 without that option.

root@proxmox1:~# mount /dev/pve/test -o noatime,nodiratime /mnt/
root@proxmox1:~# pveperf /mnt
CPU BOGOMIPS: 52800.10
REGEX/SECOND: 1470016
HD SIZE: 7.87 GB (/dev/mapper/pve-test)
BUFFERED READS: 256.80 MB/sec
AVERAGE SEEK TIME: 0.08 ms
FSYNCS/SECOND: 3023.28

root@proxmox1:~# mount /dev/pve/test -o noatime,nodiratime,barrier=0 /mnt/
root@proxmox1:~# pveperf /mnt/
CPU BOGOMIPS: 52800.10
REGEX/SECOND: 1406955
HD SIZE: 7.87 GB (/dev/mapper/pve-test)
BUFFERED READS: 256.87 MB/sec
AVERAGE SEEK TIME: 0.08 ms
FSYNCS/SECOND: 3045.24
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!