Re: [akka-user] Use of high performance bounded mail box.

2017-07-26 Thread Guido Medina
The Gist example is actually a "bounded *logger* mailbox for Akka",
basically the Akka logger is an actor, with such config you are basically
replacing the mailbox of such logging actor for a bounded MPSC mailbox
queue.

On Wed, Jul 26, 2017 at 9:18 PM, Guido Medina  wrote:

> I use high performance bounded queues in my Akka projects, I used to use
> the ones from JCtools but I discovered that Agrona which Aeron depends on
> (which Akka Artery depends on) have similar implementations, anyway,
> linking stuff:
>
>- *Agrona:* https://github.com/real-logic/agrona/tree/master/
>agrona/src/main/java/org/agrona/concurrent
>
> 
>- *JCTools:* https://github.com/JCTools/JCTools/tree/master/jctools-
>core/src/main/java/org/jctools/queues
>
> 
>- *Bounded mailbox for Akka with config (I switched it to Agrona but
>here is the original implemenation with JCTools):* https://gist.github.
>com/guidomedina/b71b81bedd69c64a7b65
>
>
> HTH,
>
> Guido.
>
> --
> >> 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 a topic in the
> Google Groups "Akka User List" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/akka-user/nvBztduD1ng/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
>>  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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Use of high performance bounded mail box.

2017-07-26 Thread Guido Medina
I use high performance bounded queues in my Akka projects, I used to use 
the ones from JCtools but I discovered that Agrona which Aeron depends on 
(which Akka Artery depends on) have similar implementations, anyway, 
linking stuff:

   - *Agrona:*

https://github.com/real-logic/agrona/tree/master/agrona/src/main/java/org/agrona/concurrent
   - *JCTools:* 
   
https://github.com/JCTools/JCTools/tree/master/jctools-core/src/main/java/org/jctools/queues
   - *Bounded mailbox for Akka with config (I switched it to Agrona but 
   here is the original implemenation with JCTools):*
https://gist.github.com/guidomedina/b71b81bedd69c64a7b65

HTH,

Guido.

-- 
>>  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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Use of high performance bounded mail box.

2017-07-15 Thread Unmesh Joshi
Good to know that typed actors are going to use bounded mail boxes.
Just curious, don't people face issues in production systems because of
unbounded mail boxes? Our performance tests on the logger were showing that
once mail box accumulates lots of messages, it puts unreasonable load on
memory, even after messages are consumed by the actors.

On Sat, Jul 15, 2017 at 2:18 PM, Konrad “ktoso” Malawski <
konrad.malaw...@lightbend.com> wrote:

> The current default, more than anything, is bound to be the default since
> it was the default since the inception of Akka and going for a bounded one
> by default now could make some users unhappy.
>
> Having that said, we're actively looking forward to pick a bounded impl
> for Akka Typed. Then people come to it with new expectations and it's
> easier for us to justify the change.
>
> We also have looked at a number of such impala, including benchmarks etc
> and they're definitely very cool.
>
> So it's not that we don't want to, rather it is a question when we do :)
>
> On July 15, 2017 at 17:33:12, Unmesh Joshi (unmeshjo...@gmail.com) wrote:
>
>> Hi,
>>
>> We had some custom requirements for building a logging library wrapper
>> for our project. The project includes multiple subsystems, each developing
>> components which are essentially actors. All modules/actors are supposed to
>> be using our logging interface.
>> After some research, we found neopersist library (https://github.com/
>> nestorpersist/logging) which seems to fit our needs.  One of the key
>> aspects of this library is the use of LoggingActor which handles all the
>> logging events.
>> Conceptually, this should perform pretty well, and comparable to log4j
>> async appender.
>> We ran some performance tests similar to the ones for log4j 2 as
>> described here https://logging.apache.org/log4j/2.x/performance.html.
>> As we expected, the bottleneck was the unbounded mailbox for Actors. The
>> performance tests with jmh were just too slow and throughput was too low
>> after a few iterations.
>> We changed our mailbox configuration to use  NonBlockingBoundedMailbox,
>> and performance then was comparable to AsyncAppender of log4j 2.
>> Log4j2 AsyncAppender uses lmax disruptor.
>>
>> So the question is, why isn't some variant of bounded mail default in
>> akka?
>> Was there any thought/discussion happened to use lmax disruptor based
>> mail box implementation? and why was it not done?
>>
>> Thanks,
>> Unmesh
>>
>> --
>> >> 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 akka-user+unsubscr...@googlegroups.com.
>> To post to this group, send email to akka-user@googlegroups.com.
>> Visit this group at https://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
>>  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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Use of high performance bounded mail box.

2017-07-15 Thread Konrad “ktoso” Malawski
The current default, more than anything, is bound to be the default since
it was the default since the inception of Akka and going for a bounded one
by default now could make some users unhappy.

Having that said, we're actively looking forward to pick a bounded impl for
Akka Typed. Then people come to it with new expectations and it's easier
for us to justify the change.

We also have looked at a number of such impala, including benchmarks etc
and they're definitely very cool.

So it's not that we don't want to, rather it is a question when we do :)

On July 15, 2017 at 17:33:12, Unmesh Joshi (unmeshjo...@gmail.com) wrote:

> Hi,
>
> We had some custom requirements for building a logging library wrapper for
> our project. The project includes multiple subsystems, each developing
> components which are essentially actors. All modules/actors are supposed to
> be using our logging interface.
> After some research, we found neopersist library (
> https://github.com/nestorpersist/logging) which seems to fit our needs.
> One of the key aspects of this library is the use of LoggingActor which
> handles all the logging events.
> Conceptually, this should perform pretty well, and comparable to log4j
> async appender.
> We ran some performance tests similar to the ones for log4j 2 as described
> here https://logging.apache.org/log4j/2.x/performance.html.
> As we expected, the bottleneck was the unbounded mailbox for Actors. The
> performance tests with jmh were just too slow and throughput was too low
> after a few iterations.
> We changed our mailbox configuration to use  NonBlockingBoundedMailbox,
> and performance then was comparable to AsyncAppender of log4j 2.
> Log4j2 AsyncAppender uses lmax disruptor.
>
> So the question is, why isn't some variant of bounded mail default in akka?
> Was there any thought/discussion happened to use lmax disruptor based mail
> box implementation? and why was it not done?
>
> Thanks,
> Unmesh
>
> --
> >> 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 akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
>>  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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Use of high performance bounded mail box.

2017-07-15 Thread Unmesh Joshi
Hi,

We had some custom requirements for building a logging library wrapper for 
our project. The project includes multiple subsystems, each developing 
components which are essentially actors. All modules/actors are supposed to 
be using our logging interface.
After some research, we found neopersist library 
(https://github.com/nestorpersist/logging) which seems to fit our needs. 
 One of the key aspects of this library is the use of LoggingActor which 
handles all the logging events. 
Conceptually, this should perform pretty well, and comparable to log4j 
async appender. 
We ran some performance tests similar to the ones for log4j 2 as described 
here https://logging.apache.org/log4j/2.x/performance.html. 
As we expected, the bottleneck was the unbounded mailbox for Actors. The 
performance tests with jmh were just too slow and throughput was too low 
after a few iterations.
We changed our mailbox configuration to use  NonBlockingBoundedMailbox, and 
performance then was comparable to AsyncAppender of log4j 2. 
Log4j2 AsyncAppender uses lmax disruptor.  

So the question is, why isn't some variant of bounded mail default in akka?
Was there any thought/discussion happened to use lmax disruptor based mail 
box implementation? and why was it not done?

Thanks,
Unmesh

-- 
>>  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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.