Boost logo

Boost Users :

Subject: Re: [Boost-users] ASIO or Thread
From: Jonathan Franklin (franklin.jonathan_at_[hidden])
Date: 2009-11-07 21:07:29


On Sat, Nov 7, 2009 at 6:34 PM, OvermindDL1 <overminddl1_at_[hidden]> wrote:
> On Thu, Nov 5, 2009 at 11:09 PM, Lloyd <lloyd_at_[hidden]> wrote:
>>  We need to develop a server in a LAN environment, in which the number of
>> connections at a time will be less, but the data traffic per connection will
>> be huge (gigabytes).
<snip>
> Since you generally use ASIO *with* Threads, I would imagine that
> would be best, <snip>

Yeah, the question is more like:
Should I use ASIO+Threads, or just ASIO?

> and if you set it up asynchronously, then I would say
> that the number of threads equaling the number of CPU cores in the
> computer would be best.

I'm betting your performance will be bound by disk IO, unless your
link throughput is ridiculously low. Either way, since you're
expecting relatively few simultaneous connections, I'm not sure that
extra threads beyond what the ASIO io_service uses will buy you
anything.

But you should always benchmark to be sure.

Jon


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net