Web lists-archives.com

[Samba] 32 seconds vs 72 minutes -- expected performance difference?




## QUESTION

I am sharing a 120GB folder with lots of files via Samba on a LAN (1Gbps
connection).

1) Doing an `ls -lR` on the server (on this folder) takes ~32 seconds,
compared with **72 minutes** on the client. Is this difference in
performance expected (due to network and protocol overhead)?

2) While the client is executing an `ls -lR`, one smbd process on the
server uses about 30-40% of a single CPU (on an 4c/8t machine). Is this
much CPU load expected? (Also, the client ends up consuming all 1Gbps of
network bandwidth).

Is samba transferring all the files from the server to the client for this
operation?

## CONFIGURATION

Server & client, both, are on Ubuntu 18.04 and are using the stock version
of the kernel, samba, etc. The version being reported:

    # smbd --version
    Version 4.7.6-Ubuntu

smb.conf:

    [global]
    smb encrypt = required
    disable netbios = yes
    case sensitive = yes
    preserve case = yes
    short preserve case = yes
    workgroup = WORKGROUP
    server string = %h server (Samba, Ubuntu)
    wins support = no
    dns proxy = no
    interfaces = {{ internal_ip }}
    bind interfaces only = yes
    log file = /var/log/samba/log.%m
    max log size = 1000
    syslog = 0
    panic action = /usr/share/samba/panic-action %d
    server role = standalone server
    passdb backend = tdbsam
    obey pam restrictions = no
    unix password sync = no
    pam password change = no
    map to guest = never
    usershare allow guests = yes

    [myshare]
    path = /samba/uploaded-files
    browseable = no
    read only = no
    valid users = [redacted]

-- Saurabh.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba