0

A common hack to improve the performance of MySQL and other programs is to configure their tmp space to be a ram based file system. However in the case of MySQL if you fill up the space the query in question, and sometimes the server, will crash. How would I go about "extending" the ramfs mount/filesystem such that when it is full it will continue to disk. I realize writing to disk is a performance hit, but in this case the performance hit is less important than a stability hit. The key point is that the Ramfs device would have the priority for all writes on a space available basis.

Ideas?

1 Answer 1

0

Hi planning is key: know how much data you are attempting to push, load test, and size up your systems. You can avoid deadlocks with "more" RAM if you are encountering issues now. Don't make your tempfs or /dev/shm larger than 50% of physical RAM. Note lines 59-61 in this link: http://www.mjmwired.net/kernel/Documentation/filesystems/tmpfs.txt

1
  • In the situation I'm thinking here it does not matter how big or small the ram disk portion is. The goal is to write to disk in a seamless manner when the ram disk is full. However the next major piece is that ram should have priority over disk for writes when space is available. I could use two LVM PV's but I don't know if the write priority would happen.
    – Red Tux
    May 26, 2011 at 12:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .