GET 24/7 LIVE HELP NOW

Announcement

Announcement Module
Collapse
No announcement yet.

default innodb_flush_method

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • default innodb_flush_method

    The default innodb_flush_method in mysql is fdatasync ( http://dev.mysql.com/doc/refman/5.6/...b_flush_method ) however we can not see it in show variables command, how do i know which is current flush method?

    mysql> show global variables like 'innodb_flush_method';
    +---------------------+-------+
    | Variable_name | Value |
    +---------------------+-------+
    | innodb_flush_method | |
    +---------------------+-------+

    Also explicitly adding innodb_flush_method=fdatasync in my.cnf gives error

    [ERROR] InnoDB: Unrecognized value fdatasync for innodb_flush_method
    [ERROR] Plugin 'InnoDB' init function returned error.

    We can configure innodb_flush_method=O_DIRECT or innodb_flush_method=O_DSYNC and the same we can see in show variables command

    mysql> show global variables like 'innodb_flush_method';
    +---------------------+----------+
    | Variable_name | Value |
    +---------------------+----------+
    | innodb_flush_method | O_DIRECT |
    +---------------------+----------+

    Why we can not set innodb_flush_method=fdatasync in my.cnf?

  • #2
    Hi,

    If you can see in that document (http://dev.mysql.com/doc/refman/5.6/...b_flush_method)

    "Formerly, a value of fdatasync also specified the default behavior. This value was removed, due to confusion that a value of fdatasync caused fsync() system calls rather than fdatasync() for flushing. To obtain the default value now, do not set any value for innodb_flush_method at startup."

    So when you are not seeing any value for that parameter means, default is set which is fsync(). Even in that document they have mentioned couple of time like
    "Note that InnoDB uses fsync() instead of fdatasync()

    Regards,

    Comment

    Working...
    X