[ale] Storing MySQL Database in memory

Tejus Parikh tejus at vijedi.net
Sun Aug 12 17:56:33 EDT 2007


I'm not sure about MySQL, but on Postgres, you can get the behavior you're looking for by increasing the shared buffer size and other memory settings.  This will effectively cache the most used parts of your database in memory.  I'd imagine MySQL has similar tuning parameters.  

Another thing to consider is that frequently used pages will be cached in memory by linux anyway. Finding the right balance between these two parameters gets you almost what you want, without sacrificing data-integrity.  

Tejus

----- Original Message -----
From: "Christopher Fowler" <cfowler at outpostsentinel.com>
To: ale at ale.org
To: ale at ale.org
Sent: Sunday, August 12, 2007 5:13:30 PM (GMT-0500) America/New_York
Subject: [ale] Storing MySQL Database in memory

I had this idea that since I've upgraded the memory on one of our
servers to 2.5GB that I could run the MySQL database from memory.  I'm
not sure if there is a performance gain but I'm trying to figure out how
I would do it and preserve the data on reboots.

One idea I had was to create a 128mb ramdisk and a 128mb fs image.  I
would then create a RAID1 array between those.  Since a RAID1 is a copy
of the filesystem on reboot I could simply copy the fs.img to a backup
and create a new array.  Once the array is created I could then format
it and copy the data into it.  I think the only problem I see here is
that writes will slow me down since the writes have to go back down to
the disk.  How about reads.  The majority of the time the system is
reading not writing.

Chris


_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale




More information about the Ale mailing list