My forum is delievering ~ 50.000 pageviews a day.
I have split webserver and database onto 2 different machines, so performance is quite ok.
Anyways, I was wondering if using persistent connections would give me the extra performance kick. The mysql server has 384 MB Ram, and is doing nothing else but serving the database.
Would you recommend using pconnects?
Is there any disadvantage?
Thanks for your replies.
Thanks so far :)
The point "This is usefull if the overhead to create a connection to the database is high (busy server, sql on a different server), then it's better to leave the connection open." is surely of interest for me.
I guess 50.000 Pageviews do put some load on the database, which IS on a different server here. So I think pconnect will fit my needs better :)
BTW: Is there any way to measure board performance with and without pconnects? :)
Thanks
Originally posted by firewire
Thanks so far :)
The point "This is usefull if the overhead to create a connection to the database is high (busy server, sql on a different server), then it's better to leave the connection open." is surely of interest for me. mysql_connect VS. mysql_pconnect - TalkPHP:: mysql_connect VS. mysql_ p connect Well, this should say enough. Which is better ? I use pconnect AND connect in the same function. You can define to. http://www.talkphp.com/absolute-beginners/1770-mysql_connect-vs-mysql_pconnect.htmlHOME | Myspace.com Blogs - PHP MySQL pconnect bad - Rock MySpace Blog:: Nov 6, 2008 The big reason why using pconnect is bad is the architecture of say Oracle. a pconnect() will open the connection and keep it open http://blog.myspace.com/index.cfm?fuseaction=blog.view&friendID=35168071&blogID=104189577HOME |
I guess 50.000 Pageviews do put some load on the database, which IS on a different server here. So I think pconnect will fit my needs better :)
BTW: Is there any way to measure board performance with and without pconnects? :)
Thanks well there was a little test script somewhere on this forum not sure where though :o
depends if you have a good cpu power and have many connections to mysql i'd use pconnects.. take a read
http://vbulletin.com/forum/showthread.php?s=&threadid=32674&highlight=persistent+connections
http://www.php.net/manual/en/features.persistent-connections.php
Persistent connections are SQL links that do not close when the execution of your script ends. When a persistent connection is requested, PHP checks if there's already an identical persistent connection (that remained open from earlier) - and if it exists, it uses it. If it does not exist, it creates the link. An 'identical' connection is a connection that was opened to the same host, with the same username and the same password (where applicable).
People who aren't thoroughly familiar with the way web servers work and distribute the load may mistake persistent connects for what they're not. In particular, they do not give you an ability to open 'user sessions' on the same SQL link, they do not give you an ability to build up a transaction efficently, and they don't do a whole lot of other things. In fact, to be extremely clear about the subject, persistent connections don't give you any functionality that wasn't possible with their non-persistent brothers
Where's The Advantage In Windows Genuine Advantage?
Stocks Bounce After S&P Joins Bear Market |