Skip site navigation (1) Skip section navigation (2)

[PERFORMANCE] work_mem vs temp files issue

From: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
To: psql performance list <pgsql-performance(at)postgresql(dot)org>
Subject: [PERFORMANCE] work_mem vs temp files issue
Date: 2009-08-20 00:45:28
Message-ID: 3073cc9b0908191745o3dc63d95q6b9308ef5bd199f2@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
Hi,

AFAIUI, work_mem is used for some operations (sort, hash, etc) for
avoiding the use of temp files on disk...

In a client server i'm monitoring (pg 8.3.7, 32GB of ram) work_mem is
set to 8MB, however i'm seeing a lot of temp files (>30000 in 4 hours)
with small sizes (ie: 2021520 obviously lower than 8MB). so, why?
maybe we use work_mem until we find isn't enough and we send just the
difference to a temp file?

i'm not thinking in raising work_mem until i understand this well,
what's the point if we still create temp files that could fit in
work_mem...

PS: i have max_connections to 1024, i know i need a pool but the app
is still opening persistent conecctions to the db, so is not like i
could raise work_mem just easy until the app gets fixed

-- 
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157

Responses

pgsql-performance by date

Next:From: Fabio La FarcioliDate: 2009-08-20 07:01:30
Subject: Number of tables
Previous:From: Jaime CasanovaDate: 2009-08-20 00:25:11
Subject: [PERFORMANCE] how to set wal_buffers

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group