Some interesting results from tweaking spinlocks
От
Tom Lane
Тема
Some interesting results from tweaking spinlocks
Дата
Msg-id
9516.1010202786@sss.pgh.pa.us
Список
Дерево обсуждения
Some interesting results from tweaking spinlocks Tom Lane <tgl@sss.pgh.pa.us>
Re: Some interesting results from tweaking spinlocks Bruce Momjian <pgman@candle.pha.pa.us>
Re: Some interesting results from tweaking spinlocks Tom Lane <tgl@sss.pgh.pa.us>
Re: Some interesting results from tweaking spinlocks Bruce Momjian <pgman@candle.pha.pa.us>
Re: Some interesting results from tweaking spinlocks Tom Lane <tgl@sss.pgh.pa.us>
Re: Some interesting results from tweaking spinlocks Bruce Momjian <pgman@candle.pha.pa.us>
Re: Some interesting results from tweaking spinlocks Tom Lane <tgl@sss.pgh.pa.us>
Re: Some interesting results from tweaking spinlocks Bruce Momjian <pgman@candle.pha.pa.us>
Re: Some interesting results from tweaking spinlocks Tom Lane <tgl@sss.pgh.pa.us>
Re: Some interesting results from tweaking spinlocks Bruce Momjian <pgman@candle.pha.pa.us>
Re: Some interesting results from tweaking spinlocks Brent Verner <brent@rcfile.org>
Re: Some interesting results from tweaking spinlocks Tom Lane <tgl@sss.pgh.pa.us>
Re: Some interesting results from tweaking spinlocks Brent Verner <brent@rcfile.org>
Re: Some interesting results from tweaking spinlocks Tom Lane <tgl@sss.pgh.pa.us>
Re: Some interesting results from tweaking spinlocks Brent Verner <brent@rcfile.org>
Re: Some interesting results from tweaking spinlocks Bruce Momjian <pgman@candle.pha.pa.us>
Re: Some interesting results from tweaking spinlocks Tom Lane <tgl@sss.pgh.pa.us>
Re: Some interesting results from tweaking spinlocks Tom Lane <tgl@sss.pgh.pa.us>
I have been experimenting with altering the SPINS_PER_DELAY number in src/backend/storage/lmgr/s_lock.c. My results suggest that the current setting of 100 may be too small. The attached graph shows pgbench results on the same 4-way Linux box I described in my last message. (The numbers are not exactly comparable to the previous graph, because I recompiled with --enable-cassert off for this set of runs.) All runs use current CVS plus the second LWLock patch under discussion. Evidently, on this hardware and test case the optimal SPINS_PER_DELAY value is somewhere in the low thousands, not 100. I find this rather surprising given that spinlocks are never held for more than a few dozen instructions, but the results seem quite stable. On the other hand, increasing SPINS_PER_DELAY could hardly fail to be a loser on a single-CPU machine. Would it be worth making this value a GUC parameter, so that it could be tuned conveniently on a per-installation basis? regards, tom lane
В списке pgsql-hackers по дате отправления