Re: Postgresql and Memory Usage

2010-01-28 Thread Tobias Ulmer
On Thu, Jan 28, 2010 at 06:53:06PM -0500, Ted Unangst wrote: > On Thu, Jan 28, 2010 at 6:10 PM, Tobias Ulmer wrote: > > Let's make this simple, on i386 you have 1G per process. Adding all the > > numbers up, you have to stay below this limit. > > That's quite an oversimplification. For starters,

Re: Postgresql and Memory Usage

2010-01-28 Thread Ted Unangst
On Thu, Jan 28, 2010 at 6:10 PM, Tobias Ulmer wrote: > Let's make this simple, on i386 you have 1G per process. Adding all the > numbers up, you have to stay below this limit. That's quite an oversimplification. For starters, we're talking about shm, which doesn't count against your 1GB. The st

Re: Postgresql and Memory Usage

2010-01-28 Thread Tobias Ulmer
On Wed, Jan 27, 2010 at 04:38:08PM -0700, Jeff Ross wrote: > Tobias Ulmer wrote: > >On Wed, Jan 27, 2010 at 02:13:45PM -0700, Jeff Ross wrote: > >>I have searched (and searched) so I wonder if I'm running into the > >>i386 1GB limit I see referenced, as in the thread today about fsck > >>on larger

Re: Postgresql and Memory Usage

2010-01-28 Thread J Sisson
On Wed, Jan 27, 2010 at 3:13 PM, Jeff Ross wrote: > max_connections = 200 # pgtune wizard 2010-01-27 Silly question, but have you tried any kind of connection pooling? If you can drop max_connections down you can reduce the shared memory footprint postgresql has.

Re: Postgresql and Memory Usage

2010-01-28 Thread Ted Unangst
On Thu, Jan 28, 2010 at 1:16 AM, Bret S. Lambert wrote: > On Wed, Jan 27, 2010 at 06:55:29PM -0500, Ted Unangst wrote: >> Shm shouldn't be mapped in the kernel, so large values won't be that >> bad. > > But the way that shared mem is implemented means that larger > values require a larger malloc(9

Re: Postgresql and Memory Usage

2010-01-27 Thread Bret S. Lambert
On Wed, Jan 27, 2010 at 06:55:29PM -0500, Ted Unangst wrote: > Shm shouldn't be mapped in the kernel, so large values won't be that > bad. But the way that shared mem is implemented means that larger values require a larger malloc(9), which can increase the pressure on kva space, which can panic y

Re: Postgresql and Memory Usage

2010-01-27 Thread Ted Unangst
Shm shouldn't be mapped in the kernel, so large values won't be that bad. On Jan 27, 2010, at 5:01 PM, Tobias Ulmer wrote: On Wed, Jan 27, 2010 at 02:13:45PM -0700, Jeff Ross wrote: I have searched (and searched) so I wonder if I'm running into the i386 1GB limit I see referenced, as in the

Re: Postgresql and Memory Usage

2010-01-27 Thread Jeff Ross
Tobias Ulmer wrote: On Wed, Jan 27, 2010 at 02:13:45PM -0700, Jeff Ross wrote: I have searched (and searched) so I wonder if I'm running into the i386 1GB limit I see referenced, as in the thread today about fsck on larger partitions. Yes you do. Also, kernel memory is limited, insane shm valu

Re: Postgresql and Memory Usage

2010-01-27 Thread Tobias Ulmer
On Wed, Jan 27, 2010 at 02:13:45PM -0700, Jeff Ross wrote: > I have searched (and searched) so I wonder if I'm running into the > i386 1GB limit I see referenced, as in the thread today about fsck > on larger partitions. Yes you do. Also, kernel memory is limited, insane shm value will probably (h