How much do the hint bits help?
От | Merlin Moncure |
---|---|
Тема | How much do the hint bits help? |
Дата | |
Msg-id | AANLkTi=z15_FEeKKg+KiHRx2xk4Oy5iyZ-uRRiMgViiE@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: How much do the hint bits help?
Re: How much do the hint bits help? Re: How much do the hint bits help? Re: How much do the hint bits help? |
Список | pgsql-hackers |
I've been playing around with postgresql hint bits in order to teach myself more about the internals of the MVCC system. I noticed that the hint bit system has been around forever (Vadim era) and predates several backend improvements that might affect their usefulness. So I started playing around, trying to quantify the benefit they provide with an eye of optimizing clog lookups if it turned out to be necessary say by mmap-ing a big transaction status file just to see if that helped. Attached is an incomplete patch disabling hint bits based on compile switch. It's not complete, for example it's not reconciling some assumptions in heapam.c that hint bits have been set in various routines. However, it mostly passes regression and I deemed it good enough to run some preliminary benchmarks and fool around. Obviously, hint bits are an annoying impediment to a couple of other cool pending features, and it certainly would be nice to operate without them. Also, for particular workloads, the extra i/o hint bits can cause a fair amount of pain. So far, at least doing pgbench runs and another test designed to exercise clog lookups, the performance loss of always doing full lookup hasn't materialized. Note that in these cases the clog lru cache is pretty effective, and it's pretty likely I may have blown it in some other way, so take the results for a grain of salt. But, here are the following questions/points: *) relative to when the hint bits where implemented, the amount of transactions to map has shrunk, while hardware has improved by a couple of orders of magnitude. Also the postgres architecture has changed considerably. Are they still necessary? *) what's a good way to stress the clog severely? I'd like to pick a degenerate case to get a better idea of the way things stand without them. *) is there community interest in a full patch that fills in the missing details not implemented here? merlin
Вложения
В списке pgsql-hackers по дате отправления: