Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I usually start Postgres with pg_ctl -D /db start

How can I make it start under "nice", so it runs at a lower priority?

share|improve this question
add comment

2 Answers

nice pg_ctl -D /db start

Use nice command to run a program with modified scheduling priority / nicenesses. Nicenesses range at least from -20 (resulting in the most favorable scheduling) through 19 (the least favorable). The default behavior is to increase the niceness by 10.

A niceness should not be confused with a scheduling priority, which lets applications determine the order in which threads are scheduled to run. Unlike a priority, a niceness is merely advice to the scheduler, which the scheduler is free to ignore.

share|improve this answer
add comment

You have to "nice" all backend processes, not just the postmaster: http://wiki.postgresql.org/wiki/Priorities

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.