
On Thu, Aug 24, 2017 at 6:07 PM, Mark Hieber via Boost-users
My questions are: 1) Should I re-write this to run on one core? We see performance issues on one core. 2) Is this a good candidate for boost::fibers? If so, what approach should I take? Still use boost::asio and async reads and writes?
If all you are doing is echoing UDP packets, then your program is certainly not CPU or disk-bound. It will be constrained to the performance of the network subsystem. I highly doubt that you need more than one thread for that. You said that you see performance issues on one core, are you sure about that? I would double check and make doubly sure that your measurements are accurate. For UDP I don't see much difference between 1 port or 10, since UDP packets are stateless. The number of ports should not matter. You ask if you should re-write it to run on one core. That should be easy to do without "rewriting" your entire program, just use a single io_service and only call io_service::run from one thread. Fibers won't be particularly helpful since you are not CPU or disk bound. Are you running an optimized or a debug build? Thanks