Thread: What is the Best Postgresql Load Balancing Solution available ?

What is the Best Postgresql Load Balancing Solution available ?

From
Najib Abi Fadel
Date:
Hi,

i was searching for a load balancing solution for
postgres, I found some ready to use software like
PGCluster, Slony, pgpool and others.

It would really be nice if someone knows which one is
the best taking in consideration that i have an
already running application that i need to load
balance.

I would also like to know if someone has used Red Hat
Cluster and GFS for implementing postgresql Load
balancing solution. I have alreay used that for
implementing a mail load balancing solution with 2
sendmail servers running on 2 different machines but
sharing the same storage.

Thanks for any help.

Najib Abi Fadel
System Administrator
Saint-Joseph University

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Re: What is the Best Postgresql Load Balancing Solution available ?

From
"Robin Ericsson"
Date:
On 9/18/06, Najib Abi Fadel <nabifadel@yahoo.com> wrote:
> Hi,
>
> i was searching for a load balancing solution for
> postgres, I found some ready to use software like
> PGCluster, Slony, pgpool and others.
>
> It would really be nice if someone knows which one is
> the best taking in consideration that i have an
> already running application that i need to load
> balance.

There isn't one tool that is the best, all three work very good based
on where they are used and what they are used for.

--
        regards,
        Robin

Re: What is the Best Postgresql Load Balancing Solution available ?

From
Najib Abi Fadel
Date:


Robin Ericsson <lobbin@gmail.com> wrote:
On 9/18/06, Najib Abi Fadel wrote:
> Hi,
>
> i was searching for a load balancing solution for
> postgres, I found some ready to use software like
> PGCluster, Slony, pgpool and others.
>
> It would really be nice if someone knows which one is
> the best taking in consideration that i have an
> already running application that i need to load
> balance.

There isn't one tool that is the best, all three work very good based
on where they are used and what they are used for.

--
regards,
Robin

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
Did you try them or have any experience with them. I need them for load balancing my database and thus making the queries faster. I have a web application heavely using a postgres database. Hundreds of users can connect at the same time to my web application.

Thanks in advance for any help.

Najib.




How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call rates.

Re: What is the Best Postgresql Load Balancing Solution available ?

From
"Ben Trewern"
Date:
The solution you need all depends on the problem you are having.  If you
explain how your application is written PHP, Java, etc and where your
performance problems are coming from, then someone could give you a better
answer!

Regards,

Ben

"Najib Abi Fadel" <nabifadel@yahoo.com> wrote in message
news:20060919053331.34790.qmail@web38301.mail.mud.yahoo.com...


Robin Ericsson <lobbin@gmail.com> wrote:
On 9/18/06, Najib Abi Fadel wrote:
> Hi,
>
> i was searching for a load balancing solution for
> postgres, I found some ready to use software like
> PGCluster, Slony, pgpool and others.
>
> It would really be nice if someone knows which one is
> the best taking in consideration that i have an
> already running application that i need to load
> balance.

There isn't one tool that is the best, all three work very good based
on where they are used and what they are used for.

--
regards,
Robin

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Did you try them or have any experience with them. I need them for load
balancing my database and thus making the queries faster. I have a web
application heavely using a postgres database. Hundreds of users can connect
at the same time to my web application.

Thanks in advance for any help.

Najib.






How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call rates.



Re: What is the Best Postgresql Load Balancing Solution available ?

From
Najib Abi Fadel
Date:

I have a web application that is accessed by a large number of users.
My application is written in PHP and uses postgres.  Apache is our web server.
The performance of my application drops down when a large numbers of users connects at the same time. I need to have a better response time !  That's why i need to load balance the web requests and the database.

Regards,
Najib.

Ben Trewern <ben.trewern@_nospam_mowlem.com> wrote:
The solution you need all depends on the problem you are having. If you
explain how your application is written PHP, Java, etc and where your
performance problems are coming from, then someone could give you a better
answer!

Regards,

Ben

"Najib Abi Fadel" wrote in message
news:20060919053331.34790.qmail@web38301.mail.mud.yahoo.com...


Robin Ericsson wrote:
On 9/18/06, Najib Abi Fadel wrote:
> Hi,
>
> i was searching for a load balancing solution for
> postgres, I found some ready to use software like
> PGCluster, Slony, pgpool and others.
>
> It would really be nice if someone knows which one is
> the best taking in consideration that i have an
> already running application that i need to load
> balance.

There isn't one tool that is the best, all three work very good based
on where they are used and what they are used for.

--
regards,
Robin

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Did you try them or have any experience with them. I need them for load
balancing my database and thus making the queries faster. I have a web
application heavely using a postgres database. Hundreds of users can connect
at the same time to my web application.

Thanks in advance for any help.

Najib.






How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call rates.



---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly


Get your email and more, right on the new Yahoo.com

Re: What is the Best Postgresql Load Balancing Solution available ?

From
Najib Abi Fadel
Date:
I have a web application that is accessed by a large number of users.
My application is written in PHP and uses postgres.  Apache is our web server.
The performance of my application drops down when a large numbers of users connects at the same time. I need to have a better response time !  That's why i need to load balance the web requests and the database.

Regards,
Najib.

Ben Trewern <ben.trewern@_nospam_mowlem.com> wrote:
The solution you need all depends on the problem you are having. If you
explain how your application is written PHP, Java, etc and where your
performance problems are coming from, then someone could give you a better
answer!

Regards,

Ben

"Najib Abi Fadel" wrote in message
news:20060919053331.34790.qmail@web38301.mail.mud.yahoo.com...


Robin Ericsson wrote:
On 9/18/06, Najib Abi Fadel wrote:
> Hi,
>
> i was searching for a load balancing solution for
> postgres, I found some ready to use software like
> PGCluster, Slony, pgpool and others.
>
> It would really be nice if someone knows which one is
> the best taking in consideration that i have an
> already running application that i need to load
> balance.

There isn't one tool that is the best, all three work very good based
on where they are used and what they are used for.

--
regards,
Robin

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Did you try them or have any experience with them. I need them for load
balancing my database and thus making the queries faster. I have a web
application heavely using a postgres database. Hundreds of users can connect
at the same time to my web application.

Thanks in advance for any help.

Najib.






How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call rates.



---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly


How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call rates.

Re: What is the Best Postgresql Load Balancing Solution

From
"Leonel Nunez"
Date:
> I have a web application that is accessed by a large number of users.
> My application is written in PHP and uses postgres.  Apache is our web
> server.
> The performance of my application drops down when a large numbers of users
> connects at the same time. I need to have a better response time !  That's
> why i need to load balance the web requests and the database.
>
> Regards,
> Najib.
>

Before that, are you using  persistent  conecctions ?

Leonel



Re: What is the Best Postgresql Load Balancing Solution

From
Jeff Davis
Date:
On Wed, 2006-09-20 at 00:46 -0700, Najib Abi Fadel wrote:
> I have a web application that is accessed by a large number of users.
> My application is written in PHP and uses postgres.  Apache is our web
> server.
> The performance of my application drops down when a large numbers of
> users connects at the same time. I need to have a better response
> time !  That's why i need to load balance the web requests and the
> database.
>
> Regards,
> Najib.
>

Slony is a well-tested system. I recommend you try Slony and see if it
suits your needs. If not, please tell us where it falls short, and
someone will have another suggestion for you.

Also, as someone else pointed out, make sure you're using connection
pooling if that's appropriate (which it usually is for web
applications).

Regards,
    Jeff Davis


Re: What is the Best Postgresql Load Balancing Solution available ?

From
"Talha Khan"
Date:
You should also consider using connection pooling inorder to attain better performance.
 
