Rate This Document
Findability
Accuracy
Completeness
Readability

Disabling Doublewrite of the MySQL Database

After modifying the [mysqld] parameters, restart the database for the modification to take effect.

  1. Open the database configuration file. In this example, the configuration file path is /etc/my.cnf.
    1
    vim /etc/my.cnf
    
  2. Press i to enter the insert mode, find the following parameters, and modify them. If the following parameters do not exist, add them to the file.
    [mysqld]                 
    innodb_flush_method=O_DIRECT
    innodb_doublewrite=0
  3. Press Esc, type :wq!, and press Enter to save the file and exit.
  4. Restart the database for the configuration to take effect.
    1
    service mysql restart
    

    The command used to start the database varies depending on the database installation mode. For details, see MySQL Installation Guide.

  5. Verify that the atomic write feature is successfully configured.
    1. Run the following command to query the atomic write status:
      1
      hioadm atomicwrite -d nvme0n1
      

      If the following information is displayed, atomic write has been enabled.

    2. Check that the doublewrite and flush_method parameters are successfully modified in the database.
      1
      2
      show variables like '%flush_method%';
      show variables like '%doublewrite%';