Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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 – 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


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.