Regards
Talha Khan

 
On 9/20/06, Najib Abi Fadel <nabifadel@yahoo.com> wrote:
I have a web application that is accessed by a large number of users.
My application is written in PHP and uses postgres.  Apache is our web server.
The performance of my application drops down when a large numbers of users connects at the same time. I need to have a better response time !  That's why i need to load balance the web requests and the database.

Regards,
Najib.

Ben Trewern <ben.trewern@_nospam_mowlem.com> wrote:
The solution you need all depends on the problem you are having. If you
explain how your application is written PHP, Java, etc and where your
performance problems are coming from, then someone could give you a better
answer!

Regards,

Ben

"Najib Abi Fadel" wrote in message

news:20060919053331.34790.qmail@web38301.mail.mud.yahoo.com...


Robin Ericsson wrote:
On 9/18/06, Najib Abi Fadel wrote:
> Hi,
>
> i was searching for a load balancing solution for
> postgres, I found some ready to use software like
> PGCluster, Slony, pgpool and others.
>
> It would really be nice if someone knows which one is
> the best taking in consideration that i have an
> already running application that i need to load
> balance.

There isn't one tool that is the best, all three work very good based
on where they are used and what they are used for.

--
regards,
Robin

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Did you try them or have any experience with them. I need them for load
balancing my database and thus making the queries faster. I have a web
application heavely using a postgres database. Hundreds of users can connect
at the same time to my web application.

Thanks in advance for any help.

Najib.






How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call rates.



---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly


How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call rates.


Re: What is the Best Postgresql Load Balancing Solution available ?

From
Najib Abi Fadel
Date:
Hi again,

How can i use connection pooling ? Should i use a software like PGPool ? Will the connection pooling boost considerably the performance ?

Leonel adviced me to use persistent connections ? hos do i use that ?

PS: I am using PHP for my applications.

Thanks
Najib


Talha Khan <talha.amjad@gmail.com> wrote:
You should also consider using connection pooling inorder to attain better performance.
 
Regards
Talha Khan

 
On 9/20/06, Najib Abi Fadel <nabifadel@yahoo.com> wrote:
I have a web application that is accessed by a large number of users.
My application is written in PHP and uses postgres.  Apache is our web server.
The performance of my application drops down when a large numbers of users connects at the same time. I need to have a better response time !  That's why i need to load balance the web requests and the database.

Regards,
Najib.

Ben Trewern <ben.trewern@_nospam_mowlem.com> wrote:
The solution you need all depends on the problem you are having. If you
explain how your application is written PHP, Java, etc and where your
performance problems are coming from, then someone could give you a better
answer!

Regards,

Ben

"Najib Abi Fadel" wrote in message

news:20060919053331.34790.qmail@web38301.mail.mud.yahoo.com...


Robin Ericsson wrote:
On 9/18/06, Najib Abi Fadel wrote:
> Hi,
>
> i was searching for a load balancing solution for
> postgres, I found some ready to use software like
> PGCluster, Slony, pgpool and others.
>
> It would really be nice if someone knows which one is
> the best taking in consideration that i have an
> already running application that i need to load
> balance.

There isn't one tool that is the best, all three work very good based
on where they are used and what they are used for.

--
regards,
Robin

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Did you try them or have any experience with them. I need them for load
balancing my database and thus making the queries faster. I have a web
application heavely using a postgres database. Hundreds of users can connect
at the same time to my web application.

Thanks in advance for any help.

Najib.






How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call rates.



---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly


How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call rates.



Do you Yahoo!?
Next-gen email? Have it all with the all-new Yahoo! Mail.

Re: What is the Best Postgresql Load Balancing Solution available ?

From
"Nikolay Samokhvalov"
Date:
As for persistent connection with PHP, start from here:
http://php.net/pg_pconnect.

Also, I recommend to ensure that you have proper set of indexes on
your tables and your system doesn't use badly written queries (such as
join of several dozens of tables :-) ). There is an excellent tool
that can help you monitoring your database, pgFouine:
http://pgfouine.projects.postgresql.org/. I recommend it highly, it
really helps to understand what queries are "bottle neck" of your
system and when (the time of the day) the load reaches maximum.

Good luck.

On 9/21/06, Najib Abi Fadel <nabifadel@yahoo.com> wrote:
> Hi again,
>
> How can i use connection pooling ? Should i use a software like PGPool ?
> Will the connection pooling boost considerably the performance ?
>
> Leonel adviced me to use persistent connections ? hos do i use that ?
>
> PS: I am using PHP for my applications.
>
> Thanks
> Najib
>
>
>
> Talha Khan <talha.amjad@gmail.com> wrote:
>
> You should also consider using connection pooling inorder to attain better
> performance.
>
> Regards
> Talha Khan
>
>
> On 9/20/06, Najib Abi Fadel <nabifadel@yahoo.com> wrote:
> >
> > I have a web application that is accessed by a large number of users.
> > My application is written in PHP and uses postgres.  Apache is our web
> server.
> > The performance of my application drops down when a large numbers of users
> connects at the same time. I need to have a better response time !  That's
> why i need to load balance the web requests and the database.
> >
> > Regards,
> > Najib.
> >
> > Ben Trewern <ben.trewern@_nospam_mowlem.com> wrote:
> >
> >
> > The solution you need all depends on the problem you are having. If you
> > explain how your application is written PHP, Java, etc and where your
> > performance problems are coming from, then someone could give you a better
> > answer!
> >
> > Regards,
> >
> > Ben
> >
> >
> > "Najib Abi Fadel" wrote in message
> >
> >
> news:20060919053331.34790.qmail@web38301.mail.mud.yahoo.com...
> >
> >
> >
> > Robin Ericsson wrote:
> > On 9/18/06, Najib Abi Fadel wrote:
> > > Hi,
> > >
> > > i was searching for a load balancing solution for
> > > postgres, I found some ready to use software like
> > > PGCluster, Slony, pgpool and others.
> > >
> > > It would really be nice if someone knows which one is
> > > the best taking in consideration that i have an
> > > already running application that i need to load
> > > balance.
> >
> > There isn't one tool that is the best, all three work very good based
> > on where they are used and what they are used for.
> >
> > --
> > regards,
> > Robin
> >
> > ---------------------------(end of
> broadcast)---------------------------
> > TIP 5: don't forget to increase your free space map settings
> >
> > Did you try them or have any experience with them. I need them for load
> > balancing my database and thus making the queries faster. I have a web
> > application heavely using a postgres database. Hundreds of users can
> connect
> > at the same time to my web application.
> >
> > Thanks in advance for any help.
> >
> > Najib.
> >
> >
> >
> >
> >
> >
> > How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call
> rates.
> >
> >
> >
> > ---------------------------(end of
> broadcast)---------------------------
> > TIP 1: if posting/reading through Usenet, please send an appropriate
> > subscribe-nomail command to majordomo@postgresql.org so that your
> > message can get through to the mailing list cleanly
> >
> >
> >
> >
> > ________________________________
>
> >
> > How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call
> rates.
> >
> >
>
>
>
>
>  ________________________________
> Do you Yahoo!?
>  Next-gen email? Have it all with the all-new Yahoo! Mail.
>
>


--
Best regards,
Nikolay

Re: What is the Best Postgresql Load Balancing Solution

From
"Joshua D. Drake"
Date:
Nikolay Samokhvalov wrote:
> As for persistent connection with PHP, start from here:
> http://php.net/pg_pconnect.

Uhmmm no.

Start here: http://pgpool.projects.postgresql.org/

pg_pconnect tends to have a host of issues.

Joshua D. Drake


