Max connections
This is a multi-part message in MIME format.
------_=_NextPart_001_01CA1A46.85BACC3B
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
I am setting up a test environment to simulate a very high load. We
have a server farm which is receiving data (cold be thousands of
simultaneous users posting data). I currently have max_connections set
to 500 and the server is starting ok. If I try to increase the
max_connections to 1000, the server is unable to start. I am running a
VM with 4GB RAM. Swap space is not being used, and the system is
showing about 1.5GB of ram not being utilized.
Are there any other config setting which should be changed together with
max_connections to successfully start the postmaster?
------_=_NextPart_001_01CA1A46.85BACC3B
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
[at] font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
..MsoChpDefault
{mso-style-type:export-only;}
[at] page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dpurple>
<div class=3DSection1>
<p class=3DMsoNormal>I am setting up a test environment to simulate a =
very high
load. We have a server farm which is receiving data (cold be =
thousands of
simultaneous users posting data). I currently have max_connections =
set to
500 and the server is starting ok. If I try to increase the
max_connections to 1000, the server is unable to start. I am =
running a VM
with 4GB RAM. Swap space is not being used, and the system is =
showing
about 1.5GB of ram not being utilized.<o:p></o:p></p>
<p class=3DMsoNormal>Are there any other config setting which should be =
changed
together with max_connections to successfully start the =
postmaster?<o:p></o:p></p>
</div>
</body>
</html>
------_=_NextPart_001_01CA1A46.85BACC3B--
Re: Max connections
--0016362836a08403530470d748d1
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
On Tue, Aug 11, 2009 at 3:42 PM, Benjamin Krajmalnik <kraj [at] illumen.com>wrote:
> I am setting up a test environment to simulate a very high load. We have
> a server farm which is receiving data (cold be thousands of simultaneous
> users posting data). I currently have max_connections set to 500 and the
> server is starting ok. If I try to increase the max_connections to 1000,
> the server is unable to start. I am running a VM with 4GB RAM. Swap space
> is not being used, and the system is showing about 1.5GB of ram not being
> utilized.
>
> Are there any other config setting which should be changed together with
> max_connections to successfully start the postmaster?
>
Increasing max_connection will make PostgreSQL to request more System
Vshared memory or semaphores than your operating system's default
configuration allow. Did you tune/tweak the kernel options for that? Details
for those options can be found at
http://www.postgresql.org/docs/8.3/static/kernel-resources.h tml#SYSVIPC
--
Shoaib Mir
http://shoaibmir.wordpress.com/
--0016362836a08403530470d748d1
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On Tue, Aug 11, 2009 at 3:42 PM, Benjamin Krajmalnik <span dir=3D"ltr"><=
<a href=3D"mailto:kraj [at] illumen.com">kraj [at] illumen.com</a>></span> wrote:<=
br><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"bo=
rder-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding=
-left: 1ex;">
<div link=3D"blue" vlink=3D"purple" lang=3D"EN-US">
<div>
<p>I am setting up a test environment to simulate a very high
load.=A0 We have a server farm which is receiving data (cold be thousands o=
f
simultaneous users posting data).=A0 I currently have max_connections set t=
o
500 and the server is starting ok.=A0 If I try to increase the
max_connections to 1000, the server is unable to start.=A0 I am running a V=
M
with 4GB RAM.=A0 Swap space is not being used, and the system is showing
about 1.5GB of ram not being utilized.</p>
<p>Are there any other config setting which should be changed
together with max_connections to successfully start the postmaster?</p>
</div>
</div>
</blockquote></div><br>Increasing max_connection will make <span class=3D"P=
RODUCTNAME">PostgreSQL</span> to request more <span class=3D"SYSTEM=
ITEM">System V</span> shared memory or semaphores than your operati=
ng system's default configuration allow. Did you tune/tweak the=
kernel options for that? Details for those options can be found at <br>
<br><a href=3D"http://www.postgresql.org/docs/8.3/static/kernel-resources.h=
tml#SYSVIPC">http://www.postgresql.org/docs/8.3/static/kerne l-resources.htm=
l#SYSVIPC</a><br clear=3D"all"><br>-- <br>Shoaib Mir<br><a href=3D"http://s=
hoaibmir.wordpress.com/">http://shoaibmir.wordpress.com/</a><br>
--0016362836a08403530470d748d1--
Re: Max connections
This is a multi-part message in MIME format.
------_=_NextPart_001_01CA1A4D.EBB04EB6
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Yes, I had, but apparently the values were not high enough to
accommodate that many connections.
I retuned the IPC kernel setting, and now it appears to be running fine.
Thanks.
From: Shoaib Mir [mailto:shoaibmir [at] gmail.com]
Sent: Monday, August 10, 2009 11:51 PM
To: Benjamin Krajmalnik
Cc: pgsql-admin [at] postgresql.org
Subject: Re: [ADMIN] Max connections
On Tue, Aug 11, 2009 at 3:42 PM, Benjamin Krajmalnik <kraj [at] illumen.com>
wrote:
I am setting up a test environment to simulate a very high load.
We have a server farm which is receiving data (cold be thousands of
simultaneous users posting data). I currently have max_connections set
to 500 and the server is starting ok. If I try to increase the
max_connections to 1000, the server is unable to start. I am running a
VM with 4GB RAM. Swap space is not being used, and the system is
showing about 1.5GB of ram not being utilized.
Are there any other config setting which should be changed
together with max_connections to successfully start the postmaster?
Increasing max_connection will make PostgreSQL to request more System V
shared memory or semaphores than your operating system's default
configuration allow. Did you tune/tweak the kernel options for that?
Details for those options can be found at
http://www.postgresql.org/docs/8.3/static/kernel-resources.h tml#SYSVIPC
--
Shoaib Mir
http://shoaibmir.wordpress.com/
------_=_NextPart_001_01CA1A4D.EBB04EB6
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
[at] font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
[at] font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
..MsoChpDefault
{mso-style-type:export-only;}
[at] page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dpurple>
<div class=3DSection1>
<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>Yes, I had, but apparently the values were not high =
enough to accommodate
that many connections.<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>I retuned the IPC kernel setting, and now it appears to =
be
running fine.<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>Thanks.<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'><o:p> </o:p></span></p>
<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'><o:p> </o:p></span></p>
<div style=3D'border:none;border-left:solid blue 1.5pt;padding:0in 0in =
0in 4.0pt'>
<div>
<div style=3D'border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt =
0in 0in 0in'>
<p class=3DMsoNormal><b><span =
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"' >From:</span>=
</b><span
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"' > Shoaib Mir
[mailto:shoaibmir [at] gmail.com] <br>
<b>Sent:</b> Monday, August 10, 2009 11:51 PM<br>
<b>To:</b> Benjamin Krajmalnik<br>
<b>Cc:</b> pgsql-admin [at] postgresql.org<br>
<b>Subject:</b> Re: [ADMIN] Max connections<o:p></o:p></span></p>
</div>
</div>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal>On Tue, Aug 11, 2009 at 3:42 PM, Benjamin =
Krajmalnik <<a
href=3D"mailto:kraj [at] illumen.com">kraj [at] illumen.com</a>> =
wrote:<o:p></o:p></p>
<div>
<blockquote style=3D'margin-top:5.0pt;margin-bottom:5.0pt'>
<div>
<div>
<p>I am setting up a test environment to simulate a very high =
load. We
have a server farm which is receiving data (cold be thousands of =
simultaneous
users posting data). I currently have max_connections set to 500 =
and the
server is starting ok. If I try to increase the max_connections to =
1000,
the server is unable to start. I am running a VM with 4GB =
RAM. Swap
space is not being used, and the system is showing about 1.5GB of ram =
not being
utilized.<o:p></o:p></p>
<p>Are there any other config setting which should be changed together =
with
max_connections to successfully start the postmaster?<o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
<p class=3DMsoNormal><br>
Increasing max_connection will make PostgreSQL to request more System V =
shared
memory or semaphores than your operating system's default configuration =
allow.
Did you tune/tweak the kernel options for that? Details for those =
options can
be found at <br>
<br>
<a
href=3D"http://www.postgresql.org/docs/8.3/static/kernel-res ources.html#S=
YSVIPC">http://www.postgresql.org/docs/8.3/static/kernel-res ources.html#S=
YSVIPC</a><br
clear=3Dall>
<br>
-- <br>
Shoaib Mir<br>
<a =
href=3D"http://shoaibmir.wordpress.com/">http://shoaibmir.wo rdpress.com/<=
/a><o:p></o:p></p>
</div>
</div>
</body>
</html>
------_=_NextPart_001_01CA1A4D.EBB04EB6--
Re: Max connections
"Benjamin Krajmalnik" <kraj [at] illumen.com> writes:
> I am setting up a test environment to simulate a very high load. We
> have a server farm which is receiving data (cold be thousands of
> simultaneous users posting data). I currently have max_connections set
> to 500 and the server is starting ok. If I try to increase the
> max_connections to 1000, the server is unable to start. I am running a
> VM with 4GB RAM. Swap space is not being used, and the system is
> showing about 1.5GB of ram not being utilized.
Quite honestly, you're living in fantasy land if you expect to support
1000 concurrently active backends on such a restricted server. Get
yourself a connection pooler and knock down max_connections to 100 or
so.
regards, tom lane
--
Sent via pgsql-admin mailing list (pgsql-admin [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Re: Max connections
Tom,
This exercise is exactly to help us size our production server, but I
appreciate what you are saying.
I am using pgbouncer, but my understanding is that I need to make as
many potential connections available on the server side as the maximum
pool size - I will shoot them an email to get some guidance.
As always, thank you so much for your assistance.
> -----Original Message-----
> From: Tom Lane [mailto:tgl [at] sss.pgh.pa.us]
> Sent: Tuesday, August 11, 2009 7:54 AM
> To: Benjamin Krajmalnik
> Cc: pgsql-admin [at] postgresql.org
> Subject: Re: [ADMIN] Max connections
>
> "Benjamin Krajmalnik" <kraj [at] illumen.com> writes:
> > I am setting up a test environment to simulate a very high load. We
> > have a server farm which is receiving data (cold be thousands of
> > simultaneous users posting data). I currently have max_connections
> set
> > to 500 and the server is starting ok. If I try to increase the
> > max_connections to 1000, the server is unable to start. I am
running
> a
> > VM with 4GB RAM. Swap space is not being used, and the system is
> > showing about 1.5GB of ram not being utilized.
>
> Quite honestly, you're living in fantasy land if you expect to support
> 1000 concurrently active backends on such a restricted server. Get
> yourself a connection pooler and knock down max_connections to 100 or
> so.
>
> regards, tom lane
--
Sent via pgsql-admin mailing list (pgsql-admin [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin