Ext4 supports O_DIRECT or O_DSYNC or F_SYNC?

We have a few servers running on Centos and Red Hat. Can someone tell us which flush method is good and gives more performance for ext4 data drives?

Can you please suggest which flush method would be recommended for ext4 data drives?

Hi Naresh, when in doubt start with O_DIRECT; this avoids double-buffering by the OS and usually performs better. However the best way to determine is to run some benchmarks (e.g. with sysbench) with all different options in your specific environment.

1 Like

Thanks @Ivan_Groenewold

I will try to do tests and will compare them accordingly.