Professional Web Applications Themes

RAMFS for /tmp - MySQL

Hello. Has anyone changed (on the my.cnf) the tmpdir variable to a RAMFS drive? I have a database that is constantly using /tmp to create temporary tables and I figure that it would highly improve the performance if the /tmp directory would reside in RAM instead of constantly reading and writing to disk. Any suggestions would be greatly appreciated. Thanks! David....

  1. #1

    Default RAMFS for /tmp

    Hello.

    Has anyone changed (on the my.cnf) the tmpdir variable to a RAMFS drive?

    I have a database that is constantly using /tmp to create temporary tables
    and I figure that it would highly improve the performance if the /tmp
    directory would reside in RAM instead of constantly reading and writing to
    disk.

    Any suggestions would be greatly appreciated.

    Thanks!

    David.


    David Guest

  2. #2

    Default Re: RAMFS for /tmp

    On Thu, 28 Sep 2006 08:27:26 -0400, David Waizer wrote:
     

    If you've got RAM not being used, you'd *probably* be better off
    increasing appropriate cache sizes in your my.cnf, than fooling around
    with trying to cirvent MySQL's caching. If you insist on wanting
    memory-based temp tables, the right way to do it is to use ENGINE =
    MEMORY on your CREATE TABLE, and use a carefully-chosen value for
    max_heap_table_size in my.cnf, so an errant temporary table doesn't
    cause excessive swapping. (Even if RAMFS won't swap, other things
    competing for memory will.)

    --
    34. I will not turn into a snake. It never helps.
    --Peter Anspach's list of things to do as an Evil Overlord
    Peter Guest

  3. #3

    Default Re: RAMFS for /tmp

    When is the /tmp directory used by MySQL? Is it only used when there
    is memory in a cache buffer, or does it happen on some requests
    regardless of the size of cache? If the latter is true, then there
    could be some benefit from generating a ram drive. On the other hand,
    if the former is true, then there is no gain from changing /tmp into a
    ram drive. What sort of operations are you doing that is causing /tmp
    to be used a lot? The answer to that question might shed some light on
    the best place to put your ram.

    jinxidoru Guest

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139