From: | Christiaan Willemsen <cwillemsen(at)technocon(dot)com> |
---|---|
To: | Christiaan Willemsen <cwillemsen(at)technocon(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: FreeBSD 7 needing to allocate lots of shared memory |
Date: | 2008-11-17 08:51:45 |
Message-ID: | 492130A1.5020303@technocon.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I still would like to allocate a bit more than 1 Gb of shared_memory on
FreeBSD. So if anyone has any pointers what settings I do need to make,
please let me know.
Kind regards,
Christiaan Willemsen
Christiaan Willemsen wrote:
> Yes, it is a 64 bit machine, I'm sure of that:
>
> file ../bin/postgres
> ../bin/postgres: ELF 64-bit LSB executable, x86-64, version 1
> (FreeBSD), for FreeBSD 7.0 (700055), dynamically linked (uses shared
> libs), FreeBSD-style, not stripped
>
> I just set kern.ipc.shmall equal to kern.ipc.shmmax, still won't start
> with more than 1GB of shared memory.
>
> And yes, you can let the OS do the caching, but as far as I
> understood, you either the the OS cache a lot, of you set
> shared_buffers large enough so that large portions of tables can fit
> inside of it also acting as a cache. Since this last one has far less
> overhead, it is argued that this solution would be faster. But other
> people tend to say that this is not the case, and you should use a
> smaller shared_buffer size.... I don't know yet, but want to find
> out. Anyway, I should be able to set it to more than 1GB...
>
> Kind regards,
>
> Christiaan Willemsen
>
>
> Martijn van Oosterhout wrote:
>> On Fri, Nov 14, 2008 at 01:56:31PM +0100, Christiaan Willemsen wrote:
>>
>>> 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:
>>>
>>
>> Umm, do you have a specific reason for not allowing the OS to cache
>> your DB? Is it actually a 64-bit machine you're running on?
>>
>>
>>> kern.ipc.shm_use_phys=1
>>> kern.ipc.semmap=512
>>> kern.ipc.shmall=65536
>>> kern.ipc.shmmax=68719476736
>>>
>>
>> That shmall limits you to at most 256MB, maybe you want to change that
>> also?
>>
>> I'd suggest making shared buffers at most a few GB and use the rest for
>> caching.
>>
>> Have a nice day,
>>
From | Date | Subject | |
---|---|---|---|
Next Message | Mr. John | 2008-11-17 09:08:44 | Problem with pg_restore into new database |
Previous Message | Tom Lane | 2008-11-16 23:49:11 | Re: avoid replace of column with variable in pgsql function |