0

I manage a PXC 5.6 cluster and noticed that the tmpdir variable in /etc/my.cnf isn't set.

I was thinking to set it to /tmp (which is tmpfs) to explicitly make the cluster store temporary files in RAM. Without this setting, MySQL could choose /var/tmp or /usr/tmp (which, on my system, are on-disk) to store temporary files.

1) Is there any drawback to do this on PXC? I ask because on a MySQL replication slave one must not use a RAM disk to store temporary files, since the slave will need some of the files when the machine restarts.

2) Is this really going to improve performances, or it looks like a unnecessary twiddling? The InnoDB buffer size is already large enough, and 95% of temporary tables are stocked in memory.

-1

It is not advisable to use RAM for temporary directory. At time files can grow large enough to outflow RAM and this would be true even with plain MySQL. RAM is best managed by InnoDB buffer pool. You can setup a tmpfs that should be good enough with decent performance.

  • Not sure I understand your answer. tmpfs is RAM. – dr01 Apr 12 '16 at 7:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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