Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id B20C7B5D944 for ; Fri, 17 Jun 2011 17:53:24 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 15427-04 for ; Fri, 17 Jun 2011 20:53:18 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com [209.85.216.181]) by mail.postgresql.org (Postfix) with ESMTP id 5FBB1B5D803 for ; Fri, 17 Jun 2011 17:53:18 -0300 (ADT) Received: by qyk9 with SMTP id 9so273646qyk.19 for ; Fri, 17 Jun 2011 13:53:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=/0WcW8Ipys8548eaqxTrrJCXCvy3WYBFZOa9/BbErCo=; b=LO7I98aB/VYRzSUDnWEvQazZM8qMDwjQoWfazUEjg4xFxwOzV4n1F09Z/AEQJnxacn M25RdhljCwQfkP7K3rreCVoWcv7TI6eKOuMQuLV5pPCeMMg4dbGdzq5y7wePwqVzP1Vc wtr8SZsk0BXy6NQS4mRqKvGVkS3c2pFcy7iio= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=eYicqM3XTjuJDYCc79YKIDWgiG6sDvpy/fkWsw97P0Kzj2mIKBuSCMZ4CljnYFaQO0 KQcsnU2GHVqXIlGrm3v5oaXfkA3SnHwlr2RStf7SDKiakGXSFyAITVNhYXpIZIDTqWMu DTw5vVjFk8v9mivgTbdm1x5m12BwVfsdVlV2U= MIME-Version: 1.0 Received: by 10.224.197.132 with SMTP id ek4mr2186602qab.382.1308343998154; Fri, 17 Jun 2011 13:53:18 -0700 (PDT) Received: by 10.224.28.85 with HTTP; Fri, 17 Jun 2011 13:53:18 -0700 (PDT) In-Reply-To: <1245841308343644@web94.yandex.ru> References: <1208551308255001@web137.yandex.ru> <4DFA2130020000250003E76A@gw.wicourts.gov> <438511308318660@web144.yandex.ru> <4DFB32F4020000250003E7E2@gw.wicourts.gov> <1202541308329125@web105.yandex.ru> <56961308340142@web152.yandex.ru> <1245841308343644@web94.yandex.ru> Date: Fri, 17 Jun 2011 15:53:18 -0500 Message-ID: Subject: Re: could not read block XXXXX in file "base/YYYYY/ZZZZZZ": read only 160 of 8192 bytes From: Merlin Moncure To: =?KOI8-R?B?4c7Uz84g89TF0MHOxc7Lzw==?= Cc: Kevin Grittner , pgsql-bugs@postgresql.org Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.373 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, FSL_RU_URL=2.271, RFC_ABUSE_POST=0.001 X-Spam-Level: X-Archive-Number: 201106/159 X-Sequence-Number: 30538 2011/6/17 =E1=CE=D4=CF=CE =F3=D4=C5=D0=C1=CE=C5=CE=CB=CF : >> >> 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