pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedPostgres process resident size does not drop after killing statement
2+ messages / 2 participants
[nested] [flat]
* Postgres process resident size does not drop after killing statement
@ 2009-04-15 03:46 Bryce Nesbitt <bryce2@obviously.com>
2009-04-15 13:58 ` Re: Postgres process resident size does not drop after killing statement Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: Bryce Nesbitt @ 2009-04-15 03:46 UTC (permalink / raw)
To: pgsql-sql
Every so often our production Postgres 8.3 system will get statement
that runs for a few hours, or a few days, or more, and needs to be
killed dead. We kill it with pg_cancel_backend(), and cpu usage of the
process immediately drops, and the process starts serving other
statements. But the curious thing is the resident size does not drop.
Is this normal? Something to be concerned about? Here's a mild example
(only 2.8 gigs):
# top
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
20108 postgres 16 0 4305m 2.8g 2.8g D 4 8.6 3:12.50 postgres:
production production 10.100.4.11(44200) SELECT
16306 postgres 15 0 4248m 1.5g 1.5g S 0 4.7 0:47.70 postgres:
jira jira 10.100.5.12(57517) idle
28472 postgres 15 0 4249m 1.4g 1.4g S 2 4.6 0:16.18 postgres:
production production 10.100.4.11(48457) idle
# uname -a
Linux xxxx 2.6.18-6-amd64 #1 SMP Thu Dec 25 21:08:54 UTC 2008 x86_64
GNU/Linux
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Postgres process resident size does not drop after killing statement
2009-04-15 03:46 Postgres process resident size does not drop after killing statement Bryce Nesbitt <bryce2@obviously.com>
@ 2009-04-15 13:58 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2009-04-15 13:58 UTC (permalink / raw)
To: Bryce Nesbitt <bryce2@obviously.com>; +Cc: pgsql-sql
Bryce Nesbitt <bryce2@obviously.com> writes:
> Every so often our production Postgres 8.3 system will get statement
> that runs for a few hours, or a few days, or more, and needs to be
> killed dead. We kill it with pg_cancel_backend(), and cpu usage of the
> process immediately drops, and the process starts serving other
> statements. But the curious thing is the resident size does not drop.
> Is this normal?
Resident size as displayed by "top" is pretty misleading on many
systems. Typically, it counts whatever private memory the process
has plus as many pages of the shared memory area as the process has
actually touched in its lifespan. So the latter portion ramps up
from nil to approach the size of the shared memory block just as a
byproduct of normal operations. You did not say what your
shared_buffers setting is, but if it's a GB or two then I don't
find anything surprising in the numbers you show.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2009-04-15 13:58 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-04-15 03:46 Postgres process resident size does not drop after killing statement Bryce Nesbitt <bryce2@obviously.com>
2009-04-15 13:58 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox