KIP, Powerprint Request software -samba
Martin Zielinski
mz at seh.de
Fri Aug 13 09:43:10 GMT 2004
On Friday 13 August 2004 10:50, Thomas Mieslinger wrote:
> Hello,
>
> so how long does the directory listing on the Linux commandline take? maybe
> this ain't a Samba Problem, but an ext3 issue. how about an other test
> using xfs?
That's not the problem. Even the directory listing from Windows, using the
explorer is fast.
I'm not so deep in Windows API, but the slow-down effect using the Powerprint
application is caused by treating the request (samba calls it
"trans2findfirst") as a request using a wildcard.
Maybe the correct behaviour to get the file info would be a different call
from the Windows API - but I don't know.
Samba creates a directory listing for each file request with
"dptr_create(...)" to find a match between the file and the directory
content.
I think, the way to fix this behaviour ist to detect, that the file name is
NOT a wildcard but a valid file name. Checking, if we can get an excact match
on the pattern, and - if so - skip the directory listing could be the trick.
But I'm not deep enaugh in Samba to be really shure about that or even able to
test it by hacking Samba :-(
BTW: I use reiserfs and this is optimized for large directory listings.
Cheers,
Martin
>
> regards Thomas
> --
> General Logistics Systems
> Thomas Mieslinger
> German-Parcel-Str. 1-7 fon: +49 6677 17 463
> 36286 Neuenstein fax: +49 6677 17 111
> Germany eMail: thomas.mieslinger at gls-germany.com
>
> samba-technical-bounces+thomas.mieslinger=gls-germany.com at lists.samba.org
>
> schrieb am 13.08.2004 10:25:44:
> > Hello,
> > I took a look at this interesting problem (Samba 3.0.4).
> > Tracing the situation with ethereal shows, that the application requests
>
> a
>
> > directory listing and after that calls a "FIND_FIRST2" request for each
>
> file
>
> > in the listing. So there is no opening and reading of files or whatever.
> > The behaviour is the same with Samba or a windows box.
> >
> > Comparing the trace from Samba to Windows shows, that the response times
>
> to
>
> > these requests increase massively on Samba with the number of files in
>
> the
>
> > directory, while the response time stays allmost constant on windows:
> >
> > Windows: 4000 files ~0.0005 seconds, 50 files ~0.0005 seconds
> > Samba: 4000 files ~0.004 - 0.005 seconds, 50 files ~ 0.0004 seconds
> >
> > So Samba needs (4000 files) about 20 seconds only for the
>
> responses,Windows 2
>
> > seconds.
> >
> > The response times are also related to the place in the directory
>
> listing:
> > I named my 4000 files 0-3999 and the responses to the lower numberedfiles
>
> are
>
> > quicker than the responses to requests on the higher numberd files.
> >
> > Looks, like Samba searches linear directory listings for each request on
>
> one
>
> > file ??.
--
Martin Zielinski mz at seh.de
Software Development
SEH Computertechnik GmbH www.seh.de
More information about the samba-technical
mailing list