Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2002
    Location
    Illinois
    Posts
    2,307

    Very strange problem - test included [Continued]

    See previous thread for details

    http://www.webhostingtalk.com/showth...hreadid=248068

    So, I contacted SM supprort and the tech guy told me that his download speed is 140Kb per sec max. Same as mine. And he told he doesn't know what's the problem

    I did a little testing and got some weird results.

    ---

    1) Testing download from php script and from direct link to file on Apache Web Server

    http://download1.uasound.com/download.php - 140KB
    http://download1.uasound.com/DAT.mp3 - 140KB

    2) Testing download from php script and from direct link on II6 Web Server with php installed as isapi module

    http://download1.uasound.com/download.php - 140KB
    http://download1.uasound.com/DAT.mp3 - 340KB

    ---

    Second result with the direct link gave me what I want with php script. All tests where done on Comcast Cable. 340KB is the maximum speed I can get on it.

    My question is: What is causing slow speeds with php script? Why there is no problem on Linux server?

    BTW, I have Windows 2003 Server.

    Appreciate your help and time.

  2. #2
    Join Date
    Sep 2002
    Location
    Illinois
    Posts
    2,307
    Any ideas?

  3. #3
    Join Date
    Feb 2004
    Posts
    772
    Hi null,

    Please have a look into the following documentation regarding performance speeds with php script on Linux based server. Here you will get enough details regarding running php script on both Apache web server and IIS web server.

    http://phplens.com/lens/php-book/opt...ugging-php.php

    Hope you will spend some time on my given suggestions.

    Regards,

    Bright

  4. #4
    Join Date
    Aug 2002
    Location
    UK
    Posts
    852
    Did you ever post download.php?

  5. #5
    Join Date
    Sep 2002
    Location
    Illinois
    Posts
    2,307
    Originally posted by Brightadmin
    Hi null,

    Please have a look into the following documentation regarding performance speeds with php script on Linux based server. Here you will get enough details regarding running php script on both Apache web server and IIS web server.

    http://phplens.com/lens/php-book/opt...ugging-php.php

    Hope you will spend some time on my given suggestions.

    Regards,

    Bright
    It's all been done now, but still same problem

  6. #6
    Join Date
    Sep 2002
    Location
    Illinois
    Posts
    2,307
    Originally posted by Winkie
    Did you ever post download.php?
    What do you mean?

  7. #7
    Join Date
    Feb 2004
    Posts
    772
    Hi,

    I think these are the reasons for slow download speed of PHP scripts

    # General rule of thumb for hardware upgrades: For PHP scripts, the main bottleneck is the CPU. For static HTML/images, the bottleneck is RAM and the network. A slow 400 Mhz Pentium can saturate a T3 line (that's 45 Mbps) with static HTML pages.

    # A PHP script will be served at least 2-10 times slower than a static HTML page by Apache. Try to use more static HTML pages and fewer scripts.

    # Enable the compression of HTML by putting in your php.ini:

    output_handler = ob_gzhandler

    If you think about it, it might take you 0.1 seconds to generate 40K of HTML in your PHP page. However it probably takes 6 seconds for the user to download the page using a 56k modem without compresson. With compression, the download will probably take 2-3 seconds.

    So the time taken for page generation is miniscule in comparison to the transit time of the HTML from the server to the browser. Therefore the biggest speedup you can perform for modem users is using ob_gzhandler! This feature is only recommended for PHP 4.1.0 or later. This point was moved closer to the top of the list on 9 July 2002 when i personally experienced the benefits of compression.

    For more information Please have a look into the following URL

    http://php.weblogs.com/tuning_apache_unix

    Hope this time you can get enough information to fix your bug

    Regards,

    Bright

  8. #8
    Join Date
    Sep 2002
    Location
    Illinois
    Posts
    2,307
    Can someone test download.php now?

    I added output_handler = ob_gzhandler and it seems to be much batter now

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •