Thu, 29 Oct 2009 04:57:36 +0100 In response to: > On Thu, Oct 29, 2009 at 01:20:12AM +0100, Holger Amann wrote: > > > Am 29.10.2009 um 01:00 schrieb Lukasz Czarnowski: > > > >I had the same experience with kernel 2.6.22.x-vs2.2.x and pgsql 8.1 > > >- shmem is counted several times. > > > I played with the shared memory example shown at [1] and it seems, > > that in general everything is working fine, except Postgres. > > So, until someone is able to fix this, Linux vServer and Postgres -> > > Don't do it! :( > > hmm, seems I'm still not understanding what the problem > is here, will read the thread again, in the meanwhile, > any hints are appreciated ... In my observation, simply memory counter (RSS in /proc/virtual/<xid>/limits) shows wrong value (if i use postgresql in guest). Step by step: 1) create minimal host and guest 2) run postgresql (in guest) with sample database and create multiple connections to it 3) check `free' on guest (result: (x+y) MB, where x -> system, y -> postgresql with shm) 4) enable VIRT_MEM 5) check `free' on guest (result: ~ (y*z) MB, where z is the number of processess postgresql) or compare result `ps aux' with /proc/virtual/<xid>/limits The effect is more pronounced, if we increase value 'shared_buffers' in postgresql.conf. Sorry for my poor English, i can't explain this otherwise ;o) Maybe, it will help. Best regards, -- Lukasz Czarnowski