Re: Use simplehash.h instead of dynahash in SMgr
От | Andres Freund |
---|---|
Тема | Re: Use simplehash.h instead of dynahash in SMgr |
Дата | |
Msg-id | 20210426184638.kvakkcid3av672do@alap3.anarazel.de обсуждение исходный текст |
Ответ на | Re: Use simplehash.h instead of dynahash in SMgr (Yura Sokolov <y.sokolov@postgrespro.ru>) |
Ответы |
Re: Use simplehash.h instead of dynahash in SMgr
|
Список | pgsql-hackers |
Hi, On 2021-04-25 01:27:24 +0300, Yura Sokolov wrote: > It is quite interesting result. Simplehash being open-addressing with > linear probing is friendly for cpu cache. I'd recommend to define > SH_FILLFACTOR with value lower than default (0.9). I believe 0.75 is > suitable most for such kind of hash table. It's not a "plain" linear probing hash table (although it is on the lookup side). During insertions collisions are reordered so that the average distance from the "optimal" position is ~even ("robin hood hashing"). That allows a higher load factor than a plain linear probed hash table (for which IIRC there's data to show 0.75 to be a good default load factor). There of course may still be a benefit in lowering the load factor, but I'd not start there. David's test aren't really suited to benchmarking the load factor, but to me the stats he showed didn't highlight a need to lower the load factor. Lowering the fill factor does influence the cache hit ratio... Greetings, Andres Freund
В списке pgsql-hackers по дате отправления: