Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Mar 2006 15:29:03 -0600
From:      Miguel <mmiranda@123.com.sv>
To:        Charles Swiger <cswiger@mac.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: setting shmmax for postgres
Message-ID:  <441F1E9F.8000408@123.com.sv>
In-Reply-To: <2F7CD998-9048-4299-BEED-9CA475787B2B@mac.com>
References:  <441F125F.8030101@123.com.sv> <2F7CD998-9048-4299-BEED-9CA475787B2B@mac.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Charles Swiger wrote:

> On Mar 20, 2006, at 3:36 PM, Miguel wrote:
>
>> shiva2# sysctl -a kern.ipc.shmmax
>> kern.ipc.shmmax: 2147483647
>

Opss, typo here, its 1147483647

>>
>> but postgres always fails with this error
>>
>> The PostgreSQL documentation contains more information about shared  
>> memory configuration.
>> FATAL:  could not create shared memory segment: Cannot allocate memory
>> DETAIL:  Failed system call was shmget(key=5432001,  size=1149067264, 
>> 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 1149067264 bytes), reduce  
>> PostgreSQL's shared_buffers parameter (currently 137626) and/or its  
>> max_connections parameter (currently 200).
>
>
> Just how much RAM do you have in the machine?  I don't think you can  
> allocate more than 256MB or so to SysV shared memory without tuning  
> the number of KVA pages being allocated to the kernel...?  Maybe it  
> depends on whether the SysV shmem segments are wired down by default  
> or not, I think there's a sysctl which controls that.

I have 3G of RAM

>
> You should revert Postgres back to a more reasonable default shared  
> region size for now and rebuild the kernel to increase these  
> parameters if you actually have the RAM and the need to do so.
>
> -- 
> -Chuck

what parameters?
I cant find any related in GENERIC

---
Miguel




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?441F1E9F.8000408>