PHP 的 cURL 库性能的实验评估
Experimental Evaluation of the PHP's cURL Library Performance
AI总结:
本文通过多组独立实验分析 PHP 的 cURL 库与 WebHDFS API 的性能,证明下载速度随文件增大而下降的根源在于 cURL 库本身,而非所调用的 API。
摘要:
cURL(libcurl)是一个流行且广泛使用的库,随 PHP 解释器一同分发。它允许 PHP 应用程序通过使用多种通信协议连接外部资源(服务器)并与之通信。在大多数情况下,它是消费外部 REST Web 服务的首选方式。程序员通常理所当然地使用它,甚至不考虑任何性能问题。在对 Hadoop 的 WebHDFS API 吞吐量进行实验分析期间,注意到从 WebHDFS 读取(下载)速度随着文件大小的增加而降低。然而,在写入 WebHDFS 时不会发生此问题。由于 PHP 应用程序与 WebHDFS API 之间的通信由 PHP 的 cURL 库处理,因此下载速度下降的原因可能是 cURL 库本身或 API。本文提出了一系列实验分析,旨在确定先前实验中下载速度下降的原因——是 WebHDFS API 还是 PHP 的 cURL 库。双方以多种方式分别且彼此独立地进行测试。结果(以两种不同的方式)清楚地证明,下载速度下降的原因是 PHP 的 cURL 库本身,而不是所消费的 API。
英文摘要:
cURL (libcurl) is a popular and widely used library distributed with the php interpreter. It allows php applications to connect to and communicate with external resources (servers) by using wide variety of communication protocols. In most cases it is the preferred way of consuming external REST web services. Programmers usually use it for granted without even thinking of any performance issues. During an experimental analysis of the Hadoop's WebHDFS API throughput, it has been noted that read (download) speed from WebHDFS reduces with increasing the file size. However, this issue does not happen when writing to WebHDFS. Since the communication between the php application and the WebHDFS API is handled by the php's cURL library, then the cause of the download speed decrease could be either the cURL library itself or the API. This paper presents a series of experimental analyses aiming to determine the cause of the download speed decrease in previous experiments - whether it is the WebHDFS API or the php's cURL library. Both parties are tested in multiple ways separately and independently of each other. Results clearly prove (in two different ways) that the cause of the download speed decrease is the php's cURL library itself, not the consumed API.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。