From: Bryan Murphy <bryan.murphy@gmail.com>
To: Alan Hodgson <ahodgson@simkin.ca>
Cc: pgsql-performance@postgresql.org
Subject: Re: cpu throttling
Date: Thu, 2 Aug 2007 13:09:55 -0500
Message-ID: <bd8531800708021109r798fe822y12703acf2fe2c81b@mail.gmail.com> (raw)
In-Reply-To: <200708020914.37180@hal.medialogik.com>
References: <bd8531800708020902v5e6a0928ted3721f3eb543dc8@mail.gmail.com>
<200708020914.37180@hal.medialogik.com>
It's a 4 processor Intel xeon machine with more than enough ram. The
entire database can fit in memory, and while the CPU is pegged,
nothing is chewing up I/O bandwidth, and nothing is getting swapped
out of RAM.
I'm running Debian stable with only a few tweaks to the kernel's
memory settings. As far as I'm aware, I have not changed anything
that would impact scheduling.
Other queries do respond, but it's more like every couple of seconds
one query which normally takes 300ms might take 8000ms. Nothing
terrible, but enough that our users will notice.
Bryam
On 8/2/07, Alan Hodgson <ahodgson@simkin.ca> wrote:
> On Thursday 02 August 2007 09:02, "Bryan Murphy" <bryan.murphy@gmail.com>
> wrote:
> > My question: Is there a way I can decrease the priority of a specific
> > query, or determine the PID of the process it is running in? I'd like
> > to throw together a quick shell script if at all possible, as right
> > now I have to monitor the process manually and we'll have fixed the
> > problem long before we have the chance to implement proper database
> > clustering.
>
> select procpid from pg_stat_activity where current_query
> like '%stored_proc%' and current_query not like '%pg_stat_activity%';
>
> requires stats_command_string to be enabled
>
> I'm surprised your operating system doesn't automatically lower the priority
> of the process, though ..
>
> --
> "Remember when computers were frustrating because they did exactly what
> you told them to? That actually seems sort of quaint now." --J.D. Baldwin
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: bryan.murphy@gmail.com, ahodgson@simkin.ca
Subject: Re: cpu throttling
In-Reply-To: <bd8531800708021109r798fe822y12703acf2fe2c81b@mail.gmail.com>
References: <bd8531800708020902v5e6a0928ted3721f3eb543dc8@mail.gmail.com> <200708020914.37180@hal.medialogik.com> <bd8531800708021109r798fe822y12703acf2fe2c81b@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