Re: "Out of memory" errors.. - Mailing list pgsql-general

From Lim Berger
Subject Re: "Out of memory" errors..
Date
Msg-id 69d2538f0708140630u17d7f65dja1e0205e87b5a177@mail.gmail.com
Whole thread Raw
In response to Re: "Out of memory" errors..  ("Sander Steffann" <s.steffann@computel.nl>)
Responses Re: "Out of memory" errors..  ("Sander Steffann" <s.steffann@computel.nl>)
List pgsql-general
On 8/14/07, Sander Steffann <s.steffann@computel.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.

pgsql-general by date:

Previous
From: Josh Trutwin
Date:
Subject: Re: Persistent connections in PHP
Next
From: "Sander Steffann"
Date:
Subject: Re: "Out of memory" errors..