Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hkqG8-00073a-HQ for pgsql-general@arkaria.postgresql.org; Tue, 09 Jul 2019 13:34:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hkqG6-0000FL-NN for pgsql-general@arkaria.postgresql.org; Tue, 09 Jul 2019 13:34:14 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hkqDf-0001Em-Rm for pgsql-general@lists.postgresql.org; Tue, 09 Jul 2019 13:31:44 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hkqDd-00070R-O0 for pgsql-general@postgresql.org; Tue, 09 Jul 2019 13:31:43 +0000 Received: by mail-lf1-x130.google.com with SMTP id x3so7497654lfc.0 for ; Tue, 09 Jul 2019 06:31:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=cMKqoZgACKa9Oac3SHklKT+7K9TL1rzdB0AYr49CrjI=; b=bE8R3v6vjmofIRUeP+BN/ihCz1Q23UzA0IWhJFpgelS5TtGyg+egPgg7LJkcgv9PbA mrPAuSAHW2EqDqehYgMj2hbfer3yTX6FrF9To/QvYtX8y8343yIjsbTsGlBxlCZRv+sp xu5AUaIL0h0iukGWK9/jTiXYbLdQeLURkoRrTD8FQv6O9dGhzsJSXXEAjv1qVOb5RYOR 8v9xB7oYTI5hxJmd4ZFm/SaFKoDznqigXGS/48+vSHN16U1JLekS0zuxZntZu5x6xOVF I86KUWnHz7mQL7iQCQ0BThVK70qLDvIXmDBhiDpp/iuyfilkfhGmoEip6/xalAeIF4kJ b1eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=cMKqoZgACKa9Oac3SHklKT+7K9TL1rzdB0AYr49CrjI=; b=puRymQmFIj6ej1dOPS2urw8bjvTDbJryXO7AQgPddUFXw72VndFyywBt7AD/OPdLZZ 1+5DJtbrkulIfuSgWJXaSyNn7sVoR+5JakfP7qFBowok47qOKIHgemQnKwG3QQ25HT14 hgxluhiaHCwv8yh/mZiAmrYpYGI4p90a6HGw+U93LuDoveli0ifnMr+h20TFXJynp7B+ RmEiShg1Tr6ygwHUre7qVW/FI1KsJTv8zUSAlNpp7+KYwY4XBm69XI5udKrlsnTeenkx L+9QoCZfBzpxBKumuLGVzzxqpl8Lq/YDw49mVyRrhdFFGF4rAj7MrfJC04Sd43whC3wU d5YA== X-Gm-Message-State: APjAAAUSRmfMX7o8PXybqgYEQ/rtnC9mBeC08MZ5HVjV0CVF69paUM6B 85UnhaE8Wr4ZuvYAMLMZSpI= X-Google-Smtp-Source: APXvYqxeIssIhfy5gXbz8obSrNmNyJjGsKQq30usiwpmBxXhWvV8UB9wWCY2KgNMrrWIvVA270ydgw== X-Received: by 2002:a05:6512:484:: with SMTP id v4mr12318747lfq.66.1562679100650; Tue, 09 Jul 2019 06:31:40 -0700 (PDT) Received: from [172.20.1.244] ([93.180.21.1]) by smtp.gmail.com with ESMTPSA id u15sm2432901lje.89.2019.07.09.06.31.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jul 2019 06:31:40 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: PGSQL 11.4: shared_buffers and /dev/shm size From: Konstantin Malanchev In-Reply-To: Date: Tue, 9 Jul 2019 16:31:39 +0300 Cc: Jean Louis , pgsql-general Content-Transfer-Encoding: quoted-printable Message-Id: <1D244A41-F688-4C6A-A9E7-436BC9DB1343@gmail.com> References: <7E4D7DA4-E093-4F6A-AE8E-81A73B995A8D@gmail.com> <20190709095344.GK7323@protected.rcdrun.com> <63682227-874F-43A9-8879-DE875DE9BCC3@gmail.com> <20190709101514.GB10233@protected.rcdrun.com> <825554F8-7D18-4DFA-B01F-5F3A47A66749@gmail.com> <2A639837-888D-474F-AE91-8BBB65952D70@gmail.com> To: Thomas Munro X-Mailer: Apple Mail (2.3445.104.11) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > I think it could fail that way for two reasons: /dev/shm size limit > (mount option, which I think you are saying you have set to 4GB?), or > your system ran out of RAM +swap. df /dev/shm Filesystem 1K-blocks Used Available Use% Mounted on shm 4194304 351176 3843128 9% /dev/shm mount | grep /dev/shm shm on /dev/shm type tmpfs = (rw,nosuid,nodev,noexec,relatime,size=3D4194304k) I have no swap and 8GB of RAM, when there is no active queries only = ~800MB of RAM is used. So I don't believe that it is out of memory = problem. > The directly listing in your first > message only shows 1.4GB, not 4GB, so perhaps it's the second problem. I cannot catch the right moment with ls, but I've run bash for-loop that = that logs "df /dev/shm" every minute and the last entry before fail = shows that 89% of /dev/shm is used: Filesystem 1K-blocks Used Available Use% Mounted on shm 4194304 3732368 461936 89% /dev/shm There is no other processes that use /dev/shm. > It's strange that it's hashing the ~20B row table instead of the ~30M = row table. It could be a question for another mail thread =3D) Konstantin