pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Renice on Postgresql process
6+ messages / 4 participants
[nested] [flat]

* Renice on Postgresql process
@ 2018-05-07 14:46  Ayappan P2 <ayappap2@in.ibm.com>
  0 siblings, 2 replies; 6+ messages in thread

From: Ayappan P2 @ 2018-05-07 14:46 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org



Hi All,

We are using Postgresql in AIX. Unlike some other databases, Postgresql has
lot of other process running in the background along with the main process.

We do "renice" only on the Postgres main process. Is it sufficient to have
higher priority only for the main process or we have to do "renice" for all
the Postgresql related process ( like wal writer, logger , checkpointer
etc.,) ?

Thanks
Ayappan P

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Renice on Postgresql process
@ 2018-05-07 18:04  Ben Chobot <bench@silentmedia.com>
  parent: Ayappan P2 <ayappap2@in.ibm.com>
  1 sibling, 1 reply; 6+ messages in thread

From: Ben Chobot @ 2018-05-07 18:04 UTC (permalink / raw)
  To: Ayappan P2 <ayappap2@in.ibm.com>; +Cc: pgsql-general@lists.postgresql.org

On May 7, 2018, at 7:46 AM, Ayappan P2 <ayappap2@in.ibm.com> wrote:
> 
> Hi All,
> 
> We are using Postgresql in AIX. Unlike some other databases, Postgresql has lot of other process running in the background along with the main process. 
> 
> We do "renice" only on the Postgres main process. Is it sufficient to have higher priority only for the main process or we have to do "renice" for all the Postgresql related process ( like wal writer, logger , checkpointer etc.,) ? 
> 

What do you hope to achieve with your renicing? There is a compelling school of thought which holds that nice database processes take longer to relinquish their resources, which doesn't end up helping anything at all.=

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Renice on Postgresql process
@ 2018-05-08 06:50  Ayappan P2 <ayappap2@in.ibm.com>
  parent: Ayappan P2 <ayappap2@in.ibm.com>
  1 sibling, 1 reply; 6+ messages in thread

From: Ayappan P2 @ 2018-05-08 06:50 UTC (permalink / raw)
  To: bench@silentmedia.com; +Cc: pgsql-general@lists.postgresql.org

<div class="socmaildefaultfont" dir="ltr" style="font-family:Arial, Helvetica, sans-serif;font-size:10.5pt" ><div dir="ltr" >We are doing "renice" on the main Postgresql process to give higher scheduling priority because other critical operations depends on the database.</div>
<div dir="ltr" >You are saying that the database processes take longer to relinquish their resources and we won't achieve anything out of renice, So i assume renice of the database processes is not at all required ?</div>
<div dir="ltr" >&nbsp;</div>
<div dir="ltr" >Thanks</div>
<div dir="ltr" >Ayappan P</div>
<div dir="ltr" >&nbsp;</div>
<blockquote data-history-content-modified="1" dir="ltr" style="border-left:solid #aaaaaa 2px; margin-left:5px; padding-left:5px; direction:ltr; margin-right:0px" >----- Original message -----<br>From: Ben Chobot &lt;bench@silentmedia.com&gt;<br>To: Ayappan P2 &lt;ayappap2@in.ibm.com&gt;<br>Cc: pgsql-general@lists.postgresql.org<br>Subject: Re: Renice on Postgresql process<br>Date: Mon, May 7, 2018 11:35 PM<br>&nbsp;<br><!--Notes ACF
<meta http-equiv="Content-Type" content="text/html; charset=utf8" >-->On May 7, 2018, at 7:46 AM, Ayappan P2 &lt;<a href="mailto:ayappap2@in.ibm.com" target="_blank" >ayappap2@in.ibm.com</a>&gt; wrote:

<div><blockquote type="cite" >&nbsp;
<div><div><p><font size="2" >Hi All,</font><br><br><font size="2" >We are using Postgresql in AIX. Unlike some other databases, Postgresql has lot of other process running in the background along with the main process. </font><br><br><font size="2" >We do "renice" only on the Postgres main process. Is it sufficient to have higher priority only for the main process or we have to do "renice" for all the Postgresql related process ( like wal writer, logger , checkpointer etc.,) ? </font></p></div></div></blockquote></div>&nbsp;

<div>What do you hope to achieve with your renicing? There is a compelling school of thought which holds that nice database processes take longer to relinquish their resources, which doesn't end up helping anything at all.</div></blockquote>
<div dir="ltr" >&nbsp;</div></div><BR>





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Renice on Postgresql process
@ 2018-05-23 23:36  Ben Chobot <bench@silentmedia.com>
  parent: Ayappan P2 <ayappap2@in.ibm.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Ben Chobot @ 2018-05-23 23:36 UTC (permalink / raw)
  To: Ayappan P2 <ayappap2@in.ibm.com>; +Cc: pgsql-general@lists.postgresql.org



