Using a ramdisk for MySQL helps *a lot* to speed up simpletests in Drupal, as well as disabling innodb as described on the according d.o. docu page. While the documentation provides an init.d script, Ubuntu 11.04 comes with an upstart script for MySQL. So I modified the instructions and come up with the following in order to put MySQL on a ramdisk on ubuntu 11.04 (and later): 1. Pre-pare everything
2. Save the original upstart script at /etc/init/mysql.conf and replace it with the one attached to this post. 3. Start MySQL and make sure everything works!
chown -R mysql:mysql /var/lib/.mysql
rsync -a --delete /var/lib/mysql/ /var/lib/.mysql
# confirm files got copied!
rm -r /var/lib/mysql/*
Once you run
cd /var/lib/mysql #(to verify files moved back in)
df -h #(to verify tmpfs is mounted at /var/lib/mysql)
stop mysqlthe content of the ramdisk will be saved back to disk again.