如何基于POCO C++如何提高HTTP服务器的性能。图书馆

发布于 2025-02-07 09:40:42 字数 484 浏览 3 评论 0原文

我有一个基于QNX RTO的ARM处理器的硬件,我需要在两个应用程序之间将HTTP数据流http_client和http_server,均基于POCO C ++库。我创建了简单的客户端和服务器程序来流式传输文件的内容。在硬件上,我获得1.8 Gbps的HTTP吞吐量,而IPERF给出了27 Gbps的TCP吞吐量。 (请注意,已扣除文件读取时间以到达HTTP吞吐量号)

我在笔记本电脑上尝试了Linux上的相同程序,我也看到了HTTP和TCP之间的吞吐量有所不同。

有人可以通过POCO配置,编译时标志,API使用或设置提出建议,这可以帮助我在IPERF TCP吞吐量附近实现更高的吞吐量。

我的设置的其他详细信息:

我使用的是POCO共享版本1.10.1,并使用O2优化编辑,并使用Poco->净 - >样品。

我将TCPNODELAY设置为False,这帮助我改善了笔记本电脑上的Linux的性能,但在QNX上却没有。我想知道为什么它在硬件上没有帮助。有任何指针吗?

I have a hardware based on ARM processor with QNX RTOS, on which I need to stream http data between two applications http_client and http_server, both based on POCO C++ library. I have create simple client and server programs that stream contents of a file. On the hardware I get http throughput of 1.8 Gbps, whereas iperf give tcp throughput of 27 Gbps. (note that file read time has been deducted to arrive at the http throughput numbers)

I tried the same programs on Linux on Laptop, there too I see a difference in the throughput between http and tcp.

Can someone suggest ways through either Poco configuration, compile-time flags, API usage or setup which can help me achieve higher throughput nearer to the iperf tcp throughput.

Other details of my setup :

I am using the POCO shared release version 1.10.1, compiled with O2 optimization and making use of the template of HTTPFormServer which is given under poco-> Net -> Samples.

I have set the TCPNODELAY to false, which helped me in improving the performance on Linux on laptop, but not on QNX. I wonder why it did not help on hardware. Any pointers on this ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你如我软肋 2025-02-14 09:40:42

IPERF是一个纯粹的散装转移操作。就像netperf tcp_stream一样。虽然它似乎是在应用程序层向您“流”的,但在“流式传输”数据时,POCO软件可能并没有进行连续的请求/响应对。

从理论上讲,您可以在数据包捕获中看到这一点。当您查看IPERF测试的数据包捕获时,您将看到大量的TCP数据段从发送者到接收器,并且只有从接收器到发件人的TCP确认。如果HTTP“流”有一些请求/响应,您将至少看到一些数据段(HTTP请求)从接收器回到发件人。根据该软件一次出色的要求,您可能会看到与IPER相比的性能截然不同。

iperf is a pure, bulk-transfer operation. Just like netperf TCP_STREAM. While it may appear to be "streaming" to you at the application layer, likely as not this POCO software is doing successive request/response pairs when "streaming" the data.

In theory you can see that in a packet capture. When you look at the packet capture of the iperf test, you will see large TCP data segments going from the sender to the receiver and only TCP ACKnowledgements going from the receiver to the sender. If there is some request/response going on with the HTTP "streaming" you will see at least some data segments (HTTP requests) going from the receiver back to the sender. And depending on how many requests this software will have outstanding at one time, you may see very different performance compared to iperf.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文