> On May 7, 2018, at 11:50 PM, Ayappan P2 <ayappap2@in.ibm.com> wrote:
> 
> We are doing "renice" on the main Postgresql process to give higher scheduling priority because other critical operations depends on the database.
> You are saying that the database processes take longer to relinquish their resources and we won't achieve anything out of renice, So i assume renice of the database processes is not at all required ?
>  
> Thanks
> Ayappan P
>  

Yes, if you make a db process nicer than the db takes longer to answer your queries. If the goal is to keep the load down on the db, that is usually going to be counterproductive.=

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Renice on Postgresql process
@ 2018-05-23 23:45  Joshua D. Drake <jd@commandprompt.com>
  parent: Ben Chobot <bench@silentmedia.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Joshua D. Drake @ 2018-05-23 23:45 UTC (permalink / raw)
  To: Ben Chobot <bench@silentmedia.com>; Ayappan P2 <ayappap2@in.ibm.com>; +Cc: pgsql-general@lists.postgresql.org

On 05/23/2018 04:36 PM, Ben Chobot wrote:
> 
> 
>> On May 7, 2018, at 11:50 PM, Ayappan P2 <ayappap2@in.ibm.com 
>> <mailto:ayappap2@in.ibm.com>> wrote:
>>
>> We are doing "renice" on the main Postgresql process to give higher 
>> scheduling priority because other critical operations depends on the 
>> database.
>> You are saying that the database processes take longer to relinquish 
>> their resources and we won't achieve anything out of renice, So i 
>> assume renice of the database processes is not at all required ?
>> Thanks
>> Ayappan P
> 
> Yes, if you make a db process nicer than the db takes longer to answer 
> your queries. If the goal is to keep the load down on the db, that is 
> usually going to be counterproductive.

Correct or in other words, the problem is bad provisioning. You need to 
optimize your resources whether that be hardware/vm or code.

JD



-- 
Command Prompt, Inc. || http://the.postgres.company/ || @cmdpromptinc
***  A fault and talent of mine is to tell it exactly how it is.  ***
PostgreSQL centered full stack support, consulting and development.
Advocate: @amplifypostgres || Learn: https://postgresconf.org
*****     Unless otherwise stated, opinions are my own.   *****




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Renice on Postgresql process
@ 2018-05-24 09:58  Peter J. Holzer <hjp-pgsql@hjp.at>
  parent: Ben Chobot <bench@silentmedia.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Peter J. Holzer @ 2018-05-24 09:58 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 2018-05-07 11:04:31 -0700, Ben Chobot wrote:
> On May 7, 2018, at 7:46 AM, Ayappan P2 <ayappap2@in.ibm.com> wrote:
>     We are using Postgresql in AIX. Unlike some other databases, Postgresql has
>     lot of other process running in the background along with the main process.
> 
>     We do "renice" only on the Postgres main process. Is it sufficient to have
>     higher priority only for the main process or we have to do "renice" for all
>     the Postgresql related process ( like wal writer, logger , checkpointer
>     etc.,) ?
> 
> 
> What do you hope to achieve with your renicing? There is a compelling school of
> thought which holds that nice database processes take longer to relinquish
> their resources, which doesn't end up helping anything at all.

I think you misunderstood Ayappan. He doesn't want to make the database
processes nicer, he wants to make them less nice ("higher priority").

So in theory, they should be able to complete requests faster because
they aren't interrupted by other processes so often. 

Whether that is true, depends on whether the processes are cpu or disk
bound and what exactly the "nice value" affects. The best way to find
out is probably to try it.

        hp

-- 
   _  | Peter J. Holzer    | we build much bigger, better disasters now
|_|_) |                    | because we have much more sophisticated
| |   | hjp@hjp.at         | management tools.
__/   | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/;

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2018-05-24 09:58 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-05-07 14:46 Renice on Postgresql process Ayappan P2 <ayappap2@in.ibm.com>
2018-05-07 18:04 ` Ben Chobot <bench@silentmedia.com>
2018-05-24 09:58   ` Peter J. Holzer <hjp-pgsql@hjp.at>
2018-05-08 06:50 ` Ayappan P2 <ayappap2@in.ibm.com>
2018-05-23 23:36   ` Ben Chobot <bench@silentmedia.com>
2018-05-23 23:45     ` Joshua D. Drake <jd@commandprompt.com>

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