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: pgpa_3iRU5jXh.pgp
Description: PGP signature


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux