I'm working on a Debian Server, 16 GB RAM, QuadCore, GBitLan and so on...not worth talking about.
I have a problem with the speed of the upload via PHP ftp_put (...)
function. If I transfer a file with 4 GiB filesize from local to local, only a unrealistic test I know, it takes with the native FTP 36 seconds (133 MB/s) and with ftp_put(...)
, same maschine, more than 4 minutes (~13MB/s).
So my question is
- why is PHPs ftp_put(...)
so slow
- and how can I speed it up ?
Could it be that the native ftp client short-circuits the download (which would normally go through the entire TCP/IP protocol stack) to an internal copy? 133 MB/s seems quite high to me, but then again I don't own a 2000$ server. You could verify this by using a tool like Wireshark (I think you can even see your bandwidth usage in taskmgr.exe
on Windows).