SMB2 performance is worse than SMB1 while iometer 512byte transfer

Volker Lendecke Volker.Lendecke at SerNet.DE
Wed Sep 11 16:18:19 CEST 2013


On Wed, Sep 11, 2013 at 09:43:37PM +0800, Jones wrote:
> 1. lib/tevent/tevent_immediate.ctevent_immediate.c:
>    Comment tevent_debug in tevent_common_loop_immediate and
> tevent_common_schedule_immediate,
>    this ease the pain from vfprintf.

Yep, that's good.

> 2. source3/smbd/process.c
>    Move following 2 lines outside the while(True) loop.
>    frame = talloc_stackframe_pool(8192)
>    TALLOC_FREE(frame);

That's not necessarily a good idea. We pretty much depend on
this to work.

> E. perf top to compare modified before and after
> ==============================
> After modified,
> 1. IOps raised up 7000~10000 IOps.
> 2. %us droppped 5%~7%
> 3. %sy raised up 8%~10%
> 
> Before Modified:
> Protocol R/W    IOps    %CPU    %us    %sy   %id   %si
> -------------------------------------------------------
> SMB2     Read  23826    100%  72.3%  22.8%  0.0%  5.0%
> SMB2     Write 20366    100%  70.3% 24.8%  0.0%  5.0%
> 
> After Modified:
> Protocol R/W    IOps    %CPU    %us    %sy   %id   %si
> -------------------------------------------------------
> SMB2     Read  33007    100%  66.0% 30.0%  0.0%  4.0%
> SMB2     Write 27720    100%  65.0%  34.0%  0.0%  1.0%
> 
> F. Question
> ==============================
> The attached file is the output as "perf top -G -p <smbd_pid>",
> the user-space call stacks shows many tevent+talloc arhchitecture,
> it seems that spent much more computing cycles on _int_malloc and glibc
> symbols.
> Is it possible to tune this asynchronous architecture for SMB2? timer etc ?
> Or this guess put me wrong direction to tune the performance,
> any suggestion is appreciated,
> thanks.

You got it pretty much right. SMB2 is much more
asynchronous. I would like to ask you to work with 4.0 or
even better with Samba master. 3.6 is pretty much dead with
regards to performance improvements. I have a Raspberry Pi
on my desktop now, I just need to take the time to tune SMB2
read/write for this platform. I think that will show the
bottlenecks in user space pretty spectacularly.

> G. Other lists
> ==============================
> https://lists.samba.org/archive/samba-technical/2013-June/092986.html
> I have already tried samba-4.0.5 but still with no luck,
> the read and write IOps keeping around 20000 IOps.

3.6 and 4.0 differ in SMB2 packet handling, so this might
have some influence.

Are you in the position to consider a move to Samba 4.1
(about to be released soon), or do you have to tune 3.6?

BTW, I am actively working on SMB2 leases at this very
moment. This will lift the need for small-block transfers
significantly. Unfortunately, in the initial run this will
be a 4.2 only thing, 4.1 is already closed for that kind of
significant architecture change. But it will be interesting
for you.

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de

*****************************************************************
visit us on it-sa:IT security exhibitions in Nürnberg, Germany
October 8th - 10th 2013, hall 12, booth 333
free tickets available via code 270691 on: www.it-sa.de/gutschein
******************************************************************


More information about the samba-technical mailing list