On Tue, May 6, 2014 at 4:38 PM, Simon Riggs <si...@2ndquadrant.com> wrote: > I read the code, think what to say and then say what I think, not > rely on dogma. > > I tried to help years ago by changing the docs on e_c_s, but that's > been mostly ignored down the years, as it is again here.
Well, for what it's worth, I've encountered systems where setting effective_cache_size too low resulted in bad query plans, but I've never encountered the reverse situation. My personal sample size is pretty small, though. And, when I did a study of 100+ pgsql-performance reports for last year's PGCon talk, I didn't turn up any that seemed related to effective_cache_size. Here's the subset of those reports that appeared settings-related: https://sites.google.com/site/robertmhaas/query-performance/settings I think the basic problem with effective_cache_size is that it's a pretty weak knob. I don't think it's a secret that we more often seq-scan when we should have index-scanned than the other other way around. So if I had to hard-code a value for effective_cache_size, I'd probably pick positive infinity. Yeah, that could be overkill - but I bet I'd be able to compensate by frobbing seq_page_cost and random_page_cost in a pinch. I basically think the auto-tuning we've installed for effective_cache_size is stupid. Most people are going to run with only a few GB of shared_buffers, so setting effective_cache_size to a small multiple of that isn't going to make many more people happy than just raising the value - say from the current default of 128MB to, oh, 4GB - especially because in my experience queries aren't very sensitive to the exact value; it just has to not be way too small. I bet the number of PostgreSQL users who would be made happy by a much higher hard-coded default is not too different from the number that will be made happy by the (completely unprincipled) auto-tuning. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers