The use of tmpfs/ramfs as /tmp partition is a common trick to improve the performance of on-disk temporary tables. Servers usually have less RAM than disk space so those kind of partitions are very limited in size and there are some cases were we can run out of space.
Let’s see one example. We’re running a typical master-slave replication with ROW based binary log file. The application connects to the database using persistent connection technique to avoid creating new connections for every request so it just recycle old connections.
The application starts to load data into the database with “LOAD DATA INFILE”. After some minutes the server runs out of disk space on /tmp/partition. The first step is clear, check which files are on that partition:
# ls -lah /tmp total 24K drwxr-xr-x 3 root root 4,0K ago 2 12:53 . drwx------ 9 root root 4,0K ago 5 11:35 .. drwx------ 2 root root 16K ago 2 12:36 lost+found