X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 2A75753C91 for ; Fri, 18 Mar 2005 00:33:18 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 33205-09 for ; Fri, 18 Mar 2005 00:33:08 +0000 (GMT) Received: from angel.lonelyplanet.com.au (sweep.lonelyplanet.com.au [202.147.44.192]) by svr1.postgresql.org (Postfix) with ESMTP id 6850752D8A for ; Fri, 18 Mar 2005 00:33:06 +0000 (GMT) Received: from Ganesh.au.lpint.net ([192.168.61.44]) by sweep.lpint.net with InterScan Messaging Security Suite; Fri, 18 Mar 2005 11:33:28 +1100 Received: by ganesh.au.lpint.net with Internet Mail Service (5.5.2657.72) id ; Fri, 18 Mar 2005 11:32:47 +1100 Message-ID: From: Theo Galanakis To: 'Tom Lane' Cc: "'pgsql-sql@postgresql.org'" Subject: Re: Process priority. Date: Fri, 18 Mar 2005 11:32:41 +1100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C52B51.FE9685B0" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.381 tagged_above=0 required=5 tests=AWL, HTML_30_40, HTML_MESSAGE, HTML_TEXT_AFTER_BODY, HTML_TEXT_AFTER_HTML X-Spam-Level: X-Archive-Number: 200503/254 X-Sequence-Number: 20733 This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C52B51.FE9685B0 Content-Type: text/plain It depends what the intended purpose if for. In our scenario, there are a number of ad-hoc export tasks running during the day that are quite cpu intensive. There is a noticeably slow response time when exports are being run. By lowering the priority of the export postmaster, the system appeared to run far smoother for standard users. I guess you could set-up a replication database which I probably will do in the end, however I just wanted to have a play and see if I could extend postgres with c. I don't profess to being a c or os guru. Thankyou for your feedback. Theo -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us] Sent: Friday, 18 March 2005 11:06 AM To: Theo Galanakis Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] Process priority. Theo Galanakis writes: > I wrote a C program that can be called through postgres via stored > procedures. It allows you to change the current postmaster process > priority. You are aware that that's widely considered either useless or counterproductive? Renice-ing one backend seldom gives helpful results, because (a) what usually matters more than CPU usage is I/O, and renice doesn't change I/O priorities; (b) priority inversion results in higher-priority backends blocking behind the low-priority one whenever it's managed to acquire a lock. regards, tom lane ______________________________________________________________________ This email, including attachments, is intended only for the addressee and may be confidential, privileged and subject to copyright. If you have received this email in error, please advise the sender and delete it. If you are not the intended recipient of this email, you must not use, copy or disclose its content to anyone. You must not copy or communicate to others content that is confidential or subject to copyright, unless you have the consent of the content owner. ------_=_NextPart_001_01C52B51.FE9685B0 Content-Type: text/html Content-Transfer-Encoding: quoted-printable RE: [SQL] Process priority.

It depends what the intended purpose if for. In our= scenario, there are a number of ad-hoc export tasks running during the day= that are quite cpu intensive.

There is a noticeably slow response time when exports are= being run. By lowering the priority of the export postmaster, the system= appeared to run far smoother for standard users.

I guess you could set-up a replication database which I= probably will do in the end, however I just wanted to have a play and see= if I could extend postgres with c. I don't profess to being a c or os= guru. Thankyou for your feedback.

Theo

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Friday, 18 March 2005 11:06 AM
To: Theo Galanakis
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] Process priority.


Theo Galanakis <Theo.Galanakis@lonelyplanet.com.au>= writes:
>       I wrote a C program= that can be called through postgres via stored
> procedures. It allows you to change the current= postmaster process
> priority.

You are aware that that's widely considered either= useless or counterproductive?  Renice-ing one backend seldom gives= helpful results, because (a) what usually matters more than CPU usage is= I/O, and renice doesn't change I/O priorities; (b) priority inversion= results in higher-priority backends blocking behind the low-priority one= whenever it's managed to acquire a lock.

       =        =         regards, tom= lane

________________________________________________________________= ______
This email, including attachments, is intended only for the addressee
and may be confidential, privileged and subject to copyright. If you
have received this email in error, please advise the sender and delete
it. If you are not the intended recipient of this email, you must not
use, copy or disclose its content to anyone. You must not copy or
communicate to others content that is confidential or subject to
copyright, unless you have the consent of the content owner.
------_=_NextPart_001_01C52B51.FE9685B0--