There is a little-known setting, myisam_block_size in MySQL. This
affects the block size used in the indexes of MyISAM tables
stored in .MYI files on disc and in the key buffer.
The default value is 1k, this is possibly too small for best
performance on modern systems; in particular, many filesystems
used a bigger block size, so writing a single index block
requires a read followed by a write. Random reads are really slow
on hard discs (writes are mostly fast as they go into your
battery-backed raid controller which has lots of RAM).
I am currently in the process of experimenting with
myisam_block_size, and so far have determined the
following:
- myisam_block_size is settable only at server start time, either in my.cnf or on the command-line
- myisam_block_size only affects newly created tables or tables rebuilt using ALTER TABLE; existing MyISAM tables keep their old index block size and …