Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YGtfb-0001La-2w for pgsql-admin@arkaria.postgresql.org; Thu, 29 Jan 2015 18:18:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YGtfa-0008Fv-IP for pgsql-admin@arkaria.postgresql.org; Thu, 29 Jan 2015 18:18:22 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YGtfZ-0008DT-5x for pgsql-admin@postgresql.org; Thu, 29 Jan 2015 18:18:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YGtfW-0000d0-6Q for pgsql-admin@postgresql.org; Thu, 29 Jan 2015 18:18:19 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t0TIIGDE011111; Thu, 29 Jan 2015 13:18:16 -0500 From: Tom Lane To: John Scalia cc: "pgsql-admin@postgresql.org" Subject: Re: hugepage configuration for V.9.4.0 In-reply-to: <54CA73CE.1050503@gmail.com> References: <54CA73CE.1050503@gmail.com> Comments: In-reply-to John Scalia message dated "Thu, 29 Jan 2015 12:54:22 -0500" Date: Thu, 29 Jan 2015 13:18:16 -0500 Message-ID: <11110.1422555496@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org John Scalia writes: > I'm certain that I'm no expert for this one, as I've never had to configure this parameter for anything prior, but I continue to get a startup error when I try to use this. The > server is a VM running CentOS 6.5 with 4 Gb allocated to it. When I started setting "huge_pages = on", the server reported: > %FATAL: could not map anonymous shared memory: Cannot allocate memory > %HINT: this error usually means that PostgreSQL's request for a shared memory segment exceeded available memory, swap space, or huge pages. To reduce the request size (currently > 1124876288 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections. > Further research showed that server's /sys/kernel/mm/transparent_hugepage/enabled file contained "[always] madvise never" > As I was concerned about the "always" setting, I used "cat madvise > " to the file so it reported "always [madvise] never" I even set this in /etc/rc.local and performed a reboot. FWIW, I think that the transparent_hugepage setting is irrelevant to this. The whole point here is that we're explicitly asking for a hugepage memory segment, so the OS doesn't have to try to make it transparent. What might be happening is that when requesting a hugepage segment, we actually round up the request (here claimed to be 1124876288 bytes) to the next 2MB boundary. Is it possible your kernel settings are such that the slightly larger request fails? Also, there may well be request limits that apply specifically to hugepage segments; I don't know too much about that. regards, tom lane -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin