Optimize EndpointWriter unstashing
Reported here: https://groups.google.com/d/msg/akka-user/5vYs4jKMaQU/Unjo3TaFG8QJ
with reproducible sample.
Major time is consumed in EndpointWriter stashing and unstashing messages. That happens when the transport can't write.
I think it goes into an very inefficient spin of unstashing all messages, and quickly discover that it can't write and then everything is stashed again, and so on...
We had something similar in EventsourcedProcessor, and then Martin introduced unstash() to avoid unstashAll().
I tried to increase backoff time and send buffer size, but could not see a big difference.
with reproducible sample.
Major time is consumed in EndpointWriter stashing and unstashing messages. That happens when the transport can't write.
I think it goes into an very inefficient spin of unstashing all messages, and quickly discover that it can't write and then everything is stashed again, and so on...
We had something similar in EventsourcedProcessor, and then Martin introduced unstash() to avoid unstashAll().
I tried to increase backoff time and send buffer size, but could not see a big difference.
Leave a comment
on 2014-04-03 09:32 *
By Patrik Nordwall
Assigned to set to Patrik Nordwall
Status changed from New to Accepted