[HACKERS] [GOSC' 17][Performance report] Eliminate O(N^2) scaling fromrw-conflict tracking in serializable transactions

Поиск
Список
Период
Сортировка
От Mengxing Liu
Тема [HACKERS] [GOSC' 17][Performance report] Eliminate O(N^2) scaling fromrw-conflict tracking in serializable transactions
Дата
Msg-id 32941a42.2d24.15d996b1bab.Coremail.liu-mx15@mails.tsinghua.edu.cn
обсуждение исходный текст
Список pgsql-hackers
Hi, all. I wrote a performance report to conclude what I've done so far.
https://docs.google.com/document/d/16A6rfJnQSTkd0SHK-2XzDiLj7aZ5nC189jGPcfVdhMQ/edit?usp=sharing

Three patch are attached. I used the benchmark below to test the performance.
https://github.com/liumx10/pg-bench
It requires golang (>= 1.6) if you want to reproduce the code. 

NOTE:
1. The reason why hash table or skip list didn't improve the performance is that
maintaining the conflict list became slower even though conflict tracking was faster.
So far, skip list is the most promising way. But the code is a little tricky.

BTW, if there is a case in which inserting an conflict element is rare but conflict checking is common,
my patch may be be tter. 

2. Reducing contention on global lock has a better performance in this evaluation.
But two weeks ago when I used another machine, it has a worse performance. 
It's hard to explain why... 

You can reply directly if you have any questions or comments. 

--
Sincerely

Mengxing Liu





Вложения

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Update comments in nodeModifyTable.c
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10(upgrading standby servers)