Re: "Out of memory" errors..

From: "Lim Berger" <straightfwd007(at)gmail(dot)com>
To: "Sander Steffann" <s(dot)steffann(at)computel(dot)nl>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Postgresql General List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: "Out of memory" errors..
Date: 2007-08-14 13:30:36
Message-ID: 69d2538f0708140630u17d7f65dja1e0205e87b5a177@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 8/14/07, Sander Steffann <s(dot)steffann(at)computel(dot)nl> wrote:
> Hi Lim,
>
> >> It might also be in /etc/security/limits.conf.
> >
> > Thanks. I see these two lines in that file:
> >
> > postgres soft nofile 8192
> > postgres hard nofile 8192
> >
> > How should I change these values? I am not sure how this reflects the
> > "ulimit" options.
>
> Those are limits to the allowed number of open files (ulimit -n). I think
> 8192 should be enough for PostgreSQL. The problem you had were related to
> other settings, so if only the "nofile" setting is changed your strange
> ulimits do not come from here :-)

I have finally figured out how to increase the ulimit for postgres
user. My new ulimit values are:

------
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
pending signals (-i) 1024
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 4096
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 14335
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
------

Now if I want a "maintenance_work_mem" of 64M for Postgresql, what
should the "max user processes" setting be in my ulimit, or the "open
files" setting etc? Is there a Postgresql help or doc page I can read
to see how these values map? I'd like to be more educated in how I
test to tweak these OS level values!

Thanks.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sander Steffann 2007-08-14 13:42:29 Re: "Out of memory" errors..
Previous Message Josh Trutwin 2007-08-14 12:50:21 Re: Persistent connections in PHP