svn commit: samba r21278 - in branches/SAMBA_3_0/source/smbd: .

Jeremy Allison jra at samba.org
Mon Feb 12 01:59:53 GMT 2007


On Sun, Feb 11, 2007 at 02:07:50PM +0000, vlendec at samba.org wrote:
> Author: vlendec
> Date: 2007-02-11 14:07:50 +0000 (Sun, 11 Feb 2007)
> New Revision: 21278
> 
> WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21278
> 
> Log:
> The main goal of this was to get rid of the NetInBuffer / set_InBuffer. But it
> turns out that this patch actually speeds up the async writes considerably.
> 
> I tested writing 100.000 times 65535 bytes with the allowed 10 ops in
> parallel. Without this patch it took about 32 seconds on my dual-core 1.6GHz
> laptop. With this patch it dropped to about 26 seconds. I can only explain it
> by better cache locality, NewInBuffer allocates more than 128k, so we jump
> around in memory more.
> 
> Jeremy, please check!

Very interesting.... Originally I deliberately flipped
to a new buffer rather than do a memcpy of the incoming
write data as I assumed this would be faster. Your data
suggests the memcpy is faster than a new alloc and
swapping out the pointer.

Can you test on systems where aio is being done
natively rather than with pthreads under the
covers (AIX I think is one).

The write code can potentially write 127k rather
than 65k so it might be interesting to compare
with that write size also. Can you run cachegrind
on both methods to see why the memcpy ends up
taking less time ?

Let's understand what the real effects are here
before we merge this into SAMBA_3_0_25, but I'm
really glad you're challenging these assumptions,
that's the only way we get progress :-).

Thanks,

	Jeremy.


More information about the samba-technical mailing list