You are here

Speed up MySQL on development laptop (SSD disk)

I had big problems synchronizing MySQL database from the staging and production servers to my laptop. It could take up to 15 minutes for an simple site, but by adding some simple tweaking to the local MySQL and ensure that all database were running InnoDB.

Add the configuration lines below to /etc/mysql/conf.d/innodb.cnf, if the file do not exists simply create it. The O_DIRECT did the trick for my SSD disk and the other options also increased the performance results.

[mysqld]
innodb_buffer_pool_size=256M
innodb_flush_method=O_DIRECT
innodb_additional_mem_pool_size=10M
innodb_flush_log_at_trx_commit=0
innodb_thread_concurrency=4

Convert databases to InnoDB

I use http://www.maatkit.org/ to convert the database form for example MyISAM to InnoDB by running the command shown below. Update: it seems that meetkit has become part of https://launchpad.net/percona-toolkit.

mk-find <database_name> --ask-pass --user root --engine MyISAM --exec "ALTER TABLE %D.%N ENGINE=INNODB" --print

Tags

MySQL Drupal 7 SSD performance

Add new comment