From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Frost <jeff@frostconsultingllc.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: pl/pgsql function spikes CPU 100%
Date: Fri, 16 Mar 2007 10:49:25 -0400
Message-ID: <6522.1174056565@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.64.0703160147310.11964@discord.home.frostconsultingllc.com>
References: <Pine.LNX.4.64.0703160147310.11964@discord.home.frostconsultingllc.com>
Jeff Frost <jeff@frostconsultingllc.com> writes:
> ... Interestingly, when you
> strace the backend, it doesn't appear to be doing too much...here's some
> sample output:
> select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout)
> semop(3932217, 0x7fbfffd150, 1) = 0
> semop(3932217, 0x7fbfffd150, 1) = 0
> semop(3932217, 0x7fbfffd150, 1) = 0
> semop(3932217, 0x7fbfffd150, 1) = 0
> semop(3932217, 0x7fbfffd150, 1) = 0
> select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout)
> semop(3997755, 0x7fbfffd170, 1) = 0
> semop(3932217, 0x7fbfffd150, 1) = 0
This looks suspiciously like the sort of trace we saw in the various
"context swap storm" threads. The test cases for those generally
involved really tight indexscan loops, ie, the backends were spending
all their time trying to access shared buffers. If you haven't changed
the function or the data, then I concur with the nearby worry about
autovacuuming (large buildup of dead tuples could result in this symptom).
Or maybe you've got an old open transaction that is blocking cleanup?
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, jeff@frostconsultingllc.com
Subject: Re: pl/pgsql function spikes CPU 100%
In-Reply-To: <6522.1174056565@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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