How to enable /dev/shm RAM disk for MySQL? (temp dir in /dev/shm)
$ vi /etc/fstab
tmpfs /dev/shm tmpfs defaults,size=512m 0 0
$ mount -o remount /dev/shm
Is this correct?
Now what?
……
……
……
Server info:
VPS (Xen)
1.5GB RAM
MySQLoptimization
How to enable /dev/shm RAM disk for MySQL? (temp dir in /dev/shm)
$ vi /etc/fstab
tmpfs /dev/shm tmpfs defaults,size=512m 0 0
$ mount -o remount /dev/shm
Is this correct?
Now what?
……
……
……
Server info:
VPS (Xen)
1.5GB RAM
Best Answer
The first rule of optimisation is: Don't assume.
Don't assume that you will automatically get better performance by putting (any) files on a ramdisc. Also consider how you are hoping to persist data following the (inevitable) power failure.
In general, SQL is slow because you are using it wrong, so it is an application design fault. The fix is to (re-)design your application correctly.