Working on performance optimization project (not directly MySQL related) we did a test - creating 100 files writing 4K in the random file for some time and when checking the read speed on the files we end up with, compared to just writing the file sequentially and reading it back.
The performance difference was huge - we could read single file at 80MB/sec while fragmented files only deliver about 2MB/sec - this is a massive difference.
The test was done on EXT3 and it looks like it does not do very good job preventing file fragmentation for large amount of growing files.
It would be interesting to see how other filesystems deal with this problem, for example XFS with delayed allocation may be doing better job.
I also would like to repeat the test with MySQL MyISAM tables and see how bad the difference would be for MySQL but I would expect something along those lines.
Interesting enough it should not be …
[Read more]