[Tilesathome] Using RAM-drive for ROMA temp tables

Mathieu Arnold mat at mat.cc
Sat Dec 6 08:17:36 GMT 2008


+--On 6 décembre 2008 00:16:35 -0500 Matthias Julius
<lists at julius-net.net> wrote:
| This is interesting, but has nothing to do with RAM disks.

Hum, unless I'm mistaken, what it says is that postgresql will store it's
temp tables in ram if it has enough space, no need to put them in a ramdisk.

|> I've set my temp_buffers to 384M, and, I don't think one request will
|> ever create temp tables that large :-)
| 
| Lucky guy with plenty of memory ...

Well, 3.5GB, it won't allocate all the memory at once, the bigest
postgresql process I've seen was about 310MB, and it had about 150MB of
shared memory.

|> (128M was not, on the other hand, I believe, enough to store
|> everything it would need.)
| 
| Question is how often would it be exceeded.  If it is only 1% of
| requests it might not be so bad.  You certainly don't want linux to
| start to swap because of postgres allocating tons of memory

It won't exceed often.
And, hum, unless you don't define any swap space, and whatever you try to
do, Linux *will* swap memory pages it does not need when it sees fit, you
can't do anything about it, and certainly should have to bother about it,
it's not a RAM / Disk world any more, it's a virtual memory world...
Reducing the amount of free RAM with a ramdisk will only start it swapping
earlier.

-- 
Mathieu Arnold




More information about the Tilesathome mailing list