Choosing the right InnoDB page size, part 1
Choosing the right InnoDB page size, part 1
How important is page size matter for an IO-bound load? For this note results are limited to a disk-based server. InnoDB uses a 16kb page and you can recompile it to use an 8kb page. After making a few changes to it, I was able to use 4kb pages but I am not sure if that is safe to use in production.
I used sysbench fileio to measure IOPs for different page sizes using an 8-core x86 server with several fast disks. The results for IOPs versus page size show that performance for 4kb pages is not much better than for 16kb pages. This seems reasonable for spinning disks, but the results will be different for Flash.
The sysbench command line:
Data from the tests lists IOPs by page size for 1 to 256 concurrent threads.
Results are very different for Flash. The ability to do 10,000+ IOPs also creates new performance problems. I will cover some of those problems in parts 2 and 3.
I used sysbench fileio to measure IOPs for different page sizes using an 8-core x86 server with several fast disks. The results for IOPs versus page size show that performance for 4kb pages is not much better than for 16kb pages. This seems reasonable for spinning disks, but the results will be different for Flash.
The sysbench command line:
for nt in 1 2 4 8 16 32 64 128 256; do
./sysbench --test=fileio --file-num=1 --file-total-size=64G --file-test-mode=rndrd \
--file-io-mode=sync --file-fsync-freq=0 --file-extra-flags=direct \
--num-threads=$nt --max-requests=0 --max-time=180 run
done
Data from the tests lists IOPs by page size for 1 to 256 concurrent threads.
sessions 1 2 4 8 16 32 64 128 256
1024-bytes 209 403 715 1111 1532 1940 2347 2746 2748
4096-bytes 206 400 703 1090 1497 1893 2285 2670 2670
8192-bytes 202 390 690 1063 1456 1835 2209 2573 2578
16384-bytes 196 380 667 1019 1381 1735 2067 2396 2402
32768-bytes 186 359 626 940 1254 1557 1837 2101 2106
Results are very different for Flash. The ability to do 10,000+ IOPs also creates new performance problems. I will cover some of those problems in parts 2 and 3.


