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  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.
-- Lukasz CzarnowskiReceived on Thu Oct 29 03:57:55 2009