Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We recently moved to a new server. We have observed that the file upload done from the ftp command is taking around 5sec for 5MB file. But same file uploaded through CURL command is taking about 140 seconds. Any idea what could be wrong here ?

Cheers M

share|improve this question

1 Answer 1

Uploading through FTP means transferring binary data directly to the filesystem using TCP.

Uploading throught cURL means transferring base64 encoded data (1.5x bigger) to the web server using HTTP (which uses TCP). The web application might create a 5MB memory object and then write it on disk, somewhere (it depends a lot on your application).

Do you know how is handled the upload on your HTTP server?

Nginx has a pretty decent module for that: nginx upload module

share|improve this answer
    
transferring through curl command also takes more time . So it has nothing to do with http server i guess. –  user26202 Jan 13 '12 at 1:23
    
cURL uses your webserver, doesn't it? Can you past the cURL command you're using? –  greut Jan 13 '12 at 8:02
    
curl -F name=yyy -F filename=@/xxx/xxxxx/somefile.txt someurl.com –  user26202 Jan 13 '12 at 9:01
    
now, add -v, like curl -v -F name=yyy… you'll see that HTTP (and thus your webserver) is used. Apparently you can use FTP with curl too but you aren't in the example you gave me. –  greut Jan 13 '12 at 9:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.