=rem #21365 less aggressive busy spinning in AeronSource
Benchmarks revealed that busy spinning directly in the graph stage can lead to an excessive increase in latency when multiple inbound lanes are active (i.e. the inbound flow has an asynchronous boundary driving the multiple lanes). The new strategy is therefore: For inbound-lanes > 1 or idle-cpu-level < 5: no spinning in the graph stage For inbound-lanes = 1 and idle-cpu-level >= 6: 50 * settings.Advanced.IdleCpuLevel - 240 which means in general much less or no spinning at all. Fixes #21365.
This commit is contained in:
parent
e66cb028b0
commit
af377790b0
6 changed files with 16 additions and 10 deletions
|
|
@ -58,7 +58,7 @@ class AeronSinkSpec extends AkkaSpec with ImplicitSender {
|
|||
val port = SocketUtil.temporaryServerAddress("localhost", udp = true).getPort
|
||||
val channel = s"aeron:udp?endpoint=localhost:$port"
|
||||
|
||||
Source.fromGraph(new AeronSource(channel, 1, aeron, taskRunner, pool, IgnoreEventSink))
|
||||
Source.fromGraph(new AeronSource(channel, 1, aeron, taskRunner, pool, IgnoreEventSink, 0))
|
||||
// fail receiver stream on first message
|
||||
.map(_ ⇒ throw new RuntimeException("stop") with NoStackTrace)
|
||||
.runWith(Sink.ignore)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue