Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.


share|improve this question

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:

share|improve this answer
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 '11 at 12:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.