>
> Also, I recommend to ensure that you have proper set of indexes on
> your tables and your system doesn't use badly written queries (such as
> join of several dozens of tables :-) ). There is an excellent tool
> that can help you monitoring your database, pgFouine:
> http://pgfouine.projects.postgresql.org/. I recommend it highly, it
> really helps to understand what queries are "bottle neck" of your
> system and when (the time of the day) the load reaches maximum.
>
> Good luck.
>
> On 9/21/06, Najib Abi Fadel <nabifadel@yahoo.com> wrote:
>> Hi again,
>>
>> How can i use connection pooling ? Should i use a software like PGPool ?
>> Will the connection pooling boost considerably the performance ?
>>
>> Leonel adviced me to use persistent connections ? hos do i use that ?
>>
>> PS: I am using PHP for my applications.
>>
>> Thanks
>> Najib
>>
>>
>>
>> Talha Khan <talha.amjad@gmail.com> wrote:
>>
>> You should also consider using connection pooling inorder to attain
>> better
>> performance.
>>
>> Regards
>> Talha Khan
>>
>>
>> On 9/20/06, Najib Abi Fadel <nabifadel@yahoo.com> wrote:
>> >
>> > I have a web application that is accessed by a large number of users.
>> > My application is written in PHP and uses postgres.  Apache is our web
>> server.
>> > The performance of my application drops down when a large numbers of
>> users
>> connects at the same time. I need to have a better response time !
>> That's
>> why i need to load balance the web requests and the database.
>> >
>> > Regards,
>> > Najib.
>> >
>> > Ben Trewern <ben.trewern@_nospam_mowlem.com> wrote:
>> >
>> >
>> > The solution you need all depends on the problem you are having. If you
>> > explain how your application is written PHP, Java, etc and where your
>> > performance problems are coming from, then someone could give you a
>> better
>> > answer!
>> >
>> > Regards,
>> >
>> > Ben
>> >
>> >
>> > "Najib Abi Fadel" wrote in message
>> >
>> >
>> news:20060919053331.34790.qmail@web38301.mail.mud.yahoo.com...
>> >
>> >
>> >
>> > Robin Ericsson wrote:
>> > On 9/18/06, Najib Abi Fadel wrote:
>> > > Hi,
>> > >
>> > > i was searching for a load balancing solution for
>> > > postgres, I found some ready to use software like
>> > > PGCluster, Slony, pgpool and others.
>> > >
>> > > It would really be nice if someone knows which one is
>> > > the best taking in consideration that i have an
>> > > already running application that i need to load
>> > > balance.
>> >
>> > There isn't one tool that is the best, all three work very good based
>> > on where they are used and what they are used for.
>> >
>> > --
>> > regards,
>> > Robin
>> >
>> > ---------------------------(end of
>> broadcast)---------------------------
>> > TIP 5: don't forget to increase your free space map settings
>> >
>> > Did you try them or have any experience with them. I need them for load
>> > balancing my database and thus making the queries faster. I have a web
>> > application heavely using a postgres database. Hundreds of users can
>> connect
>> > at the same time to my web application.
>> >
>> > Thanks in advance for any help.
>> >
>> > Najib.
>> >
>> >
>> >
>> >
>> >
>> >
>> > How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call
>> rates.
>> >
>> >
>> >
>> > ---------------------------(end of
>> broadcast)---------------------------
>> > TIP 1: if posting/reading through Usenet, please send an appropriate
>> > subscribe-nomail command to majordomo@postgresql.org so that your
>> > message can get through to the mailing list cleanly
>> >
>> >
>> >
>> >
>> > ________________________________
>>
>> >
>> > How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call
>> rates.
>> >
>> >
>>
>>
>>
>>
>>  ________________________________
>> Do you Yahoo!?
>>  Next-gen email? Have it all with the all-new Yahoo! Mail.
>>
>>
>
>


--

    === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
    Providing the most comprehensive  PostgreSQL solutions since 1997
              http://www.commandprompt.com/



Re: What is the Best Postgresql Load Balancing Solution available ?

From
"Ben Trewern"
Date:
You can try using pg_pconnect instead of pg_connect.  It has some downsides so see the docs.
 
Also - check your memory usage, it may be you could fix this by reducing work_mem or similar.
 
Regards,
 
Ben
Hi again,

How can i use connection pooling ? Should i use a software like PGPool ? Will the connection pooling boost considerably the performance ?

Leonel adviced me to use persistent connections ? hos do i use that ?

PS: I am using PHP for my applications.

Thanks
Najib


Talha Khan <talha.amjad@gmail.com> wrote:
You should also consider using connection pooling inorder to attain better performance.
 
Regards
Talha Khan

 
On 9/20/06, Najib Abi Fadel <nabifadel@yahoo.com> wrote:
I have a web application that is accessed by a large number of users.
My application is written in PHP and uses postgres.  Apache is our web server.
The performance of my application drops down when a large numbers of users connects at the same time. I need to have a better response time !  That's why i need to load balance the web requests and the database.

Regards,
Najib.

Ben Trewern <ben.trewern@_nospam_mowlem.com> wrote:
The solution you need all depends on the problem you are having. If you
explain how your application is written PHP, Java, etc and where your
performance problems are coming from, then someone could give you a better
answer!

Regards,

Ben

"Najib Abi Fadel" wrote in message

news:20060919053331.34790.qmail@web38301.mail.mud.yahoo.com...


Robin Ericsson wrote:
On 9/18/06, Najib Abi Fadel wrote:
> Hi,
>
> i was searching for a load balancing solution for
> postgres, I found some ready to use software like
> PGCluster, Slony, pgpool and others.
>
> It would really be nice if someone knows which one is
> the best taking in consideration that i have an
> already running application that i need to load
> balance.

There isn't one tool that is the best, all three work very good based
on where they are used and what they are used for.

--
regards,
Robin

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Did you try them or have any experience with them. I need them for load
balancing my database and thus making the queries faster. I have a web
application heavely using a postgres database. Hundreds of users can connect
at the same time to my web application.

Thanks in advance for any help.

Najib.






How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call rates.



---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly


How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call rates.



Do you Yahoo!?
Next-gen email? Have it all with the all-new Yahoo! Mail.

Re: What is the Best Postgresql Load Balancing Solution available ?

From
Najib Abi Fadel
Date:

What is the problem with pg_pconnect and is pgpool easy to use with an already running application ?
Should i expect a major performance boost ?

Najib.


"Joshua D. Drake" <jd@commandprompt.com> wrote:
Nikolay Samokhvalov wrote:
> As for persistent connection with PHP, start from here:
> http://php.net/pg_pconnect.

Uhmmm no.

Start here: http://pgpool.projects.postgresql.org/

pg_pconnect tends to have a host of issues.

Joshua D. Drake


>
> Also, I recommend to ensure that you have proper set of indexes on
> your tables and your system doesn't use badly written queries (such as
> join of several dozens of tables :-) ). There is an excellent tool
> that can help you monitoring your database, pgFouine:
> http://pgfouine.projects.postgresql.org/. I recommend it highly, it
> really helps to understand what queries are "bottle neck" of your
> system and when (the time of the day) the load reaches maximum.
>
> Good luck.
>
> On 9/21/06, Najib Abi Fadel wrote:
>> Hi again,
>>
>> How can i use connection pooling ? Should i use a software like PGPool ?
>> Will the connection pooling boost considerably the performance ?
>>
>> Leonel adviced me to use persistent connections ? hos do i use that ?
>>
>> PS: I am using PHP for my applications.
>>
>> Thanks
>> Najib
>>
>>
>>
>> Talha Khan wrote:
>>
>> You should also consider using connection pooling inorder to attain
>> better
>> performance.
>>
>> Regards
>> Talha Khan
>>
>>
>> On 9/20/06, Najib Abi Fadel wrote:
>> >
>> > I have a web application that is accessed by a large number of users.
>> > My application is written in PHP and uses postgres. Apache is our web
>> server.
>> > The performance of my application drops down when a large numbers of
>> users
>> connects at the same time. I need to have a better response time !
>> That's
>> why i need to load balance the web requests and the database.
>> >
>> > Regards,
>> > Najib.
>> >
>> > Ben Trewern wrote:
>> >
>> >
>> > The solution you need all depends on the problem you are having. If you
>> > explain how your application is written PHP, Java, etc and where your
>> > performance problems are coming from, then someone could give you a
>> better
>> > answer!
>> >
>> > Regards,
>> >
>> > Ben
>> >
>> >
>> > "Najib Abi Fadel" wrote in message
>> >
>> >
>> news:20060919053331.34790.qmail@web38301.mail.mud.yahoo.com...
>> >
>> >
>> >
>> > Robin Ericsson wrote:
>> > On 9/18/06, Najib Abi Fadel wrote:
>> > > Hi,
>> > >
>> > > i was searching for a load balancing solution for
>> > > postgres, I found some ready to use software like
>> > > PGCluster, Slony, pgpool and others.
>> > >
>> > > It would really be nice if someone knows which one is
>> > > the best taking in consideration that i have an
>> > > already running application that i need to load
>> > > balance.
>> >
>> > There isn't one tool that is the best, all three work very good based
>> > on where they are used and what they are used for.
>> >
>> > --
>> > regards,
>> > Robin
>> >
>> > ---------------------------(end of
>> broadcast)---------------------------
>> > TIP 5: don't forget to increase your free space map settings
>> >
>> > Did you try them or have any experience with them. I need them for load
>> > balancing my database and thus making the queries faster. I have a web
>> > application heavely using a postgres database. Hundreds of users can
>> connect
>> > at the same time to my web application.
>> >
>> > Thanks in advance for any help.
>> >
>> > Najib.
>> >
>> >
>> >
>> >
>> >
>> >
>> > How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call
>> rates.
>> >
>> >
>> >
>> > ---------------------------(end of
>> broadcast)---------------------------
>> > TIP 1: if posting/reading through Usenet, please send an appropriate
>> > subscribe-nomail command to majordomo@postgresql.org so that your
>> > message can get through to the mailing list cleanly
>> >
>> >
>> >
>> >
>> > ________________________________
>>
>> >
>> > How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call
>> rates.
>> >
>> >
>>
>>
>>
>>
>> ________________________________
>> Do you Yahoo!?
>> Next-gen email? Have it all with the all-new Yahoo! Mail.
>>
>>
>
>


--

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/




Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail.

Re: What is the Best Postgresql Load Balancing Solution

From
Scott Marlowe
Date:
On Wed, 2006-09-27 at 00:22, Najib Abi Fadel wrote:
> What is the problem with pg_pconnect and is pgpool easy to use with an
> already running application ?
> Should i expect a major performance boost ?

pg_pconnect isn't "pooling" per se.  In pooling, a large number of
processes share a small number of connections.  I.e. 200 php processes
would access the database by sharing 20 or 30 connections per database
accessed.  So, if you had 3 databases, each would have 20 or so
connections to it, and the 200 odd php processes would have to wait for
a free connection or would error out depending on how pooling was set
up.  Note that php doesn't directly support this type of pooling, like
jdbc does.

pg_pconnect creates a persistent connection for each database accessed
by each process.  So, if you had the same three databases and 200 php
processes that all, at one time or another, hit each of those databases,
your database would need to manage 600 connections.

This makes it very easy to DOS your database server with too many
connections.

Pgpool is VERY easy to use, and gets rid of most of the overhead of
starting a connection (backend process creation) by holding open x
number of connections for you all the time.  Therefore, the real cost of
pg_connect over pg_pconnect goes away, and you can simply use pg_connect
to the pgpool process.