• Marko Mäkelä's avatar
    MDEV-28111 Redo log writes are being buffered on Linux for no good reason · c4c88307
    Marko Mäkelä authored
    In commit 685d958e (MDEV-14425)
    we ended up not enabling O_DIRECT writes on the redo log
    by default, because back then, it was slightly slower on
    some systems.
    
    With commit a635c406 (MDEV-27774)
    the situation changed. A new test on a NVMe device shows 9%
    improvement in throughput and over 15% reduction of latency
    when O_DIRECT writes are enabled.
    
    With this change, all the following settings will use O_DIRECT
    on InnoDB data and log files:
    
    innodb_flush_method=O_DIRECT
    innodb_flush_method=O_DIRECT_NO_FSYNC
    innodb_flush_method=O_DSYNC
    
    Before MDEV-14425, log writes were always buffered on Linux.
    Between MDEV-14425 and this change, unbuffered log writes
    were only enabled for innodb_flush_method=O_DSYNC.
    c4c88307
os0file.cc 101 KB