Re: XFS fragmentation on file append

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Keyur Govande <keyurgovande@xxxxxxxxx> 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

Attachment: pgpUAfS54oI0T.pgp
Description: PGP signature

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs

[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux