2011/6/17 =E1=CE=D4=CF=CE =F3=D4=C5=D0=C1=CE=C5=CE=CB=CF <zlobnynigga@yande=
x.ru>:
>>
>> I wonder if you are oversubscribing your memory, and are getting weird
>> errors when reading data into memory because the pages can't be
>> reserved to do that. =9AWhat happens when you enable overcommit and
>> attempt to start the server?
>>
>> merlin
>
> In my first post I wrote: "I tried to set vm.overcommit_memory=3D2 and vm=
.overcommit_ratio=3D90 - no sense. Then I tried vm.overcommit_memory=3D1 - =
no sense."
> "No sense" means that server starts, works for about 3 hours, and then di=
es with signal 7 and almost all buffers filled. Just as with vm.overcommit_=
memory=3D0.
> I copypasted vmstat log, that shows that there were 5Gb of free memory wh=
en postgresql died. In one of my experiments postgresql worked for about ha=
lf an hour with 0k free memory (at least top and vmstat said so). Abscence =
of free memory was caused by the fact that replica had been down for 12 hou=
rs or so, and when started wal writer procees took much resources. But it w=
as woking! With no free memory.
> But this is not important. As I noticed the thing is not how much free me=
mory I have. The thing is how shared buffers are filled. And shared buffers=
fillings makes sense only when they are set to 12Gb. When they set to less=
- everything works fine.
> If I am oversubcribing memory - then I expect to get some "out of memory =
error" and see 0k free in top output.
> Memory for shared buffers can not be ovesubscribed - because if kernel di=
d not provide enough shared memory postgres will not start.
> If I am wrong - please, explain why and where.
No, that's all correct, but I smell a rat. Could be the
virtualization software, not sure. But the problem looks not to be
with postgres...the server is just reporting o/s calls that are
returning with error.
merlin