Eduard Rostomyan
Eduard Rostomyan

Reputation: 6546

What are the optimal values to set for busy-polling?

I have an application written in C++ for reading market data. The networking layer is implemented using boost asio, effectively tcp ssl websockets. When the market throughput is high, I can observe some unusual queueing of network packets, I know there should be some delay but not that much. For asio I use all the tricks in the book:

  1. Concurrency hint unsafe
  2. io_context per thread
  3. calling ioc.poll() in a busy loop

But sill seeing some delays.

Should I set /proc/sys/net/core/busy_poll and /proc/sys/net/core/busy_read as well for lower latency and scheduling? And if yes what are the optimal values, given I have no shortage of cpu power?

Upvotes: 1

Views: 148

Answers (0)

Related Questions