[Samba] Samba performance with large directories

Tomas Baublys BAUBLYS at de.ibm.com
Fri Jun 24 19:04:57 GMT 2005


Jeremy Allison <jra at samba.org> wrote on 24.06.2005 20:32:19:

> This may be a filesystem problem - looks like you've got the parameters
> correct. Any chance you can test this on a different filesystem than
> reiser ? Maybe XFS ?
>
> Jeremy.

I tried XFS, the results are exactly the same. I see following in the logs,
which looks like the directory is searched file by file:

 switch message SMBtrans2 (pid 18061) conn 0x1034c2c0
[2005/06/24 16:17:45, 4] smbd/uid.c:change_to_user(217)
  change_to_user: Skipping user change - already user
[2005/06/24 16:17:45, 3] smbd/trans2.c:call_trans2findfirst(1351)
  call_trans2findfirst: dirtype = 22, maxentries = 170,
close_after_first=0, close_if_end = 0 requires_resume_key = 4 level =
0x104, max_data_bytes = 16384
[2005/06/24 16:17:45, 5] smbd/filename.c:unix_convert(108)
  unix_convert called on file "audiodaten/zentral/c5/c55crvtu.m1>"
[2005/06/24 16:17:45, 5] smbd/filename.c:unix_convert(175)
  unix_convert begin: name = audiodaten/zentral/c5/c55crvtu.m1>, dirpath =
, start = audiodaten/zentral/c5/c55crvtu.m1>
[2005/06/24 16:17:45, 10] smbd/mangle_hash2.c:is_mangled(276)
  is_mangled audiodaten/zentral/c5/c55crvtu.m1> ?
[2005/06/24 16:17:45, 10] smbd/mangle_hash2.c:is_mangled_component(215)
  is_mangled_component audiodaten/zentral/c5/c55crvtu.m1> (len 10) ?
[2005/06/24 16:17:45, 10] smbd/mangle_hash2.c:is_mangled_component(215)
  is_mangled_component audiodaten/zentral/c5/c55crvtu.m1> (len 10) ?
[2005/06/24 16:17:45, 10] smbd/mangle_hash2.c:is_mangled_component(215)
  is_mangled_component zentral/c5/c55crvtu.m1> (len 7) ?
[2005/06/24 16:17:45, 10] smbd/mangle_hash2.c:is_mangled_component(215)
  is_mangled_component c5/c55crvtu.m1> (len 2) ?
[2005/06/24 16:17:45, 10] smbd/mangle_hash2.c:is_mangled_component(215)
  is_mangled_component c55crvtu.m1> (len 12) ?
[2005/06/24 16:17:45, 5] smbd/trans2.c:call_trans2findfirst(1404)
  dir=audiodaten/zentral/c5, mask = c55crvtu.m1>
[2005/06/24 16:17:45, 5] smbd/dir.c:dptr_create(371)
  dptr_create dir=audiodaten/zentral/c5
[2005/06/24 16:17:45, 3] smbd/dir.c:dptr_create(476)
  creating new dirptr 256 for path audiodaten/zentral/c5, expect_close = 1
[2005/06/24 16:17:45, 4] smbd/trans2.c:call_trans2findfirst(1431)
  dptr_num is 256, wcard = c55crvtu.m1>, attr = 22
[2005/06/24 16:17:45, 8] smbd/trans2.c:call_trans2findfirst(1436)
  dirpath=<audiodaten/zentral/c5> dontdescend=<>
 11320 [2005/06/24 16:17:45, 8] smbd/trans2.c:get_lanman2_dir_entry(869)
  11321   get_lanman2_dir_entry:readdir on dirptr 0x1034b378 now at offset
4
  11322 [2005/06/24 16:17:45, 8] smbd/trans2.c:get_lanman2_dir_entry(869)
  11323   get_lanman2_dir_entry:readdir on dirptr 0x1034b378 now at offset
6
  11324 [2005/06/24 16:17:45, 8] smbd/trans2.c:get_lanman2_dir_entry(869)
  11325   get_lanman2_dir_entry:readdir on dirptr 0x1034b378 now at offset
9
  11326 [2005/06/24 16:17:45, 8] smbd/trans2.c:get_lanman2_dir_entry(869)
  11327   get_lanman2_dir_entry:readdir on dirptr 0x1034b378 now at offset
12
  11328 [2005/06/24 16:17:45, 8] smbd/trans2.c:get_lanman2_dir_entry(869)
  11329   get_lanman2_dir_entry:readdir on dirptr 0x1034b378 now at offset
15

=====> here it starts and goes like this for 7 seconds until:


 539011   get_lanman2_dir_entry:readdir on dirptr 0x1034b378 now at offset
794387
 539012 [2005/06/24 16:17:52, 8] smbd/trans2.c:get_lanman2_dir_entry(869)
 539013   get_lanman2_dir_entry:readdir on dirptr 0x1034b378 now at offset
2147483647
 539014 [2005/06/24 16:17:52, 8] smbd/trans2.c:get_lanman2_dir_entry(869)
 539015   get_lanman2_dir_entry:readdir on dirptr 0x1034b378 now at offset
2147483647
 539016 [2005/06/24 16:17:52, 9] smbd/trans2.c:send_trans2_replies(556)
 539017   t2_rep: params_sent_thistime = 10, data_sent_thistime = 2040,
useable_space = 16582
 539018 [2005/06/24 16:17:52, 9] smbd/trans2.c:send_trans2_replies(558)
 539019   t2_rep: params_to_send = 10, data_to_send = 2040, paramsize = 10,
datasize = 2040
 539020 [2005/06/24 16:17:52, 6] lib/util_sock.c:write_socket(449)
 539021   write_socket(25,2112)
 539022 [2005/06/24 16:17:52, 6] lib/util_sock.c:write_socket(452)
 539023   write_socket(25,2112) wrote 2112
 539024 [2005/06/24 16:17:52, 4] smbd/trans2.c:call_trans2findfirst(1518)
 539025   SMBtrans2 mask=c55crvtu.m1> directory=audiodaten/zentral/c5
dirtype=22 numentries=17
 539026 [2005/06/24 16:17:52, 10]
lib/util_sock.c:read_smb_length_return_keepalive(505)
 539027   got smb length of 37
 539028 [2005/06/24 16:17:52, 6] smbd/process.c:process_smb(1090)
 539029   got message type 0x0 of len 0x25



More information about the samba mailing list