Hi
I have designed an Actor system which takes a request which consists of
8000 IDs, splits it into 4 chunks (2000 IDs each), processes each chunk in
parallel, and merges the results.
To do this, I have a main thread which is calling "ask" on a request
handling actor at a rate of 200 requests per second.
Then for each request, my request handling actor spawns 4 child computation
actors and passes them chunks to process, using "tell".
The computation actors send the result back to the request handling actor
using "tell", and the computations are merged to produce a final result
when all 4 partial results have been received.
(So, the request handling actor can receive two types of message:
ProcessRequest message from the main thread and PartialResult from the
child actors)
It works pretty well, with a median latency of 2 milliseconds. However, the
mean and variance are a lot higher:
mean rate = 211.02 calls/second
1-minute rate = 221.00 calls/second
5-minute rate = 221.00 calls/second
15-minute rate = 221.00 calls/second
min = 1.22 milliseconds
max = 450.71 milliseconds
mean = 25.79 milliseconds
stddev = 74.96 milliseconds
median = 2.15 milliseconds
75% <= 2.97 milliseconds
95% <= 220.02 milliseconds
98% <= 310.52 milliseconds
99% <= 389.31 milliseconds
99.9% <= 448.46 milliseconds
All my requests are the same size and same computational complexity, so
should really take approximately the same time. There is no IO - the
computation actors only perform CPU intensive calculations.
What could cause this really high variance? Does anyone have any tips on
things I could try to get it down? I want all my requests to be processed
in around 2ms.
I have tried using a pool of request handling actors, backed by a round
robin router, but this seemed to make little difference from using just 1.
In fact, the variance increased slightly.
Thanks very much for any advice on this!
Josh
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.