LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 07-28-2011, 03:18 PM   #1
linuxsavar
Member
 
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
VMM:xen
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 ?

Thank`s
 
Old 07-29-2011, 08:27 AM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,009
Blog Entries: 5

Rep: Reputation: 785Reputation: 785Reputation: 785Reputation: 785Reputation: 785Reputation: 785Reputation: 785
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.
 
  


Reply


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 04:03 PM
Select options from website to initiate download from script (wget alternative?) hattori.hanzo Programming 1 11-18-2010 08:17 AM
[SOLVED] shell script using wget to download files from ftp, sub directories bayaraa_u Linux - General 1 04-28-2010 02:50 AM
PHP upload/download speed tester ? NaCo Linux - Server 2 12-29-2009 09:51 PM
Script to download file using wget linuxnewbie82 Programming 6 02-14-2007 04:48 AM


All times are GMT -5. The time now is 08:03 PM.

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