Re: refusing connections based on load ... - Mailing list pgsql-hackers

From Tom Lane
Subject Re: refusing connections based on load ...
Date
Msg-id 6088.988233122@sss.pgh.pa.us
Whole thread Raw
In response to Re: refusing connections based on load ...  (Jan Wieck <JanWieck@Yahoo.com>)
Responses Re: refusing connections based on load ...  (The Hermit Hacker <scrappy@hub.org>)
List pgsql-hackers
Jan Wieck <JanWieck@yahoo.com> writes:
>     This  proves that limiting the number of concurrently running
>     transactions is sufficient to  keep  the  system  load  down.
>     Combined these two look as follows:

>     -   We start with a fairly high setting in the semaphore.

>     -   When the system load exceeds the high-watermark, we don't
>         increment the semaphore back after transaction end  (need
>         to ensure that at least a small minimum of xacts is left,
>         but that's easy).

>     -   When the system goes back to normal load level, we slowly
>         increase the semaphore again.

This is a nice way of dealing with the slow reaction time of the
load average --- you don't let it directly drive the decision about
when to start a new transaction, but instead let it tweak the ceiling
on number of concurrent xacts.  I like it.

You probably don't need to have any additional "slowness" in the loop
other than the inherent averaging in the kernel's load average.

I'm still concerned about portability issues, and about whether load
average is really the right number to be looking at, however.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Joel Burton
Date:
Subject: Re: Any optimizations to the join code in 7.1?
Next
From: Tom Lane
Date:
Subject: Re: Any optimizations to the join code in 7.1?