From: Shoaib Mir <shoaibmir@gmail.com>
To: Jeff Frost <jeff@frostconsultingllc.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: pl/pgsql function spikes CPU 100%
Date: Fri, 16 Mar 2007 14:36:07 +0500
Message-ID: <bf54be870703160236v6792e957kc756aa4189a05914@mail.gmail.com> (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>
Are the stat collector and autovacuum processes in good shape?
--
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
On 3/16/07, Jeff Frost <jeff@frostconsultingllc.com> wrote:
>
> I've got a client that has a function in a db which had been humming along
> quite nicely on 2xOpteron 275, PG 8.1.5, 8GB of RAM. Now suddenly many of
> the
> functions in the DB if called will spike the CPU to 100%. These are
> functions
> that used to finish in 7ms, now run for 20-40 mins. 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
>
> Any chance we've stumbled into some corner case bug? We actually moved
> the DB
> to a different server thinking perhaps we had gotten to the limit of slow
> hardware, but in fact it happens on the other server as well.
>
> I don't see any ungranted locks in pg_locks, nor are there any other non
> idle
> queries this time of the night.
>
> I'll see if I can share the function code tomorrow when people are awake
> again
> in case we have something especially silly in there.
>
>
> --
> Jeff Frost, Owner <jeff@frostconsultingllc.com>
> Frost Consulting, LLC http://www.frostconsultingllc.com/
> Phone: 650-780-7908 FAX: 650-649-1954
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: You can help support the PostgreSQL project by donating at
>
> http://www.postgresql.org/about/donate
>
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: shoaibmir@gmail.com, jeff@frostconsultingllc.com
Subject: Re: pl/pgsql function spikes CPU 100%
In-Reply-To: <bf54be870703160236v6792e957kc756aa4189a05914@mail.gmail.com>
* 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