認証されたユーザーに対する CIFS/SMB ファイル転送が遅い

認証されたユーザーに対する CIFS/SMB ファイル転送が遅い

ローカル ユーザーとドメイン ユーザーが高速転送できるように CIFS を構成するにはどうすればよいでしょうか?

CIFS / SMB / Samba をユーザーと組み合わせて使用​​すると、パフォーマンスに大きな問題が発生します。これは、Active Directory (AD) が有効か無効かとは関係ありません。ローカル ユーザーとドメイン ユーザーのデータの転送速度は非常に遅いです。ゲスト ユーザーの場合は問題ありません。

しかし、認証されたユーザーのボトルネックの原因がわかりません。また、この問題を回避するために samba を構成するにはどうすればよいでしょうか。

CIFS / SMB 転送速度

User ----------- write ------------ read
Root ---------- 21.3MB/s -------- 21.8MB/s
Domain -------- 19.7MB/s -------- 19.4MB/s
Guest----------105.1MB/s ------- 101.2MB/s
(Root via AFP  109.7MB/s ------- 108.9MB/s)

1GB のジャンクのシーケンシャル読み取りと書き込みでテスト済み。

SMB4.conf

[global]

    server max protocol = SMB3_11
    encrypt passwords = yes
    dns proxy = no
    strict locking = no
    oplocks = yes
    deadtime = 1
    max log size = 51200
    max open files = 588197
    logging = file
    load printers = no
    printing = bsd
    printcap name = /dev/null
    disable spoolss = yes
    getwd cache = yes
    guest account = nobody
    map to guest = Bad User
    obey pam restrictions = yes
    directory name cache size = 0
    kernel change notify = no
    panic action = /usr/local/libexec/samba/samba-backtrace
    nsupdate command = /usr/local/bin/samba-nsupdate -g
    server string = FreeNAS File Server
    ea support = yes
    store dos attributes = yes
    lm announce = yes
    acl allow execute always = true
    dos filemode = yes
    multicast dns register = yes
    domain logons = no
    idmap config *: backend = tdb
    idmap config *: range = 90000001-100000000
    server role = member server
    workgroup = MYDOMAIN
    realm = MYDOMAIN.LAN
    security = ADS
    client use spnego = yes
    cache directory = /var/tmp/.cache/.samba
    local master = no
    domain master = no
    preferred master = no
    ads dns update = yes
    winbind cache time = 7200
    winbind offline logon = yes
    winbind enum users = yes
    winbind enum groups = yes
    winbind nested groups = yes
    winbind use default domain = no
    winbind refresh tickets = yes
    idmap config MYDOMAIN: backend = rid
    idmap config MYDOMAIN: range = 20000-90000000
    allow trusted domains = no
    client ldap sasl wrapping = plain
    template shell = /bin/sh
    template homedir = /home/%D/%U
    netbios name = S-FREENAS
    pid directory = /var/run/samba
    create mask = 0666
    directory mask = 0777
    client ntlmv2 auth = yes
    dos charset = CP437
    unix charset = UTF-8
    log level = 1

[temp]

    path = /mnt/zfs03/temp
    printable = no
    veto files = /.snapshot/.windows/.mac/.zfs/
    writeable = yes
    browseable = yes
    vfs objects = zfs_space zfsacl aio_pthread streams_xattr catia fruit
    hide dot files = yes
    guest ok = yes
    nfs4:mode = special
    nfs4:acedup = merge
    nfs4:chown = true
    zfsacl:acesort = dontcare

ルートとして転送中のTOP:

last pid: 46255;  load averages:  0.81,  0.49,  0.39                                                     up 2+01:33:28  10:49:23

45 processes:  3 running, 42 sleeping
CPU: 11.7% user,  0.0% nice,  0.9% system,  0.0% interrupt, 87.4% idle
Mem: 273M Active, 3125M Inact, 15G Wired, 230M Cache, 734M Free
ARC: 14G Total, 985M MFU, 12G MRU, 290K Anon, 63M Header, 202M Other
Swap: 8192M Total, 148K Used, 8191M Free

  PID USERNAME    THR PRI NICE   SIZE    RES STATE   C   TIME    WCPU COMMAND

46144 root          1 102    0   337M 29744K CPU4    4   1:46 100.00% smbd
2443 root          1 -52   r0  6304K  2272K CPU1    1  13:39   0.10% watchdogd
11480 root         12  21    0   241M 20348K nanslp  1  18:20   0.00% collectd
4655 root          6  21    0   409M   183M select  7   7:11   0.00% python2.7
19466 root          1  52    0   237M 64044K select  7   2:46   0.00% python2.7
2779 root          1  20    0 36500K 18216K select  5   0:56   0.00% ntpd
1919 root          1  20    0 79388K  5024K kqread  3   0:16   0.00% syslog-ng

ゲストとして転送中のTOP

last pid: 46439;  load averages:  0.91,  0.68,  0.49                                                     up 2+01:37:13  10:53:08
45 processes:  1 running, 44 sleeping
CPU:  0.8% user,  0.0% nice,  3.6% system,  1.9% interrupt, 93.7% idle
Mem: 273M Active, 3125M Inact, 15G Wired, 230M Cache, 734M Free
ARC: 14G Total, 1332M MFU, 13G MRU, 8994K Anon, 64M Header, 203M Other
Swap: 8192M Total, 148K Used, 8191M Free

PID USERNAME    THR PRI NICE   SIZE    RES STATE   C   TIME    WCPU COMMAND
46407 root          1  46    0   337M 29760K select  4   0:14  38.09% smbd
11480 root         12  21    0   241M 20380K nanslp  3  18:22   0.20% collectd
19466 root          1  52    0   237M 64044K select  6   2:46   0.20% python2.7
2443 root          1 -52   r0  6304K  2272K nanslp  2  13:40   0.10% watchdogd
4655 root          6  20    0   409M   183M select  6   7:15   0.00% python2.7
2779 root          1  20    0 36500K 18216K select  3   0:56   0.00% ntpd

ハードウェア

  • アズロック C2750D4I
  • インテル オクタコア Avoton C2750
  • 16GB DDR3 1600 ECC メモリ 4
  • WD Red Pro 4TB (2 つのストリップミラー)
  • 1GB/秒のLAN
  • フリーNASOS9.10.1
  • 32GB USB2.0スティック

関連情報