Re: FreeBSD 7 needing to allocate lots of shared memory

Поиск
Список
Период
Сортировка
От Christiaan Willemsen
Тема Re: FreeBSD 7 needing to allocate lots of shared memory
Дата
Msg-id 492130A1.5020303@technocon.com
обсуждение исходный текст
Ответ на Re: FreeBSD 7 needing to allocate lots of shared memory  (Christiaan Willemsen <cwillemsen@technocon.com>)
Ответы Re: FreeBSD 7 needing to allocate lots of shared memory  ("Isak Hansen" <isak.hansen@gmail.com>)
Список 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, 

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: avoid replace of column with variable in pgsql function
Следующее
От: "Mr. John"
Дата:
Сообщение: Problem with pg_restore into new database