Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 07-28-2011, 04:18 PM   #1
Registered: May 2007
Distribution: slackware
Posts: 34

Rep: Reputation: 15
difference between wget and php script in download speed

hi all
I have bought a vps server with the following specifications
OS:centos 5.5 X86_64
RAM:256 mb
I wrote a php script to download a file from a url .I tried a url with this script and wget but the script was much slower than wget
wget : 1.5 MB/s
php script : 46 ~60 KB/s [different sapi had same results]
I run this script in my pc with slackware on localhost and it`s speed was aproximately 1MB/s
what`s the reason of this speed limitation ?

Old 07-29-2011, 09:27 AM   #2
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,075
Blog Entries: 14

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
Without knowing what is in your script there is no way to tell. You may be doing tons of processing before you even get to the download step and may mistakenly believe that is part of your download time rather than your overall time.

You might want to run "time wget ..." to see real/user/sys time for the wget then "time <script>" then within the script insert a time command at the point where it actually downloads the file to see if the time in the script run is at that point or is somewhere else.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
using cron and wget to hit a php script 360 Programming 9 06-20-2012 05:03 PM
Select options from website to initiate download from script (wget alternative?) hattori.hanzo Programming 1 11-18-2010 09:17 AM
[SOLVED] shell script using wget to download files from ftp, sub directories bayaraa_u Linux - General 1 04-28-2010 03:50 AM
PHP upload/download speed tester ? NaCo Linux - Server 2 12-29-2009 10:51 PM
Script to download file using wget linuxnewbie82 Programming 6 02-14-2007 05:48 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:58 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration