pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Konstantin Malanchev <hombit@gmail.com>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Jean Louis <bugs@gnu.support>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: PGSQL 11.4: shared_buffers and /dev/shm size
Date: Tue, 9 Jul 2019 16:31:39 +0300
Message-ID: <1D244A41-F688-4C6A-A9E7-436BC9DB1343@gmail.com> (raw)
In-Reply-To: <CA+hUKGL=Y=tDO_XW9gxuDfnoHCi-ed2-b2tLE9cmT3F6T4BL4Q@mail.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>
	<CA+hUKGJOj7qzDLxeFPVvto8YEWop6FSQoTYPO9Z6Ee=i-nPS_Q@mail.gmail.com>
	<825554F8-7D18-4DFA-B01F-5F3A47A66749@gmail.com>
	<CA+hUKGJJPpOcCX946DEFr+uTf4KO22k=ppBL=9BHi=CyL_=unQ@mail.gmail.com>
	<2A639837-888D-474F-AE91-8BBB65952D70@gmail.com>
	<CA+hUKGL=Y=tDO_XW9gxuDfnoHCi-ed2-b2tLE9cmT3F6T4BL4Q@mail.gmail.com>

> 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=4194304k)

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 =)


Konstantin






view thread (10+ messages)

Message-ID: <1D244A41-F688-4C6A-A9E7-436BC9DB1343@gmail.com>
Permalink:  ../1D244A41-F688-4C6A-A9E7-436BC9DB1343@gmail.com/
Also on:    postgresql.org/message-id/1D244A41-F688-4C6A-A9E7-436BC9DB1343@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: hombit@gmail.com, thomas.munro@gmail.com, bugs@gnu.support
  Subject: Re: PGSQL 11.4: shared_buffers and /dev/shm size
  In-Reply-To: <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> <CA+hUKGJOj7qzDLxeFPVvto8YEWop6FSQoTYPO9Z6Ee=i-nPS_Q@mail.gmail.com> <825554F8-7D18-4DFA-B01F-5F3A47A66749@gmail.com> <CA+hUKGJJPpOcCX946DEFr+uTf4KO22k=ppBL=9BHi=CyL_=unQ@mail.gmail.com> <2A639837-888D-474F-AE91-8BBB65952D70@gmail.com> <CA+hUKGL=Y=tDO_XW9gxuDfnoHCi-ed2-b2tLE9cmT3F6T4BL4Q@mail.gmail.com> <1D244A41-F688-4C6A-A9E7-436BC9DB1343@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox