C++ Socket Server - Unable to saturate CPU

后端 未结 6 1031
刺人心
刺人心 2020-11-29 23:18

I\'ve developed a mini HTTP server in C++, using boost::asio, and now I\'m load testing it with multiple clients and I\'ve been unable to get close to saturating the CPU. I

6条回答
  •  猫巷女王i
    2020-11-30 00:04

    230 requests/sec seems very low for such simple async requests. As such, using multiple threads is probably premature optimisation - get it working properly and tuned in a single thread, and see if you still need them. Just getting rid of un-needed locking may get things up to speed.

    This article has some detail and discussion on I/O strategies for web server-style performance circa 2003. Anyone got anything more recent?

提交回复
热议问题