FreeBSD 7 needing to allocate lots of shared memory

From: Christiaan Willemsen <cwillemsen(at)technocon(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: FreeBSD 7 needing to allocate lots of shared memory
Date: 2008-11-14 12:56:31
Message-ID: 491D757F.4050101@technocon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm trying to get postgressql running on FreeBSD with 64 GB of memory.
Postgres will the the only thing running, so I want it to use as much
memory as needed.

So I increased shared_memory to 50GB, and also set:

kern.ipc.semmni=512
kern.ipc.semmns=1024
kern.ipc.semmnu=512

in loader.conf and:

kern.ipc.shm_use_phys=1
kern.ipc.semmap=512
kern.ipc.shmall=65536
kern.ipc.shmmax=68719476736

in sysctl.conf, and gave it a reboot, and checked the settings after reboot.

But now, when I try to start postgresql, I get this in my log:

FATAL: could not create shared memory segment: Cannot allocate memory
DETAIL: Failed system call was shmget(key=5432001, size=54866198528,
03600).
HINT: This error usually means that PostgreSQL's request for a shared
memory segment exceeded available memory or swap space. To reduce the
request size (currently 54866198528 bytes), reduce PostgreSQL's
shared_buffers parameter (currently 6553600) and/or its max_connections
parameter (currently 259).
The PostgreSQL documentation contains more information about
shared memory configuration.

According to the setting I have made, I would guess that it should be
able to allocate this much memory. In fact, it only starts if I set the
shared_buffers to as little as 32MB!! So there is clearly something
wrong here... I hope you can tell me what.

PostgresSQL version 8.3.5, compiled on a fresh install of FreeBSD 7 with
no special options.

Kind regards,

Christiaan Willemsen

Responses

Browse pgsql-general by date

  From Date Subject
Next Message serge.luc-cayol 2008-11-14 12:56:34 trouble in installing postgreSQL 8.3
Previous Message Sam Mason 2008-11-14 12:36:04 Re: Upgrading side by side in Gentoo