+--On 5 décembre 2008 17:12:22 -0500 Matthias Julius
<[EMAIL PROTECTED]> wrote:
| Florian Lohoff <[EMAIL PROTECTED]> writes:
| 
|> On Fri, Dec 05, 2008 at 02:55:07PM -0500, Milenko wrote:
|>> Hey all,
|>> 
|>>                 Has anyone played with using a ramdrive to store the
|>>                 temp
|>> tables in map.fcgi?  There are 6 different temp tables used to store
|>> data before it's dumped to the client.  I wonder if there would be a
|>> significant speed increase if these could be stored in RAM instead of
|>> on disk.  The script creates a "mirrored" tablespace before creating
|>> the temp tables, if this tablespace where to point to a filesystem in
|>> RAM would that accomplish this?  I currently have it set to a separate
|>> directory on disk, but nothing is ever created there so I'm not sure if
|>> it's actually being used to anything.
|> 
|> I tried with a different tablespace on seperate speedy disks and it
|> didnt make a difference as the linux kernel is clever enough to
|> not let these short lived tables hit the disk 
| 
| That't what I would have guessed, too.  If you have enough RAM to
| create a RAM drive the kernel also has enough memory to cache the data
| if you leave the memory to the kernel instead.

Hum, the thing is, that, hum, let me quote postgresql's doc for you :

temp_buffers (integer)

    Sets the maximum number of temporary buffers used by each database
session. These are session-local buffers used only for access to temporary
tables. The default is eight megabytes (8MB). The setting can be changed
within individual sessions, but only up until the first use of temporary
tables within a session; subsequent attempts to change the value will have
no effect on that session.
    A session will allocate temporary buffers as needed up to the limit
given by temp_buffers. The cost of setting a large value in sessions that
do not actually need a lot of temporary buffers is only a buffer
descriptor, or about 64 bytes, per increment in temp_buffers. However if a
buffer is actually used an additional 8192 bytes will be consumed for it
(or in general, BLCKSZ bytes). 

I've set my temp_buffers to 384M, and, I don't think one request will ever
create temp tables that large :-) (128M was not, on the other hand, I
believe, enough to store everything it would need.)

-- 
Mathieu Arnold

_______________________________________________
Tilesathome mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/tilesathome

Reply via email to