Boost logo

Boost Users :

Subject: Re: [Boost-users] UDP Echo Server
From: Michael Powell (mwpowellhtx_at_[hidden])
Date: 2017-08-25 01:40:46

On Thu, Aug 24, 2017 at 9:34 PM, Vinnie Falco via Boost-users
<boost-users_at_[hidden]> wrote:
> On Thu, Aug 24, 2017 at 6:07 PM, Mark Hieber via Boost-users
> <boost-users_at_[hidden]> wrote:
>> 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.

I was going to mention and add, but for the running service aspect of
boost::asio, there's no other gain to be realized since UDP is
connectionless, IMO.

> 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
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at