Re: Proposal: backend "niceness" / session_priority - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: Proposal: backend "niceness" / session_priority
Date
Msg-id 55BAA2AA.1010208@BlueTreble.com
Whole thread Raw
In response to Re: Proposal: backend "niceness" / session_priority  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Proposal: backend "niceness" / session_priority
Re: Proposal: backend "niceness" / session_priority
List pgsql-hackers
On 7/30/15 10:54 AM, Tom Lane wrote:
> José Luis Tallón <jltallon@adv-solutions.net> writes:
>>       Since PostgreSQL lacks the resource management capabilities of the
>> "Big Ones" ( Resource Groups - Red, WorkLoad Manager - Blue ) or the
>> Resource Governor in MS SQL Server, we can try and approximate the
>> requested behaviour by reducing the CPU priority ("nice") of the backend
>> in question. Please note that we would be using scheduler priority to
>> try and modulate I/O, though I'm aware of the limitations of this mechanism.
>
> This has been proposed before, and rejected before, and I'm not seeing
> anything particularly new here.  Without a credible mechanism for
> throttling I/O, "nice" alone does not seem very promising.

Some OSes respect nice when it comes to IO scheduling, so it might still 
be useful. What I'm worried about is priority inversion[1].

What might be useful would be to add a set of GUCs similar to 
vacuum_cost_* that operated at the shared buffer level. Dunno where 
you'd put the sleep though (presumably all the functions where you'd put 
the accounting are too low-level to sleep in).

[1] https://en.wikipedia.org/wiki/Priority_inversion
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Data in Trouble? Get it in Treble! http://BlueTreble.com



pgsql-hackers by date:

Previous
From: Jim Nasby
Date:
Subject: Re: [PATCH] Microvacuum for gist.
Next
From: Petr Jelinek
Date:
Subject: Re: 64-bit XIDs again