acl handling on delete (performance problem)
Jure Peèar
pegasus at nerv.eu.org
Sun Jul 25 16:15:14 GMT 2004
Hi all,
Since i didn't receive any replies on samba list, i'm posting again here.
I'm debugging a performance problem for a client. Needless to say, the
organisation of their data is such that this problem is really annoying.
Here's the situation:
Samba 3.0.x PDC in a mixed 9x/nt/xp environment, using acls. When trying to
delete a large number of folders from a folder, the 'preparing to delete'
stage takes about half hour.
It's simple to repeat: set up samba pdc, join an xp client into the domain,
map a share with some 4000 folders and try to delete them.
Strace of a smbd proccess in the 'preparing to delete' stage looks like
this:
stat("/mnt/test/test/0220", {st_mode=S_IFDIR|0755, st_size=6, ...}) = 0
gettimeofday({1090703949, 903367}, NULL) = 0
stat("/mnt/test/test/0220", {st_mode=S_IFDIR|0755, st_size=6, ...}) = 0
getxattr("/mnt/test/test/0220", "system.posix_acl_access", 0x11fffe940, 132)
= -1 ENODATA (No data available)
stat("/mnt/test/test/0220", {st_mode=S_IFDIR|0755, st_size=6, ...}) = 0
getxattr("/mnt/test/test/0220", "system.posix_acl_default", 0x11fffe940,
132) = -1 ENODATA (No data available)
stat("/mnt/test/test/0220", {st_mode=S_IFDIR|0755, st_size=6, ...}) = 0
getxattr("/mnt/test/test/0220", "user.SAMBA_PAI", 0x1207f0aa0, 1024) = -1
ENODATA (No data available)
For every folder it wants to delete, it walks all the folders doing this. So
for 4k folders we get 16 milion such tests, which take waay too much time.
Are these loops necessary? Can they be optimised?
We've tested ext3+acl and xfs as an underlying filesystem, with no
difference. We also noticed this behaviour on win98 as a client.
Tested on 3.0.2a and 3.0.4, smb.conf attached.
In my own testings i've noticed that with security=share and with anon r/w
public share samba doesn't do any getxattr calls and this whole tests
completes within minutes, as it should. Also, on a linux client mounting the
share via smbmount deleting also takes just minutes.
--
Jure Peèar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smb.conf
Type: application/octet-stream
Size: 1302 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20040725/02e96c4e/smb.obj
More information about the samba-technical
mailing list