I'm working on a Debian Server, 16 GB RAM, QuadCore, GBitLan and so on...not worth talking about.
我正在使用Debian服务器,16 GB RAM,QuadCore,GBitLan等等......不值得谈论。
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).
我通过PHP ftp_put(...)函数上传的速度有问题。如果我将具有4 GiB文件大小的文件从本地传输到本地,只有我知道的一个不切实际的测试,它使用本机FTP 36秒(133 MB / s)和ftp_put(...),相同的maschine,超过4分钟(~13MB / s)。
So my question is
- why is PHPs ftp_put(...)
so slow
- and how can I speed it up ?
所以我的问题是 - 为什么PHP ftp_put(...)这么慢 - 我怎样才能加快速度呢?
- Here are both screenshots of the native and PHP FTP output
- The PHP Function
以下是本机和PHP FTP输出的屏幕截图
PHP函数
1 个解决方案
#1
0
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).
可能是本机ftp客户端将下载(通常通过整个TCP / IP协议栈)短路到内部副本? 133 MB / s对我来说似乎很高,但是我再没有拥有2000美元的服务器。您可以使用Wireshark之类的工具来验证这一点(我认为您甚至可以在Windows上的taskmgr.exe中查看您的带宽使用情况)。
#1
0
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).
可能是本机ftp客户端将下载(通常通过整个TCP / IP协议栈)短路到内部副本? 133 MB / s对我来说似乎很高,但是我再没有拥有2000美元的服务器。您可以使用Wireshark之类的工具来验证这一点(我认为您甚至可以在Windows上的taskmgr.exe中查看您的带宽使用情况)。