Обсуждение: Renice on Postgresql process
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
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.,) ?
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 ?ThanksAyappan P
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. *****
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/>