Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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

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

 
discard

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.