Performance; improving the speed of Simpletest during development

Last modified: August 15, 2009 - 23:28

Setting up a test slave for performance

  • Tweak MySQL configuration
    InnoDB, while recommanded for production systems, is not ideal on a test slave because DDL operations (CREATE TABLE / DROP TABLE) tend to be much slower then MyISAM's.
  • Move MySQL database to tmpfs
    The test slave will stress the database server by issuing a lot of heavy queries (especially DDL queries) in a short period of time. After some of those queries, the database server explicitely flushes data to disk (MySQL tries to avoid that when possible, but it still calls fsync() after a DDL operation). Moving the database files to a tmpfs filesystem makes a lot of difference.

Tweak MySQL configuration

Add the following to your my.cnf:

skip-innodb

Moving MySQL database to tmpfs

Tmpfs is a linux pseudo-filesystem that stores files and directory in memory. Files placed on a tmpfs will be lost after a reboot, but it doesn't matter for a test slave.

To move the test database to tmpfs, add the following line to your /etc/fstab:

tmpfs /var/lib/mysql/drupal_checkout tmpfs rw,nosuid,nodev,noexec,uid=<uid of the mysql user>,gid=<gid of the mysql group> 0 0

<uid of the mysql user> and <gid of the mysql group> can be found in /etc/passwd and /etc/groups, respectively.

AttachmentSize
mysql-tmpfs.txt5.92 KB
mysql-reference-cfg.txt909 bytes

additional setup info for v1

deekayen - July 9, 2009 - 03:12

These are also apparently relevant to v1 clients:

Fix for cURL on Lenny: http://drupalbin.com/10366
Manual test starter: http://drupalbin.com/10367

 
 

Drupal is a registered trademark of Dries Buytaert.