Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WUdvA-0007bs-IT for pgsql-general@arkaria.postgresql.org; Mon, 31 Mar 2014 15:14:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WUdv9-0003av-Ti for pgsql-general@arkaria.postgresql.org; Mon, 31 Mar 2014 15:14:43 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WUdv8-0003ad-GW; Mon, 31 Mar 2014 15:14:42 +0000 Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WUdv5-0001gG-Bv; Mon, 31 Mar 2014 15:14:41 +0000 Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id E9B90CA5; Mon, 31 Mar 2014 11:14:37 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Mon, 31 Mar 2014 11:14:37 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=aklaver.com; h= message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; s=mesmtp; bh=0wP3QczG9P3ad7XQLhXS/PLej50=; b=F9HkYhwml0TmJFmoC1ZmoMQQvBz/ 9c/skMeIWPvDEkf08cIOCG3GNfZ/MhRLrvqj4tIgLv2tX6PRt3yLLbNq9BoYs62E tv1OIKKiAUQSIqgQUTNOJ2fXW4AsCd7vZchlfX+dcWiTp89p2iNgGhD0VkU4tAmr C4KkHMfV1L/ZbHo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=0wP3QczG9P3ad7XQLhXS/P Lej50=; b=abDbyZm1A+k0XuVGS4/lBC8Y12ST2Y/3zqpkTNQYD4ihgSlYoGbcAH KPdp9uJSCUS1uQw7PTZiBYN9DDt9zxPus638K0Qz/Tk1sHiZgFMhENHo8dgKNUS7 0V7BFCg3qGw60SoVZNafZxDx47+5SReLP0u17O8y8h34wTaLL4gq4= X-Sasl-enc: 64FsE2YGRCCRHgdgcipqtP0P64zuv6BEqiEbGDAJ1Hat 1396278877 Received: from panda.site (unknown [97.113.11.16]) by mail.messagingengine.com (Postfix) with ESMTPA id DE27B680093; Mon, 31 Mar 2014 11:14:36 -0400 (EDT) Message-ID: <5339865C.9020209@aklaver.com> Date: Mon, 31 Mar 2014 08:14:36 -0700 From: Adrian Klaver User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Tom Lane CC: Willy-Bas Loos , lst_hoe02@kwsoft.de, pgsql-admin , "pgsql-general@postgresql.org" Subject: Re: [ADMIN]openvz and shared memory trouble References: <53357E83.2040101@aklaver.com> <53370026.2040509@aklaver.com> <53397DE7.2070903@aklaver.com> <15934.1396278062@sss.pgh.pa.us> In-Reply-To: <15934.1396278062@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org On 03/31/2014 08:01 AM, Tom Lane wrote: > Adrian Klaver writes: >> On 03/31/2014 04:12 AM, Willy-Bas Loos wrote: >>> I'm still worried that it's like Tom Lane said in another discussion:"So >>> basically, you've got a broken kernel here: it claimed to give PG circa >>> (135MB) of memory, but what's actually there is only about (128MB). I >>> don't see any connection between those numbers and the shmmax/shmall >>> settings, either --- so I think this must be some busted implementation >>> of a VM-level limitation." >>> (here: >>> http://www.postgresql.org/message-id/CAK3UJREBcyVBtr8D7vMfU=uDdkjXkrPnGcuy8erYB0tMfKe1LA@mail.gmail.com) >>> >>> And it makes me wonder what else may be issues that arise from that. But >>> especially, what i can do about it. > > FWIW, I went back and re-read that message while perusing this thread, > and this time it struck me that there was a significant bit of evidence > I'd overlooked: namely, that the buffer block array is by no means the > last thing in Postgres' shared memory segment. There are a bunch of > other shared data structures allocated after it, some of which almost > certainly had to have been touched by the startup subprocess. The gdb > output makes it clear that the kernel stopped providing memory at > 0xb6c4b000; but either it resumed doing so further on, or the whole shared > memory segment *had* been provisioned originally, and then part of it > got unmapped again while the startup process was running. > > So it's still clearly a kernel bug, but it seems less likely that it is > triggered by some static limit on shared memory size. Perhaps instead, > the kernel had been filling in pages for the shared segment on-demand, > and then when it got to some limit it refused to do so anymore and allowed > a SIGBUS to happen instead. > >> I do not use openvz so I do not have a test bed to try out, but this >> page seems to be related to your problem: >> http://openvz.org/Resource_shortage >> or if you want more detail and a link to what looks to a replacement for >> beancounters: >> http://openvz.org/Setting_UBC_parameters > > If this software's idea of resource management is to allow SIGBUS to > happen upon attempting to use memory that had been successfully granted, > then it's a piece of junk that you should get rid of ASAP. (No, I > don't like Linux's OOM-kill solution to resource overcommit either.) At this point the memory allocation as a problem is as much conjecture as anything else, at least to me. So what is causing SIGBUS is an open question in my mind. > > regards, tom lane > > -- Adrian Klaver adrian.klaver@aklaver.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general