SMB2 performance is worse than SMB1 while iometer 512byte transfer

Jeremy Allison jra at samba.org
Fri Sep 13 23:35:41 CEST 2013


On Wed, Sep 11, 2013 at 09:43:37PM +0800, Jones wrote:
>  ... ...
> 
> C. perf top with debugging symbols loaded
> ==============================
> OK, all debugging symbols to smbd and glibc are loaded.
> 
> "perf top -p <smbd_pid>" SMB2 enabled shows:
>      6.14%  libc-2.6.1.so   [.] _int_malloc
>      4.38%  libc-2.6.1.so   [.] vfprintf
>      3.66%  libtalloc.so.2  [.] _talloc_free_internal
>      3.07%  libc-2.6.1.so   [.] _int_free
>      2.84%  [kernel]        [k] ia32_syscall
>      2.05%  libc-2.6.1.so   [.] __find_specmb
>      2.02%  libc-2.6.1.so   [.] memset
>      1.96%  libc-2.6.1.so   [.] strcmp
>      1.95%  libc-2.6.1.so   [.] _IO_default_xsputn
>      1.81%  libc-2.6.1.so   [.] malloc
>      1.75%  smbd            [.] event_add_to_poll_args
>      1.74%  libc-2.6.1.so   [.] malloc_consolidate
>      1.47%  libtalloc.so.2  [.] _talloc_zero
>      1.22%  libc-2.6.1.so   [.] free
>      1.18%  libtalloc.so.2  [.] _talloc_free
>      1.06%  libc-2.6.1.so   [.] __gettimeofday
>      1.05%  libtalloc.so.2  [.] talloc_get_name
>      1.03%  libc-2.6.1.so   [.] mempcpy
>      1.01%  libtalloc.so.2  [.] _talloc_get_type_abort
>      1.00%  libtalloc.so.2  [.] talloc_alloc_pool
>      0.97%  libc-2.6.1.so   [.] _int_realloc
>      0.93%  libc-2.6.1.so   [.] do_readv
>      0.93%  [e1000e]        [k] e1000_xmit_frame
>  ... ...
> 
> D. Modified:
> ==============================
> 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.

I'm very puzzled by you seeing vfprintf
in the SMB2 traces. What debug level have
you set in your smb.conf ?

These tevent_debug() calls inside
tevent_common_loop_immediate() and
tevent_common_schedule_immediate() are
being done at a level of TEVENT_DEBUG_TRACE.

Inside lib/util/tevent_debug.c we have:

samba_tevent_debug()

where TEVENT_DEBUG_TRACE is mapped to
a samba_level = 50.

You should only be seeing vfprintf
calls coming from tevent_common_loop_immediate()
and tevent_common_schedule_immediate()
if your debug level is set to 50 or greater.

Can you do some digging to understand
where these vfprintf are being called from ?

Thanks,

Jeremy.


More information about the samba-technical mailing list