[HACKERS] [GSOC] Eliminate O(N^2) scaling from rw-conflict tracking inserializable transactions

Поиск
Список
Период
Сортировка
От Mengxing Liu
Тема [HACKERS] [GSOC] Eliminate O(N^2) scaling from rw-conflict tracking inserializable transactions
Дата
Msg-id 48d8f6d9.aa9.15d7f8f8260.Coremail.liu-mx15@mails.tsinghua.edu.cn
обсуждение исходный текст
Ответы Re: [HACKERS] [GSOC] Eliminate O(N^2) scaling from rw-conflicttracking in serializable transactions  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Hi, all. There was a very strange phenomenon I couldn't explain. So I was wondering if you can help me.

I was trying to replace the linked list with a skip list in serializable transaction object for faster conflict tracking. But the performance is bad.
So I used the instruction "rdtsc" to compare the speed of my skip list and the original linked list. The skip list was about 1.5x faster.

The interesting thing is that if I added the instruction "rdstc" at the end of the function "RWConflictExists", 
the performance of the whole system was increased by at most 3 times! 
Here is the result. 

benchmarkswithout rdtsc with rdtsc
simpe read/write4.9114.16
ssibench9.7210.24
tpcb26.4526.38

( The simple read/write benchmark has the most number of conflicts. )

The patch is attached. All the difference of the two columns is with/without a simple line of code:
__asm__ __volatile__ ("rdtsc"); 
But I don't know why this instruction will influence the performance so much!

BTW, after adding the "rdtsc" instruction, the performance is better than the original version about 10% at most.
That means, the skip list can work! 

Looking forward to your advices. 

--
Sincerely

Mengxing Liu





Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Change in "policy" on dump ordering?
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [HACKERS] Remove old comments in dependencies.c andREADME.dependencies