Обсуждение: postgres cache vs ZFS cache

Поиск
Список
Период
Сортировка

postgres cache vs ZFS cache

От
Vick Khera
Дата:
I'm looking at some performance tuning for a server running FreeBSD and the DB on top of ZFS.

I keep reading the recommendation to turn off the primary data cache in ZFS since postgres does its own caching. The recommendations also say to set effective_cache_size to a significant amount of the RAM. The claim is that this avoids double caching of the data.

My understanding from my past research is that effective_cache_size only tells postgres how big the OS cache of the data on disk is, so there really is no double cache. It is just a hint so it knows roughly how much to expect the OS to hold on to.

Based on this understanding, I believe this recommendation to turn off the ZFS primary cache for postgres data to be wrong. Or is there some other place postgres is caching the data beyond the shared memory pool?

I find it mentioned here: http://open-zfs.org/wiki/Performance_tuning#PostgreSQL among other places.

Thanks for any clarifications and advice here.