Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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?

share|improve this question
    
Are you running 64 bit? –  Colin 't Hart yesterday
    
Yep 64 bit all round –  Aiden Bell yesterday
    
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 yesterday
add comment

migrated from superuser.com 2 days ago

This question came from our site for computer enthusiasts and power users.

1 Answer

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.

Run:

free -m

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

share|improve this answer
    
I think you are right: total: 15G, free 173M, cached:10G, buffers:63M, shared:4.7G –  Aiden Bell 20 hours ago
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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