连接越多越好吗?

时间:2018-01-21 21:17:08

标签: asynchronous concurrency download connection wget

我想从近10000个不同的服务器下载10000个不同的图像。我想知道我应该异步下载多少文件。

我之前见过lftp pget如果服务器提供足够的带宽,如何使用多个连接下载一个文件会更快。我想知道是否存在与同时向许多不同服务器进行过多异步连接的权衡。以及如何为我的系统找到最佳连接数。我想要下载的图像不是那么大,所以我想知道如果我想从不同的服务器下载这么多的pdf文件或其他更大的文件,那么最佳数字会如何变化。我也想知道wifiEthernet之间会有什么变化。

$ uname -srpo
Linux 4.13.0-26-generic x86_64 GNU/Linux

$ lsb_release -d
Description:    Ubuntu 16.04.3 LTS

$ lspci | awk '/[Nn]et/ {print $1}' | xargs -i% lspci -ks %
08:00.0 Network controller: Broadcom Corporation BCM4352 802.11ac Wireless Network Adapter (rev 03)
    Subsystem: Lenovo BCM4352 802.11ac Wireless Network Adapter
    Kernel driver in use: wl
    Kernel modules: bcma, wl
09:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10)
    Subsystem: Lenovo RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
    Kernel driver in use: r8169
    Kernel modules: r8169

0 个答案:

没有答案