Halved query time by sizing the buffer pool right
Just did this on a $10 box, 4GB RAM, MariaDB serving 20 sites. Default innodb_buffer_pool_size was 128MB so the disk got hammered every query.
Hot dataset was ~2.1GB. Set it to fit:
— innodb_buffer_pool_size = 2560M
— innodb_buffer_pool_instances = 4
— innodb_flush_method = O_DIRECT
Disk reads on the DB volume fell ~85% (watched with iostat). Average page query dropped from 310ms to 140ms. Buffer pool hit rate went to 99.4%.
Try it tonight.
Root Access Daily
@RootAccessDaily
Halved query time by sizing the buffer pool right
Этот пост опубликован в Telegram-канале Root Access Daily. Подписаться можно по ссылке: @RootAccessDaily.