Hey, I'm in an environment where I have a dedicated server to run apache/php and then I have another server (not on a private network but within the same data center) that is used for ONLY mysql database serving.

Of course, requests goto the apache then the php queries the other computer for database info an so forth.

My site runs pretty fast but there is something odd about it. Like, you'll request a page, there will be a pause for a few moments and then a sudden burst and the entire page will load... it can be when the site is under high traffic or virtually no traffic... its always there.

I'm assuming that this is caused by the overhead needed to connect to a remote computer to access the database. I have tried using mysql_pconnect but it doesn't help noticably.

Is there something else i could do or I'm not doing? I own both the servers so I have root access to everything, nothing is shared. Anyone know how to get rid of this "lag" ?

  • Drew

    I don't now how you can solve that poblem, but I now, that I have the same.

    When I do the same job on localhost or true internet and an other server, the internet is the fastest to do the job.

      nope, mysql server and my windows server is not faster.

      The fastest is the internet. Unix server. Broadband

        err eff.

        I don't think anyone's going to help us out with this...

          did you try to serve a page that makes no database access? does it lag too?

            no it doesnt lag... this happend after i upgraded from 1 server to 2.... one dedicated for apache/php and one dedicated to mysql.

            before mysql was just on the apache/php as localhost.

              an other solution!

              Do you have seond machine on your network?

              On the first you install the internet server.
              on the second you have the databases.

              it could be, when you have on your second machine that you have other drives that you divide the databeses. indexes on one drive and only search table on an other drive. that should be a differance on speed.

              I have found out, that my machines are not fast enough tho compare whith my rented machines on the internet. broadband.

              good look.

                both are rented from serverbeach. they are not on a private network though.

                how do you do such mysql splitting of data/indexes?

                  take a look on the manual of MySQL chapter 13.2.5. CREATE TABLE Syntax.

                  The refer also to chapter 14.1. The MyISAM Storage Engine.

                  How I have to do It, I don't find it.

                    Write a Reply...