Re: LWLock contention: I think I understand the problem
От | Tom Lane |
---|---|
Тема | Re: LWLock contention: I think I understand the problem |
Дата | |
Msg-id | 27935.1009680120@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: LWLock contention: I think I understand the problem (Bruce Momjian <pgman@candle.pha.pa.us>) |
Список | pgsql-hackers |
Bruce Momjian <pgman@candle.pha.pa.us> writes: > OK, here are the results on BSD/OS 4.2 on a 2-cpu system. The first is > before the patch, the second after. Both average 14tps, so the patch > has no negative effect on my system. Of course, it has no positive > effect either. :-) I am also having a hard time measuring any difference using pgbench. However, pgbench is almost entirely I/O bound on my hardware (CPU is typically 70-80% idle) so this is not very surprising. I can confirm that the patch accomplishes the intended goal of reducing context swaps. Using pgbench with 64 clients, a profile of the old code showed about 7% of LWLockAcquire calls blocking (invoking IpcSemaphoreLock). A profile of the new code shows 0.1% of the calls blocking. I suspect that we need something less I/O-bound than pgbench to really tell whether this patch is worthwhile or not. Jeffrey, what are you seeing in your application? And btw, what are you using to count context swaps? regards, tom lane
В списке pgsql-hackers по дате отправления: