Moving MySQL tmpdir to RAM Disk

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by deverman on February 5, 2009 at 12:12am

Hello I have a problem with my site when trying to use a RAM Disk to boost temp table create performance. I heard that this optimization was being done on drupal.org but couldn't find any documentation on it. I would appreciate if you could look at my post here and give me any suggestions:

http://drupal.org/node/369204

Comments

+1

Posted by michtoen on February 5, 2009 at 11:08pm

The problem, mostly with D5,

Posted by Alexander Langer@drupal.org (not verified) on February 22, 2009 at 8:49am
Alexander Langer@drupal.org's picture

The problem, mostly with D5, is that those temp tables use column types that mysql cannot use in memory based temp tables. Usually you set up your unix box to mount /tmp on tmpfs which is memory based. Problem however is that until mysql 5.0.48 there has been a bug with mysql not using tmpdir variable for disk based temp table creation but creating in /var/lib/mysql instead .

Ubuntu

Posted by kristen pol on June 17, 2012 at 5:54am

That solution is fine for

Posted by Jamie Holly on June 17, 2012 at 7:15am

That solution is fine for testing, but should never be used in production since it moves all MySQL files to a ram disk and then copies them back when MySQL shuts down. If the server loses power, then you will lose all data added, deleted or changed since the last time MySQL started.


HollyIT - Grab the Netbeans Drupal Development Tool at GitHub.

Agreed!

Posted by kristen pol on June 17, 2012 at 7:24am

I'm only planning on using it for development and creating a cron job to save the RAM data (to disk) regularly (e.g. every 15 minutes) so I won't lose much data if battery dies.

High performance

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /