4 Responses

  1. Rob White
    Rob White at |

    Better still to leave the line and just remove the “size=#######,” which will allow your tmp directory to grow to half of your available ram (available at startup).

    I actually add the line above and set the size manually to one-half ram _plus_ one-half configured swap space.

    For various reasons having your /tmp drive self-clean between boots and completely ram based will greatly increase the speed of many operations. (e.g. an install that “copies through” /tmp wont become a disk-to-disk copy operation unless it _must_ overflow into swap).

    Many distros put /tmp into a tmpfs (hence the name tmpfs 8-) by default, and unless you are _pressed_ for ram, you should too.

  2. Gordon Haverland
    Gordon Haverland at |

    Many applications which are not written properly, will generate errors about not enough room, when they actually do have enough room. What seems to happen is that people seem to think Linux is a 2 partition system: 1 partition for swap and 1 partition for filesystem. But if you actually have separate filesystems for /tmp, /usr, /usr/local, /var, /home, etc., more often than not the program in question is looking for freespace on /, and not in the filesystem where the room is actually needed.

  3. Slucas
    Slucas at |

    Thanks a lot !

    my disk has been fulled by a wrong backup script.
    After restoring things, I still have some database query that wasn’t outputing nothing and this error in the mysql error log
    121222 10:28:38 [ERROR] /usr/sbin/mysqld: Incorrect key file for table ‘/tmp/#sql_33a3_0.MYI’; try to repair it
    121222 10:28:38 [ERROR] Got an error from unknown thread, /build/buildd/mysql-5.5-5.5.28/storage/myisam/mi_write.c:223

    I spend 4 hours debugging, thinking that I had database corruption after
    I’ve read carefully this post
    http://www.mysqlperformancetuning.com/a-fix-for-incorrect-key-file-for-table-mysql
    And was convinced it was a tmp size problem though the error message of mysql didn’t point at all to this cause.
    I hadn’t seen if tmp was on a specific partition before, but it was having a 1MB, very few in its own partition
    In /etc/fstab they wasn’t any line for it
    Furthermore the overflow that was printing when doing df -h was adding clue in this direction.
    Your 2 steps recipe help got rid of this problem.

    As ever, debugging is not funny, but by the way allow us to learn some interesting things about the os that run our sites.

Leave a Reply