pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedSHMEM settings under FreeBSD
2+ messages / 2 participants
[nested] [flat]
* SHMEM settings under FreeBSD
@ 2001-03-19 05:24 Michael Fork <mfork@toledolink.com>
0 siblings, 1 reply; 2+ messages in thread
From: Michael Fork @ 2001-03-19 05:24 UTC (permalink / raw)
To: pgsql-admin
I am trying to run postgres under 4.2-STABLE FreeBSD using a large amount
of shared memory, and am having problems finding the correct settings.
The box has 512MB or RAM, of which I would like for Postgres to use 400MB
for buffers and 32MB for sorting, which I determined would be:
-B 51200 (51200 pages * 8kb/page = 400*1024kb)
-S 32768 (since the value is in kb)
However, when starting I get the following error:
IpcMemoryCreate: shmget failed (Cannot allocate memory) key=5432001,
size=427022336, permission=600
I tried increasing the kern.ipc.shmmax to 427022336 and 457022336, but I
am stil unable to get postgres to start.
Any Ideas?
Thanks
Michael Fork - CCNA - MCP - A+
Network Support - Toledo Internet Access - Toledo Ohio
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: SHMEM settings under FreeBSD
@ 2001-03-19 06:40 Tom Lane <tgl@sss.pgh.pa.us>
parent: Michael Fork <mfork@toledolink.com>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2001-03-19 06:40 UTC (permalink / raw)
To: Michael Fork <mfork@toledolink.com>; +Cc: pgsql-admin
Michael Fork <mfork@toledolink.com> writes:
> The box has 512MB or RAM, of which I would like for Postgres to use 400MB
> for buffers and 32MB for sorting, which I determined would be:
This is a bad idea. For one thing, you have neglected to allow anything
for backend local data; you should probably leave at least 10-20MB per
backend to avoid swap thrashing. (And you do realize that -S is the
amount of memory to use *per sort operation*? Each backend will feel
entitled to use that much for each sort it's doing, which could well
be several on a complex query.)
Also, I think you are better off leaving a good chunk of memory free for
kernel disk buffering, even on a machine that's not going to do anything
but Postgres.
While you didn't say how many backends you intend to run, my first
instinct would be to allocate no more than 100 to 200Mb of your box
for Postgres disk buffers. They're not the only thing that you want
to use memory for.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2001-03-19 06:40 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-03-19 05:24 SHMEM settings under FreeBSD Michael Fork <mfork@toledolink.com>
2001-03-19 06:40 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox