Re: Design notes for BufMgrLock rewrite
От | Tom Lane |
---|---|
Тема | Re: Design notes for BufMgrLock rewrite |
Дата | |
Msg-id | 3635.1109029537@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Design notes for BufMgrLock rewrite (Simon Riggs <simon@2ndquadrant.com>) |
Ответы |
Re: Design notes for BufMgrLock rewrite
|
Список | pgsql-hackers |
Simon Riggs <simon@2ndquadrant.com> writes: > ...but do you agree with my comments on the lack of scalability in cache > miss situations? No. Grabbing a lock during a cache miss is the least of your worries; you're going to do I/O, or at least a kernel call, so it hardly matters as long as you're not holding the lock for a time that's long in comparison to that overhead. The only test case I've seen that exposes a significant amount of bufmgr contention is one that involves zero I/O (100% cache hit rate), so that the fraction of time spent holding the BufMgrLock is a significant part of the total time. As soon as you move off 100%, the bufmgr isn't the critical path anymore. So I think the fact that this redesign is able to reduce the contention at all in that case is just gravy. (It does reduce contention because ReleaseBuffer doesn't take a global lock anymore, and because BufMappingLock and BufFreelistLock are separate locks.) If testing shows that we still have contention issues with this design then we can try subdividing the BufFreelistLock --- but right now my guess is that we'd just be giving up more cache management efficiency in return for not much. regards, tom lane
В списке pgsql-hackers по дате отправления: