[pgpool-general: 462] Re: Tuning for 1000 concurrent connections (load balancing)

Lazaro Ruben Garcia Martinez lgarciam at uci.cu
Wed May 16 21:43:24 JST 2012


According to the postgresql documentation, max_connections is the maximum number of concurrent connections to the database server, but I don't understand why max_connections must satisfy the formula max_pool * num_init_children <= (max_connections - superuser_reserved_connections), if num_init_children is also the concurrent connections limit to pgpool-II from clients and max_pool is the maximum number of cached connections in pgpool-II children processes. I am confuse with these parameters and I'll apreciate some answer. 

Thank you very much for your time. 
Regards. 

----- Mensaje original -----

> What is max_connections actually?
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese: http://www.sraoss.co.jp

> > I have a doubt about this. If pgpool-II only accepts 350
> > connections simultaneously, Why max_connections in postgresql.conf
> > should be
> > max_pool * num_init_children <= (max_connections -
> > superuser_reserved_connections)
> >
> > Regards.
> > ----- Mensaje original -----
> >
> >> > On 15/05/12 15:24, Tatsuo Ishii wrote:
> >> >> Yes, no swap in/out and almost see no activies.
> >> >>
> >> >>
> >> >> If you lower num_init_children, do you see any performance
> >> >> improvement?
> >> >>
> >> > Weird, I've tried with num_init_children = 350, keeping max_pool
> >> > =
> >> > 2,
> >> > and it seems working!
> >> > 350*2 = 750, how it can handle 1000 connections?
> >
> >> It simply does queueing. pgpool-II uses listen(2) to accept
> >> incoming
> >> connection requests from clients. If num_init_children = 350, then
> >> pgpool-II can accept simulately 350 connections (not 350*2 = 700).
> >> The
> >> 350+1 th incoming connection will be delayed in the kernel queue
> >> until
> >> one of 350 existing connections is terminated thus it starts to
> >> accept
> >> new connection.
> >> --
> >> Tatsuo Ishii
> >> SRA OSS, Inc. Japan
> >> English: http://www.sraoss.co.jp/index_en.php
> >> Japanese: http://www.sraoss.co.jp
> >> _______________________________________________
> >> pgpool-general mailing list
> >> pgpool-general at pgpool.net
> >> http://www.pgpool.net/mailman/listinfo/pgpool-general
> >
> >> 10mo. ANIVERSARIO DE LA CREACION DE LA UNIVERSIDAD DE LAS CIENCIAS
> >> INFORMATICAS...
> >> CONECTADOS AL FUTURO, CONECTADOS A LA REVOLUCION
> >
> >> http://www.uci.cu
> >> http://www.facebook.com/universidad.uci
> >> http://www.flickr.com/photos/universidad_uci
> >
> >
> > 10mo. ANIVERSARIO DE LA CREACION DE LA UNIVERSIDAD DE LAS CIENCIAS
> > INFORMATICAS...
> > CONECTADOS AL FUTURO, CONECTADOS A LA REVOLUCION
> >
> > http://www.uci.cu
> > http://www.facebook.com/universidad.uci
> > http://www.flickr.com/photos/universidad_uci

> 10mo. ANIVERSARIO DE LA CREACION DE LA UNIVERSIDAD DE LAS CIENCIAS
> INFORMATICAS...
> CONECTADOS AL FUTURO, CONECTADOS A LA REVOLUCION

> http://www.uci.cu
> http://www.facebook.com/universidad.uci
> http://www.flickr.com/photos/universidad_uci


10mo. ANIVERSARIO DE LA CREACION DE LA UNIVERSIDAD DE LAS CIENCIAS INFORMATICAS...
CONECTADOS AL FUTURO, CONECTADOS A LA REVOLUCION

http://www.uci.cu
http://www.facebook.com/universidad.uci
http://www.flickr.com/photos/universidad_uci
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20120516/8074d887/attachment.html>


More information about the pgpool-general mailing list