[Rabbit-dev] Rabbit-dev Digest, Vol 18, Issue 3

Robert Olofsson robert.olofsson at khelekore.org
Sat Aug 20 16:35:37 CEST 2011


Hi!

On Sat, 20 Aug 2011 07:59:35 -0400
Rick Leir <rickleir at leirtech.com> wrote:

> > Read and write are normal read/write.
> > The transfer values are zero copy data transfers.
> Hi Robo,
> Would you explain this more please?

I can try!

A normal read means that the OS kernel does a read and then 
move the data to user space, the program then has to 
do a write that will move the data back to kernel space and out
on the specified channel.

A zero copy transfer means that the kernel reads the data
and then writes the data directly to the output channel, without
going through user space.

This means that a zero copy transfer can be quite a lot faster and
use less resources. It also means that rabbit (or other programs)
can _not_ filter or modify the data. 

Rabbit tries to use zero copy transfers for cache handling, but
falls back to normal read/write if transferTo/transferFrom calls
are not available. I would guess that most installations of rabbit
will not see much of a difference, but when I benchmarked it some
years ago there was quite a big difference (not sure about the
exact numbers, but something like 10-25% more requests served if I
remember correctly).

/robo



More information about the Rabbit-dev mailing list