From: MARK CALLAGHAN Date: February 4 2009 10:45pm Subject: Re: innodb_flush_method List-Archive: http://lists.mysql.com/internals/36223 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Wed, Feb 4, 2009 at 2:16 PM, Ivan Novick wrote: > Hi there, > > The online documentation for this parameter indicates that by default innodb > will call fsync after writing to data files: > > http://dev.mysql.com/doc/refman/5.0/en/innodb-parameters.html#sysvar_innodb_ > flush_method > > However when looking through the code it appears that the calls to fsync > have been removed with the #ifdef UNIV_DO_FLUSH preprocessor variable which > is not defined on my system, thus making this configuration parameter > ignored . > > Am I missing something here, or is this documentation out of date / > misleading in indicating that all data is fsync'd to disk? > > Thanks for your help. > > Ivan Novick > Innodb calls fsync in os_file_flush() which does not reference UNIV_DO_FLUSH. os_file_flush() is called from fil_flush to try to fsync. Whether fsync is done is determined by the value of the my.cnf parameter innodb_flush_method and os_file_flush() looks at variables derived from that to figure out what to do. > > > -- > MySQL Internals Mailing List > For list archives: http://lists.mysql.com/internals > To unsubscribe: http://lists.mysql.com/internals?unsub=mdcallag@stripped > > -- Mark Callaghan mdcallag@stripped