SMB2 performance is worse than SMB1 while iometer 512byte transfer
Jones
jones.kstw at gmail.com
Sun Sep 15 00:21:27 CEST 2013
Hi Jeremy,
2013/9/14 Jeremy Allison <jra at samba.org>
>
>
> talloc_chunk_from_ptr should be inlined, so I'm assuming
> inlined functions shouldn't show up on perf (I may be
> wrong here :-).
>
> How are you compiling smbd. Are you using -O<level> ?
>
You are right! It is my fault!
There is no optimization level is specified when I compiling samba4,
After re-run the configuration phase with CFLAGS="-O -g" and re-compiling,
perf top does not show talloc_chunk_from_ptr anymore.
With samba-3.6, though -O is not specified in configuration phase,
source3/Makefile could see this
CFLAGS= -O -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS $(FLAGS)
-D_SAMBA_BUILD_=3
With samba-4 series, it is likely -O should be explicit specified,
now samba4 is deployed with python-style waf so cannot found the Makefile
as expected.
Found following links but not get much hint to where add the optimize flags,
is ./configure CFLAGS="-O" sufficient?
https://wiki.samba.org/index.php/Build_Samba
https://wiki.samba.org/index.php/Waf#add_better_optimizations_options
samba-4.2.0pre1-GIT-UNKNOWUN (samba-master on 2013/Sep/12)
Without -O
Protocol R/W IOps %CPU %us %sy %id %si
-----------------------------------------------------------
SMB2 Read 21410 100% 73.3% 20.8% 0.0% 5.9%
SMB2 Write 20628 100% 73.0% 20.0% 0.0% 7.0%
With -O
Protocol R/W IOps %CPU %us %sy %id %si
-----------------------------------------------------------
SMB2 Read 27643 100% 67.0% 26.0% 0.0% 7.0%
SMB2 Write 21921 100% 64.0% 30.0% 0.0% 6.0%
"perf top -p <smbd_pid>" SMB2 enabled shows:
4.05% libtalloc.so.2.1.0 [.] _talloc_free_internal
3.11% [kernel] [k] ia32_syscall
2.40% libc-2.6.1.so [.] _int_malloc
1.92% libc-2.6.1.so [.] strcmp
1.45% libtalloc.so.2.1.0 [.] talloc_alloc_pool
1.38% [e1000e] [k] e1000_xmit_frame
1.36% libc-2.6.1.so [.] _int_free
1.31% libc-2.6.1.so [.] memset
1.31% libc-2.6.1.so [.] __gettimeofday
1.30% libtalloc.so.2.1.0 [.] _talloc_get_type_abort
1.14% libtalloc.so.2.1.0 [.] _talloc_free
1.14% libtalloc.so.2.1.0 [.] _talloc_zero
1.13% libtevent.so.0.9.19 [.] _tevent_req_create
1.06% libtalloc.so.2.1.0 [.] talloc_get_name
1.02% libtalloc.so.2.1.0 [.] talloc_pool
1.02% [kernel] [k] __ticket_spin_lock
0.90% libsmbd_base.so [.] smbd_smb2_request_dispatch
0.88% [kernel] [k] tcp_write_xmit
0.88% [kernel] [k] tcp_sendmsg
0.86% libc-2.6.1.so [.] do_readv
0.83% libtalloc.so.2.1.0 [.] __i686.get_pc_thunk.bx
0.71% libc-2.6.1.so [.] memcpy
0.69% libc-2.6.1.so [.] malloc
0.65% [e1000e] [k] e1000_clean_rx_irq
0.63% libsmbd_base.so [.] smbd_smb2_request_process_read
0.62% [kernel] [k] tcp_transmit_skb
Regards,
Jones
More information about the samba-technical
mailing list