pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedPG 8.1.1 Cannot allocate shared_buffers memory error
4+ messages / 3 participants
[nested] [flat]
* PG 8.1.1 Cannot allocate shared_buffers memory error
@ 2005-12-14 22:08 Tomeh, Husam <htomeh@firstam.com>
0 siblings, 1 reply; 4+ messages in thread
From: Tomeh, Husam @ 2005-12-14 22:08 UTC (permalink / raw)
To: pgsql-admin; +Cc: Tom Lane <tgl@sss.pgh.pa.us>
I just installed postgres 8.1.1 on a dual optron Linux box running Linux
4 advanced server, with 32GB of RAM and 2GB of swap.
I'm trying to allocate 24 GB as shared_bufferes. I'm getting an error
that I can not allocate memory (see below). If I change my
shared_buffers to 16GB, postgres starts up with no issue. I'm trying to
understand why I'm getting the shared memory error at sizes above 16GB
whilst I have 32GB with appropriate (I think) settings of kernel
parameters. Any help is appreciated. Thanks...
My sysctl.conf has :
kernel.shmmax = 34359738368
kernel.shmall = 34359738368 (32GB).
And here's some of related postgresql.conf parameters:
shared_buffers = 2359296
work_mem = 16384
maintenance_work_mem = 2097152
max_connections = 100
effective_cache_size = 2621440
---
Error:
FATAL: could not create shared memory segment: Cannot allocate memory
[2005-12-14 13:56:03 PST|||] DETAIL: Failed system call was
shmget(key=5432001, size=19760111616, 03600).
[2005-12-14 13:56:03 PST|||] HINT: This error usually means that
PostgreSQL's request for a shared memory segment exceeded available
memory or swap space. To reduce the request size (currently 19760111616
bytes), reduce PostgreSQL's shared_buffers parameter (currently 2359296)
and/or its max_connections parameter (currently 100).
---
Regards,
Husam Tomeh
**********************************************************************
This message contains confidential information intended only for the use of the addressee(s) named above and may contain information that is legally privileged. If you are not the addressee, or the person responsible for delivering it to the addressee, you are hereby notified that reading, disseminating, distributing or copying this message is strictly prohibited. If you have received this message by mistake, please immediately notify us by replying to the message and delete the original message immediately thereafter.
Thank you.
FADLD Tag
**********************************************************************
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: PG 8.1.1 Cannot allocate shared_buffers memory error
@ 2005-12-14 22:38 Tom Lane <tgl@sss.pgh.pa.us>
parent: Tomeh, Husam <htomeh@firstam.com>
0 siblings, 0 replies; 4+ messages in thread
From: Tom Lane @ 2005-12-14 22:38 UTC (permalink / raw)
To: Tomeh, Husam <htomeh@firstam.com>; +Cc: pgsql-admin
"Tomeh, Husam" <htomeh@firstam.com> writes:
> I just installed postgres 8.1.1 on a dual optron Linux box running Linux
> 4 advanced server, with 32GB of RAM and 2GB of swap.
> I'm trying to allocate 24 GB as shared_bufferes. I'm getting an error
> that I can not allocate memory (see below).
While this doesn't answer your question: why are you trying to do that?
AFAIK there is no evidence whatever that that's a good idea. Try
measuring performance at, say, 1Gb, 8Gb, 16Gb of shared buffers and see
where the trend is going before you waste a lot of time fixing the kernel
parameters.
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: PG 8.1.1 Cannot allocate shared_buffers memory
@ 2005-12-14 22:49 Tomeh, Husam <htomeh@firstam.com>
0 siblings, 0 replies; 4+ messages in thread
From: Tomeh, Husam @ 2005-12-14 22:49 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin
You're correct on trying and figuring the appropriate value of
shared_buffers for our application which I'd be doing. However, I wanted
to test how far I can get specially that 8.1 removed the limit of 2GB on
a 64-bit architecture like ours. The other thought is that my assumption
(which I may be wrong about) that the RDBMS (postgres in this case) will
do a better job managing and prioritizing the caching of objects, ie.
tables, data, etc than the kernel's cache which doesn't distinguish
indexes from tables,etc. I might be wrong on that (Linux kernel), but
that was my experience with Oracle on a Solaris box.
Thanks,
---
Husam Tomeh
-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Wednesday, December 14, 2005 2:38 PM
To: Tomeh, Husam
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] PG 8.1.1 Cannot allocate shared_buffers memory
error
"Tomeh, Husam" <htomeh@firstam.com> writes:
> I just installed postgres 8.1.1 on a dual optron Linux box running
Linux
> 4 advanced server, with 32GB of RAM and 2GB of swap.
> I'm trying to allocate 24 GB as shared_bufferes. I'm getting an error
> that I can not allocate memory (see below).
While this doesn't answer your question: why are you trying to do that?
AFAIK there is no evidence whatever that that's a good idea. Try
measuring performance at, say, 1Gb, 8Gb, 16Gb of shared buffers and see
where the trend is going before you waste a lot of time fixing the
kernel
parameters.
regards, tom lane
**********************************************************************
This message contains confidential information intended only for the use of the addressee(s) named above and may contain information that is legally privileged. If you are not the addressee, or the person responsible for delivering it to the addressee, you are hereby notified that reading, disseminating, distributing or copying this message is strictly prohibited. If you have received this message by mistake, please immediately notify us by replying to the message and delete the original message immediately thereafter.
Thank you.
FADLD Tag
**********************************************************************
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: PG 8.1.1 Cannot allocate shared_buffers memory error
@ 2005-12-14 23:44 Anjan Dave <adave@vantage.com>
0 siblings, 0 replies; 4+ messages in thread
From: Anjan Dave @ 2005-12-14 23:44 UTC (permalink / raw)
To: Tomeh, Husam <htomeh@firstam.com>; pgsql-admin; +Cc: Tom Lane <tgl@sss.pgh.pa.us>
Not sure if the kernel shared memory segment size is appropriate, you are allocating all your memory to the chunk.
With 32GB memory, effective_cache_size can be raised, higher, and you can go down on shared_buffers. Check this:
http://www.varlena.com/varlena/GeneralBits/Tidbits/annotated_conf_e.html
-anjan
-----Original Message-----
From: Tomeh, Husam [mailto:htomeh@firstam.com]
Sent: Wed 12/14/2005 5:08 PM
To: pgsql-admin@postgresql.org
Cc: Tom Lane
Subject: [ADMIN] PG 8.1.1 Cannot allocate shared_buffers memory error
I just installed postgres 8.1.1 on a dual optron Linux box running Linux
4 advanced server, with 32GB of RAM and 2GB of swap.
I'm trying to allocate 24 GB as shared_bufferes. I'm getting an error
that I can not allocate memory (see below). If I change my
shared_buffers to 16GB, postgres starts up with no issue. I'm trying to
understand why I'm getting the shared memory error at sizes above 16GB
whilst I have 32GB with appropriate (I think) settings of kernel
parameters. Any help is appreciated. Thanks...
My sysctl.conf has :
kernel.shmmax = 34359738368
kernel.shmall = 34359738368 (32GB).
And here's some of related postgresql.conf parameters:
shared_buffers = 2359296
work_mem = 16384
maintenance_work_mem = 2097152
max_connections = 100
effective_cache_size = 2621440
---
Error:
FATAL: could not create shared memory segment: Cannot allocate memory
[2005-12-14 13:56:03 PST|||] DETAIL: Failed system call was
shmget(key=5432001, size=19760111616, 03600).
[2005-12-14 13:56:03 PST|||] HINT: This error usually means that
PostgreSQL's request for a shared memory segment exceeded available
memory or swap space. To reduce the request size (currently 19760111616
bytes), reduce PostgreSQL's shared_buffers parameter (currently 2359296)
and/or its max_connections parameter (currently 100).
---
Regards,
Husam Tomeh
**********************************************************************
This message contains confidential information intended only for the use of the addressee(s) named above and may contain information that is legally privileged. If you are not the addressee, or the person responsible for delivering it to the addressee, you are hereby notified that reading, disseminating, distributing or copying this message is strictly prohibited. If you have received this message by mistake, please immediately notify us by replying to the message and delete the original message immediately thereafter.
Thank you.
FADLD Tag
**********************************************************************
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2005-12-14 23:44 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-12-14 22:08 PG 8.1.1 Cannot allocate shared_buffers memory error Tomeh, Husam <htomeh@firstam.com>
2005-12-14 22:38 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-12-14 22:49 Re: PG 8.1.1 Cannot allocate shared_buffers memory Tomeh, Husam <htomeh@firstam.com>
2005-12-14 23:44 Re: PG 8.1.1 Cannot allocate shared_buffers memory error Anjan Dave <adave@vantage.com>
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