I have a 400GB Postgres 9.3.4 DB running on Fedora20, and a few indices per table. I have upped shared buffers to 4GB (the system has 16GB available), set shm in the kernel and set the effective_cache_size to 12GB. work_mem is 60MB

Then i'm running hundreds of queries per second against the DB for prolonged period. My entire system (with OS) is only using 3GB of RAM and no swap.

Postgres isn't really using the RAM it could be using and I'd rather max out my RAM and gain query/index performance if possible.

Am I missing something config wise?

  • Are you running 64 bit? Commented Apr 2, 2014 at 14:53
  • Yep 64 bit all round
    – Aiden Bell
    Commented Apr 2, 2014 at 18:04
  • Anything that won't fit in the shared buffer cache will usually sit in the cache of the OS. postgresql.org/docs/9.3/static/runtime-config-resource.html ... As I understand it, finding out what's in the operating system's cache is difficult. But it sounds like your effective_cache_size is set properly. If it's a dedicated database server, you might even raise it to 15GB or more.
    – efesar
    Commented Apr 2, 2014 at 20:42

1 Answer 1


Postgres isn't really using the RAM it could be using

Actually, it probably is.

PostgreSQL relies on the Linux kernel to cache disk blocks. That's what effective_cache_size is about - it's telling PostgreSQL what kind of cache size it can expect the kernel to maintain.


free -m

You'll probably see almost all RAM in use as buffers/cache. Which is exactly what you want.

  • I think you are right: total: 15G, free 173M, cached:10G, buffers:63M, shared:4.7G
    – Aiden Bell
    Commented Apr 3, 2014 at 17:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.