XFS fragmentation on file append
Stewart Smith
stewart at flamingspork.com
Wed Apr 23 06:48:54 CDT 2014
Keyur Govande <keyurgovande at gmail.com> writes:
> I spent some more time figuring out the MySQL write semantics and it
> doesn't open/close files often and initial test script was incorrect.
MySQL will open/close files depending on some configuration parameters
and the number of tables that exist/are open/are in the working set.
If InnoDB tables, it's innodb_max_open_files (IIRC it's named that, or
something similar). If you have less than that number of tables and
innodb_file_per_table=true, then you'll never close. If you have the max
set to 10 times the working set of active tables, you're going to be
opening and closing files a lot - it's basically a LRU of unused tables
(open files).
> It uses O_DIRECT and appends to the file; I modified my test binary to
> take this into account here:
> https://gist.github.com/keyurdg/54e0613e27dbe7946035
You can also make it not use O_DIRECT, but that's generally a bad idea :)
--
Stewart Smith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://oss.sgi.com/pipermail/xfs/attachments/20140423/816b7297/attachment.sig>
More information about the xfs
mailing list