Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

3
How to know if I should have more than 1 ASIO io_service?
Post Flair (click to view more posts with a particular flair)
Post Body

Posting again here as previous post was deleted from r/cpp.

I have a low latency Linux application that uses Boost ASIO to communicate over TCP to upto 100000 servers in async way. This application is a client to all these TCP servers.

Currently, I call io_service.run() from [2 * number of core] threads to process IO to/from peers.
I know internally, ASIO would create an epoll on single fd for the io_service and the calls to run from threads would have contention around queue polling.

I wanted to know how to understand if having a single io_service, albeit spread across multiple threads, could be a potential bottleneck.

Is io_service, limited by:

  1. epoll
  2. Contention on internal queue

Note: changing application to use multiple io_service is bit involved, hence could not do a quick POC as of now.

Author
Account Strength
50%
Account Age
2 years
Verified Email
Yes
Verified Flair
No
Total Karma
213
Link Karma
197
Comment Karma
16
Profile updated: 2 days ago
Posts updated: 3 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
9 months ago