Re: Removing PD_ALL_VISIBLE

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Removing PD_ALL_VISIBLE
Дата
Msg-id 1354310181.1766.106.camel@sussancws0025
обсуждение исходный текст
Ответ на Re: Removing PD_ALL_VISIBLE  (Merlin Moncure <mmoncure@gmail.com>)
Ответы Re: Removing PD_ALL_VISIBLE
Список pgsql-hackers
On Mon, 2012-11-26 at 16:55 -0600, Merlin Moncure wrote:
> > Based on previous measurements, I think there *is* contention pinning
> > the root of an index.  Currently, I believe it's largely overwhelmed
> > by contention from other sources, such as the buffer manager lwlocks
> > and the very-evil ProcArrayLock.  However, I believe that as we fix
> > those problems, this will start to percolate up towards the top of the
> > heap.
> 
> Yup -- it (buffer pin contention on high traffic buffers) been caught
> in the wild -- just maintaining the pin count was enough to do it in
> at least one documented case.  Pathological workloads demonstrate
> contention today and there's no good reason to assume it's limited
> index root nodes -- i'm strongly suspicious buffer spinlock issues are
> behind some other malfeasance we've seen recently.

I tried for quite a while to show any kind of performance difference
between checking the VM and checking PD_ALL_VISIBLE on a 12-core box (24
if you count HT).

Three patches in question: 1. Current unpatched master 2. patch that naively always checks the VM page, pinning and
unpinning
each time 3. Same as #2, but tries to keep buffers pinned (I had to fix a bug in
this patch though -- new version forthcoming)

I tested from 1 to 64 concurrent connections.

One test was just concurrent scans of a ~400MB table.

The other test was a DELETE FROM foo WHERE ctid BETWEEN '(N,0)' AND
'(N,256)' where N is the worker number in the test program. The table
here is only about 2 MB. The idea is that the scan will happen quickly,
leading to many quick deletes, but the deletes won't actually touch the
same pages (aside from the VM page). So, this was designed to be
uncontended except for pinning the VM page.

On the scan test, it was really hard to see any difference in the test
noise, but I may have seen about a 3-4% degradation between patch #1 and
patch #2 at higher concurrencies. It was difficult for me to reproduce
this result -- it usually wouldn't show up. I didn't see any difference
between patch #1 and patch #3.

On the delete test I detected no difference between #1 and #2 at all.

I think someone with access to a larger box may need to test this. Or,
if someone has a more specific suggestion about how I can create a worst
case, then let me know.

Regards,Jeff Davis




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Hot Standby Feedback should default to on in 9.3+
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Hot Standby Feedback should default to on in 9.3+