[Samba] Samba write performance in kernel

Lin Mac mkl23 at hotmail.com
Wed Sep 3 06:04:53 GMT 2008


hi,

I would like to know how should I test the RECVFILE functionality? I've been trying to test the splice and  expect to see that smbd would at least try splice and fails maybe? But I found that my data path isn't going through the vfswrap_recvfile, which calls sys_recvfile and splice. 

I have enabled HAVE_LINUX_SPLICE (by ac_cv_have_splice_decl=yes and samba_cv_HAVE_LINUX_SPLICE=yes while running configure), so I think I have splice enabled. But I think that's not the reason, the data just don't go through vfswrap_recvfile.

I test by download data from linux and windows, drag and drop on explorer, and both show message alike.

Any help would be appreciated.

------------------------------------------------

linux-2.6.23.9


samba-3.2.2

------------------------------------------------

the writing part message of my log.smb:


[1970/01/01 00:07:13, 11] lib/events.c:run_events(257)

  run_events: Nothing to do

[1970/01/01 00:07:13, 10] smbd/process.c:async_processing(649)

  async_processing: Doing async processing.

[1970/01/01 00:07:13, 11] lib/events.c:run_events(257)

  run_events: Nothing to do

[1970/01/01 00:07:13, 10] lib/util_sock.c:read_smb_length_return_keepalive(1118)

  got smb length of 61504

[1970/01/01 00:07:14,  6] smbd/process.c:process_smb(1546)

  got message type 0x0 of len 0xf040

[1970/01/01 00:07:14,  3] smbd/process.c:process_smb(1549)

  Transaction 120 of length 61508 (0 toread)

[1970/01/01 00:07:14,  5] lib/util.c:show_msg(642)

[1970/01/01 00:07:14,  5] lib/util.c:show_msg(652)

  size=61504

  smb_com=0x2f

  smb_rcls=0

  smb_reh=0

  smb_err=0

  smb_flg=24

  smb_flg2=51207

  smb_tid=3

  smb_pid=65279

  smb_uid=0

  smb_mid=9027

  smt_wct=14

  smb_vwv[ 0]=  255 (0xFF)

  smb_vwv[ 1]=57054 (0xDEDE)

  smb_vwv[ 2]= 4948 (0x1354)

  smb_vwv[ 3]=    0 (0x0)

  smb_vwv[ 4]=    0 (0x0)

  smb_vwv[ 5]=65535 (0xFFFF)

  smb_vwv[ 6]=65535 (0xFFFF)

  smb_vwv[ 7]=    0 (0x0)

  smb_vwv[ 8]=    0 (0x0)

  smb_vwv[ 9]=    0 (0x0)

  smb_vwv[10]=61440 (0xF000)

  smb_vwv[11]=   64 (0x40)

  smb_vwv[12]=    0 (0x0)

  smb_vwv[13]=    0 (0x0)

  smb_bcc=61441

[1970/01/01 00:07:14, 10] lib/util.c:dump_data(2223)

  [000] EE 25 50 44 46 2D 31 2E  34 0D 25 E2 E3 CF D3 0D  .%PDF-1. 4.%.....

(...............)

  [EFF0] E0 01 61 75 65 BD A2 46  45 D4 00 1E 11 01 13 0D  ..aue..F E.......

  [F000] A2                                                . 

[1970/01/01 00:07:19,  3] smbd/process.c:switch_message(1361)

  switch message SMBwriteX (pid 760) conn 0xaae620

[1970/01/01 00:07:19,  0] smbd/process.c:smb_dump(1309)

  created /tmp/SMBwriteX.4.req len 61508

[1970/01/01 00:07:19,  4] smbd/uid.c:change_to_user(176)

  change_to_user: Skipping user change - already user

[1970/01/01 00:07:19, 10] locking/locking.c:is_locked(98)

  is_locked: optimisation - exclusive oplock on file EDIOL_2008JUL25_DSP_TA_01.pdf

[1970/01/01 00:07:19, 10] locking/locking.c:is_locked(136)

  is_locked: flavour = WINDOWS_LOCK brl start=0 len=61440 unlocked for fnum 4948 file EDIOL_2008JUL25_DSP_TA_01.pdf

[1970/01/01 00:07:19,  8] smbd/dosmode.c:dos_mode(354)

  dos_mode: EDIOL_2008JUL25_DSP_TA_01.pdf

[1970/01/01 00:07:19,  8] smbd/dosmode.c:dos_mode_from_sbuf(170)

  dos_mode_from_sbuf returning a

[1970/01/01 00:07:19,  8] smbd/dosmode.c:dos_mode(394)

  dos_mode returning a[sparse]

[1970/01/01 00:07:19, 10] smbd/fileio.c:real_write_file(140)

  real_write_file (EDIOL_2008JUL25_DSP_TA_01.pdf): pos = 0, size = 61440, returned 61440

[1970/01/01 00:07:19,  3] smbd/reply.c:reply_write_and_X(4052)

  writeX fnum=4948 num=61440 wrote=61440

[1970/01/01 00:07:19,  5] lib/util.c:show_msg(642)

[1970/01/01 00:07:19,  5] lib/util.c:show_msg(652)

  size=47

  smb_com=0x2f

  smb_rcls=0

  smb_reh=0

  smb_err=0

  smb_flg=136

  smb_flg2=49153

  smb_tid=3

  smb_pid=65279

  smb_uid=0

  smb_mid=9027

  smt_wct=6

  smb_vwv[ 0]=  255 (0xFF)

  smb_vwv[ 1]=    0 (0x0)

  smb_vwv[ 2]=61440 (0xF000)

  smb_vwv[ 3]=    0 (0x0)

  smb_vwv[ 4]=    0 (0x0)

  smb_vwv[ 5]=    0 (0x0)

  smb_bcc=0
Best Regards,
Mac Lin

> Date: Tue, 26 Aug 2008 10:41:24 -0700
> From: jra at samba.org
> To: mkl23 at hotmail.com
> CC: jra at samba.org; samba at lists.samba.org
> Subject: Re: [Samba] Samba write performance in kernel
> 
> On Wed, Aug 27, 2008 at 01:12:13AM +0800, Lin Mac wrote:
> > 
> > hi Jeremy,
> > splice is support after linux 2.6.17. Does it means that splice+RECEIVEFILEI would work on samba 3.2.x on linux 2.6.17 or later version?
> > I would try it tomorrow, but it seems that it won't work right now, right?
> 
> splice isn't a fully functional system call unfortunately. It works
> for file -> socket, or pipe -> pipe, but when I tested it it didn't
> work with socket -> file.
> 
> Your Millage May Vary (depending on Linux kernel release) unfortunately.
> 
> Jeremy.

_________________________________________________________________
¤U¸ü Windows Live Messenger 8.5 ·mÂAª©¡A¦h¤¸·¾³q¡BºÉ±¡¤À¨É¡A©M§Y®É¶Ç°T¦n¤Í½u¤W¦P¼Ö¡I¡X ¥ß§Y¤U¸ü
http://get.live.com/zh-cht-tw/betas/messenger_betas


More information about the samba mailing list