« Previous Next »

Thread: Php working so slow, what could be problem?

Last post 06-29-2009 9:20 PM by brashquido. 3 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (4 items)

Sort Posts:

  • 06-16-2009, 3:00 PM

    • netinial
    • Not Ranked
    • Joined on 06-16-2009, 6:38 PM
    • Posts 2

    Php working so slow, what could be problem?

     Dear friends.

    My problem is PHP on my server so slow.

     Here is specifications of my dedicated server, from serverloft.

    Quad Core - MD Opteron 2344HE
    4 GB - DDR2-667 ECC Registered
    2 x SATA II 7,200 rpm

     And here is my dedicated server software

    Windows 2008 web edition 64 bit
    iis7 on Plesk 8.6
    Php 5.2.6

    I tested my php.ini file there is no problem.
    I have a small code to test my php

     

    it is;

    <?php

    $sure_baslangici = microtime(true);

    for ($i=0;$i<500;$i++) {
        $j++;
      // belki başka bi for dongüsü?

        for ($k=0;$k<10000;$k++) {
        $j++;}
      // belki başka bi for dongüsü?
    }

    $sure_bitimi = microtime(true);
    $sure = $sure_bitimi - $sure_baslangici;

    echo "Bekleme süresi: $sure saniye.\n";

    phpinfo();
    ?>

     This small loop takes, 1.61774396896 second on my dedicated.

    You can see ; http://sarar.kz/deneme.php

    And it tooks about 0.60 second on my personal laptop. This is about 1 second better than my dedicated

     I have tried php as, CGI / FASTCGI / ISAPI EXTENSION 

    They all retuned near values.

     I also tried with Dedicated Application Pool but there are no big difference.

    What could be problem?

     Please help me.

    Best Regards Deniz Han

  • 06-16-2009, 4:05 PM In reply to

    Re: Php working so slow, what could be problem?

    Hello,

    Is this all the time, or only when you load the page for the first time. You could check your application pool idle time out and increase the value, so not to terminate unused worker processes.

     Regards

  • 06-16-2009, 4:19 PM In reply to

    • netinial
    • Not Ranked
    • Joined on 06-16-2009, 6:38 PM
    • Posts 2

    Re: Php working so slow, what could be problem?

     Hello thank you for your answer.

     It is all time like that. Now we tested it with php.exe -f c:\deneme.php via isolated from plesk.

    Result is same. it is not about plesk.

    there is a problem with iis7 and php. I formated computer And installed fresh versions ..

     And still same also.

  • 06-29-2009, 9:20 PM In reply to

    Re: Php working so slow, what could be problem?

    netinial:
    Now we tested it with php.exe -f c:\deneme.php via isolated from plesk

    By executing via cli and obtaining the same results you also isolate this issue from IIS, meaning PHP is the problem. The fact you also get same/similar times between CGI, ISAPI and FastCGI also suggests it is not an issue with loading/unloading the PHP environment. Looking at your phpinfo page it appears that you are using the threadsafe version of PHP with FastCGI. You should see a noticable performance improvement by moving to the non threadsafe version of PGP with FastCGI. Also, you don't mention what other services are in use on your server.

    ----------------
    Dominic Ryan
    Microsoft IIS MVP
    www.iis-aid.com
    My IIS articles
    My PHP articles
    My How-to guides
Page 1 of 1 (4 items)