Zero Copy

"Trustin Lee (이희승)" trustin at gmail.com
Wed Apr 28 04:50:21 EDT 2010


Clement Mathieu wrote:
> On Wed, 28 Apr 2010 16:10:00 +0900
> "Trustin Lee (이희승)" <trustin at gmail.com> wrote:
> 
>> I don't think reducing the number of memory copy operations will boost
>> the throughput that much.  Maybe you need to figure out what exactly
>> is causing the slowdown before optimizing memory bandwidth?
> 
> I'm currently using netty to rewrite the network stack of our product.
> We must be able to handle both small and big frames (from a few KBs
> to several MBs).
> 
> Comparing the netty implementation to the RMI one, I noticed that netty
> was slower than RMI (1 client, 1 server). A quick profiling session
> using yourkit told me that array copies are an hotspot. Especially,
> the copy performed by the frame decoder cost me a lot (garbage
> collection).  I have planned to write my own zero copy frame decoder to
> see how it performs.

Yes, it can happen.  My point is that optimizing it wouldn't give you 4x
throughput.

By the way, here's a special HornetQ decoder which involves less copy:

    http://is.gd/bL74b

If possible, it is always a better idea to merge small frames to a
bigger one.

HTH,
Trustin

-- 
what we call human nature in actuality is human habit
http://gleamynode.net/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
Url : http://lists.jboss.org/pipermail/netty-users/attachments/20100428/4d8b7b81/attachment-0001.bin 


More information about the netty-users mailing list