postgres cache vs ZFS cache - Mailing list pgsql-general

From Vick Khera
Subject postgres cache vs ZFS cache
Date
Msg-id CALd+dcd07Q7ZBER+_BXo1RZnme0M3F7JhbhA_VdUQG868w2bPg@mail.gmail.com
Whole thread Raw
List pgsql-general
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.

pgsql-general by date:

Previous
From: mephysto
Date:
Subject: Re: Temporary table already exists
Next
From: Adrian Klaver
Date:
Subject: Re: Temporary table already exists