0

I increased postgres shared_buffers to 7GB on a Linux machine. This is about 25% of the available RAM on this machine which I believe follows the postgres recommendation.

Memory on the machine exhausted. What I see is man postgres processes each using 7GB resident memory.When I run top I see the memory on the machine being fully used so I think the 7GB is private memory of the postmaster processes.

I thought shared_buffers memory is supposed to be shared.

This is postgres 8

PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
15872 postgres  15   0 7481m 7.2g 7.1g S 17.6 15.2  43:19.92 postgres: st stk 127.0.0.1(60729) SELECT
3467 postgres  15   0 7489m 7.2g 7.1g S 15.9 15.2  56:33.33 postgres: st stk 127.0.0.1(44351) SELECT
9484 postgres  15   0 7495m 7.2g 7.1g S 15.0 15.2 206:31.23 postgres: st stk 127.0.0.1(42126) SELECT
19090 postgres  15   0 7495m 7.2g 7.1g S 14.2 15.2 155:23.52 postgres: st stk 127.0.0.1(43897) SELECT
14857 postgres  16   0 7485m 7.2g 7.1g D 10.9 15.2  36:12.30 postgres: st stk 127.0.0.1(52229) SELECT
15862 postgres  15   0 7495m 7.2g 7.1g S 10.0 15.2 146:18.47 postgres: st stk 127.0.0.1(60728) SELECT
9485 postgres  16   0 7488m 7.2g 7.1g S  3.3 15.2 191:53.33 postgres: st stk 127.0.0.1(42127) SELECT

1 Answer 1

1

shared_buffers appear to be mapped into RSS on Linux when the page is mapped into a process's address space by a read or write operation to it.

The RAM is in fact shared, it's just how Linux accounts for the RAM and how top displays it that's an issue.

http://wiki.postgresql.org/wiki/FAQ#Why_does_PostgreSQL_use_so_much_memory.3F

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.