[infinispan-dev] Adaptive marshaller buffer sizes - ISPN-1102

Sanne Grinovero sanne.grinovero at gmail.com
Mon May 23 17:03:18 EDT 2011


2011/5/23 Bela Ban <bban at redhat.com>:
>
>
> On 5/23/11 6:50 PM, Dan Berindei wrote:
>
>>>   From my experience, reusing and syncing on a buffer will be slower than
>>> making a simple arraycopy. I used to reuse buffers in JGroups, but got
>>> better perf when I simply copied the buffer.
>>
>> We wouldn't need any synchronization if we reused one buffer per thread ;-)
>
>
> Dangerous for 2 reasons. First a reused buffer can grow: for example if
> you send 2K messages all the time, then 1 5M message, then back to 2K,
> you might have a 5M sized buffer around, unless you do resizing every
> now and then. Second, you could end up with many threads, therefore many
> buffers, and this is unpredictable. As I mentioned in my previous email,
> the buffers we're talking about are on the receiver side, and if someone
> configures a large thread pool, you could end up with many buffers.
> Configuration of thread pools is outside of our control.
>
> I suggest that - whatever you guys do - measure the impact on
> performance and memory usage. As I said before, my money's on simple
> copying... :-)

I'm sorry, it seems I was affecting this thread with ideas about
sending, as you say; in fact I don't know how receiving works.

+1 for simplicity: I can bet blindly on that anyway, unless we come up
with very persuasive evidence.

Sanne

>
>
>
> --
> Bela Ban
> Lead JGroups / Clustering Team
> JBoss
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>



More information about the infinispan-dev mailing list