Menu

Benchmarks

2002-02-24
2012-09-19
  • Dagur Páll Ammendrup

    I noticed that opening a connection takes about 0.04 to 0.05 seconds. Isn't that a bit much?

     
    • Andy Dustman

      Andy Dustman - 2002-03-01

      Then don't do it.

      (i.e. use a connection pool and recycle connections.)

      50 ms doesn't seem all that long to me, particularly if it's a TCP connection; you didn't say what kind of connection it was, or how fast your network was, or how fast your hardware was, so hard to draw any conclusions.

       
      • Amit Khan

        Amit Khan - 2002-05-28

        How to do connection pooling? Actually I am using MySQLDB fpr one of my python(cgi) based web application. Can you give some idea about building connections and pooling them? Is there any solution already available?

         
    • Dagur Páll Ammendrup

      I was testing this on a cgi script on my own pc (1400Mhz). I'm pretty sure perl and php are much faster connecting to mysql

       
      • Andy Dustman

        Andy Dustman - 2002-09-06

        That's nice.

        Consider the fact that PHP and perl (if you are using mod_perl) do not require a fork/exec to run your script, whereas running Python (or anything else) running as CGI does. If you're going to make comparisions like this, use mod_python or some other persistent scheme, like an HTTPServer-based system instead of Apache, or else test perl and PHP as pure CGI. You are not comparing connection setup times, you are comparing how long it takes to spawn a request within Apache vs. spawning another process, which takes a lot longer than connecting to MySQL.

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.