Re: PGSQL 11.4: shared_buffers and /dev/shm size - Mailing list pgsql-general

From Konstantin Malanchev
Subject Re: PGSQL 11.4: shared_buffers and /dev/shm size
Date
Msg-id 1D244A41-F688-4C6A-A9E7-436BC9DB1343@gmail.com
Whole thread Raw
In response to Re: PGSQL 11.4: shared_buffers and /dev/shm size  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-general
> 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
isout 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
lastentry 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




pgsql-general by date:

Previous
From: Ron
Date:
Subject: Re: pg_dump and search_path
Next
From: Dave Hughes
Date:
Subject: Re: SuperUser permission denied when creating table.