Bug 681 - smbclient much slower due to charser conv
Summary: smbclient much slower due to charser conv
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: smbclient (show other bugs)
Version: 3.0.0
Hardware: Other Linux
: P3 minor
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact:
Depends on:
Reported: 2003-10-24 12:27 UTC by Giulio
Modified: 2005-08-24 10:19 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Giulio 2003-10-24 12:27:06 UTC
3.0.1pre1 on Red Hat 7.3 glibc-2.2.5-42 

smbclient is much slower due to charset conversion.

On the same host I use smbclient from 3.0 and from 2.2.7.
I test with (note that the output of the command would be 49 lines long)
time smbclient -s /tmp/file.conf -L host -Uunknown% >/dev/null 2>&1

First I try with file.conf with just "workgroup = workgroup".
2.2.7 takes about 0.300, 3.0.0 takes about 0.320

Then I try adding for 2.2.7:
character set = iso8859-1
client code page = 850
for 3.0.0:
unix charset = iso8859-15
display charset = iso8859-15
dos charset = cp850

time for 2.2.7 is almost unchanged, time for 3.0.0 is about 0.950.

I understand the need to support unicode internally, but is there no way to make
this better? I have many scripts that suddenly slow down.


$ ldd /usr/bin/smbclient
        libreadline.so.4 => /usr/lib/libreadline.so.4 (0x40013000)
        libncurses.so.5 => /usr/lib/libncurses.so.5 (0x4003a000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x40087000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x400b4000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x400c4000)
        libdl.so.2 => /lib/libdl.so.2 (0x400d8000)
        libpopt.so.0 => /usr/lib/libpopt.so.0 (0x400db000)
        libc.so.6 => /lib/libc.so.6 (0x400e3000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
Comment 1 Andrew Bartlett 2003-10-25 22:25:08 UTC
Startup time, particlularly when required for correctneess, it's really much of
a concern.  If your scripts are dramaticly slower, consier issuing multiple
commands to each smbclient.  

By specifying a charset, you cause us to use iconv etc, which do take time to
Comment 2 Gerald (Jerry) Carter (dead mail address) 2004-03-17 05:58:21 UTC
iconv performance tuning is ongoing.  Much work 
done since 3.0.0.  Marking as fixed just so we can 
get some more feedback.
Comment 3 Gerald (Jerry) Carter (dead mail address) 2005-08-24 10:19:27 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.