[Lxc-users] postgres

Papp Tamas tompos at martos.bme.hu
Mon May 14 09:17:43 UTC 2012


On 05/14/2012 11:05 AM, Matthijs Kooijman wrote:

hi!

>> kernel.shmmax = 2147483648
>> kernel.shmall = 2147483648
>> kernel.shmmni = 4096
> I assume you misspelled "shmmin" there?

No.
Do you have shmmin?:)

> Where did you set these values?

sysctl -a|grep shm

>> Originally the maximum value was 25M, I don't know how, but I could
>> increase it until 29M.
>> It starts fine with shared_buffers = 29M .
> I'm not sure which value you are talking about now exactly? In the lines
> you pasted above, you have shmmax and shmall set to 2048MB (2^31) and
> shmmin to 4KB. Did you perhaps accidentally start increasing the shmmin
> value instead of shmmax?

No, I didn't.

shmni value is default.
I increased shmmax and shmall.

>> the kernel with larger SHMMAX.  To reduce the request size (currently
>> 34455552 bytes), reduce PostgreSQL's shared memory usage, perhaps by
> This is just under 33MB, it seems, so it makes sense that it fails if
> your max is set to 30MB. It is weird that it succeeds with 29M,
> though. Perhaps postgresql is doing som checks against these parameters
> and switches to a different mode of operation when you reach 30M for
> some reason.


Additional info, postgresql sometimes just stops working. There is no 
obvious reason in logs, just not works on some table (other tables are 
OK in the same database). Usually we see this when there is some 
modification to the structure of the database or something like that 
(alter table...).

>> If I chroot to the container from the host it just works as expected.
> Does that still work if you change the value of shmmax in the host?

Yes. BTW, shm values can be changed only on the host.

tamas




More information about the lxc-users mailing list