When I copy small files (images from 10kB to 150kB) from a Windows 11 24H2 client with build in Windows Defender virus scanner active to an SMB share on TrueNAS Scale, I only get a transfer rate lower than 1MB/s.
The TrueNAS Server runs on an PowerEdge T20 with Xeon E3-1225v3 and 32GB ECC RAM. The pool tank1 consits of two mirrored SATA 3TB WD Red HDDs. During copying, continuous access of the two SATA HDDs can be heard. It looks like there is an ongoing write access for the metadata.
- When I deactivate Windows Defender, there’s only an disk access every 5 sec like expected.
- Copying with robocopy and Windows defender on: Disk access every 5 sec.
- I have cross tested this with Windows 10 22H2 and Windows Defender on: Disk access every 5 sec.
All these is as expected and the performance of the copy job is much higher (20MB/s with robocopy with /MT:32) and is limited by the client.
What I have done:
- I have tried this under TrueNAS Scale 24.04, 24.10 and 25.10-BETA.1 - Goldeye
- The pool
tank1and the datasettank1\dataset2is configured with SYNC=Disabled. - smbd4.conf has custom option
strict sync=noset over the CLI. - Extended the pool with an external SLOG device (Enterprise SATA SSD Samsung SM883): No write access can be seen.
But none of that helped.
With these setting zfs should cache every write access for 5 sec, but Windows Defender under Windows 11 24H2 destroys this.
What is going on here?
Please can someone replicate this effect?
Here are my configs:
root@lagerhaus[~]# zpool status tank1
pool: tank1
state: ONLINE
config:
NAME STATE READ WRITE CKSUM
tank1 ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
712e72ca-db3c-48bc-93e4-a890615fb14f ONLINE 0 0 0
d4fbe796-620f-4388-904f-cbbd149ff880 ONLINE 0 0 0
errors: No known data errors
smb4.cnf
# Global parameters
[global]
bind interfaces only = Yes
disable spoolss = Yes
dns proxy = No
load printers = No
logging = file
max log size = 5120
min receivefile size = 16384
passdb backend = tdbsam:/var/run/samba-cache/private/passdb.tdb
printcap name = /dev/null
registry shares = Yes
restrict anonymous = 2
server multi channel support = No
server string = TrueNAS Server
winbind request timeout = 2
workgroup = PARADIES
zfs_core:zfs_block_cloning = False
zfs_core:zfs_integrity_streams = False
idmap config * : read only = True
idmap config * : range = 90000001 - 90010001
rpc_server:mdssvc = disabled
rpc_daemon:mdssd = disabled
fruit:zero_file_id = False
fruit:nfs_aces = False
idmap config * : backend = tdb
create mask = 0664
directory mask = 0775
strict sync = No
[smbshare]
ea support = No
path = /mnt/tank1/dataset2
posix locking = No
read only = No
smbd max xattr size = 2097152
vfs objects = streams_xattr shadow_copy_zfs ixnas zfs_core io_uring
fruit:resource = stream
fruit:metadata = stream
zpool iostat -v tank1 1
capacity operations bandwidth
pool alloc free read write read write
---------------------------------------- ----- ----- ----- ----- ----- -----
tank1 2.13G 458G 0 377 0 4.46M
mirror-0 2.13G 458G 0 377 0 4.46M
712e72ca-db3c-48bc-93e4-a890615fb14f - - 0 189 0 2.23M
d4fbe796-620f-4388-904f-cbbd149ff880 - - 0 187 0 2.23M
---------------------------------------- ----- ----- ----- ----- ----- -----
capacity operations bandwidth
pool alloc free read write read write
---------------------------------------- ----- ----- ----- ----- ----- -----
tank1 2.13G 458G 0 475 0 5.02M
mirror-0 2.13G 458G 0 475 0 5.02M
712e72ca-db3c-48bc-93e4-a890615fb14f - - 0 240 0 2.51M
d4fbe796-620f-4388-904f-cbbd149ff880 - - 0 235 0 2.51M
---------------------------------------- ----- ----- ----- ----- ----- -----
capacity operations bandwidth
pool alloc free read write read write
---------------------------------------- ----- ----- ----- ----- ----- -----
tank1 2.13G 458G 0 408 0 5.28M
mirror-0 2.13G 458G 0 408 0 5.28M
712e72ca-db3c-48bc-93e4-a890615fb14f - - 0 203 0 2.64M
d4fbe796-620f-4388-904f-cbbd149ff880 - - 0 204 0 2.64M
---------------------------------------- ----- ----- ----- ----- ----- -----
capacity operations bandwidth
pool alloc free read write read write
---------------------------------------- ----- ----- ----- ----- ----- -----
tank1 2.13G 458G 0 479 0 6.42M
mirror-0 2.13G 458G 0 479 0 6.42M
712e72ca-db3c-48bc-93e4-a890615fb14f - - 0 240 0 3.21M
d4fbe796-620f-4388-904f-cbbd149ff880 - - 0 239 0 3.21M
---------------------------------------- ----- ----- ----- ----- ----- -----
capacity operations bandwidth
pool alloc free read write read write
---------------------------------------- ----- ----- ----- ----- ----- -----
tank1 2.13G 458G 0 458 0 6.30M
mirror-0 2.13G 458G 0 458 0 6.30M
712e72ca-db3c-48bc-93e4-a890615fb14f - - 0 231 0 3.15M
d4fbe796-620f-4388-904f-cbbd149ff880 - - 0 227 0 3.15M
zilstat -i 1
root@lagerhaus[~]# zilstat -i 1
time cc/s ic/s idc/s idb/s iic/s iib/s imnc/s imnw/s imsc/s imsw/s
14:26:11 0 0 0 0 0 0 0 0 0 0
14:26:12 0 0 0 0 0 0 0 0 0 0
14:26:13 0 0 0 0 0 0 0 0 0 0
14:26:14 0 0 0 0 0 0 0 0 0 0
14:26:15 0 0 0 0 0 0 0 0 0 0
14:26:16 0 0 0 0 0 0 0 0 0 0
14:26:17 0 0 0 0 0 0 0 0 0 0
14:26:18 0 0 0 0 0 0 0 0 0 0
14:26:19 0 0 0 0 0 0 0 0 0 0
14:26:20 0 0 0 0 0 0 0 0 0 0
14:26:21 0 0 0 0 0 0 0 0 0 0
14:26:22 0 0 0 0 0 0 0 0 0 0
14:26:23 0 0 0 0 0 0 0 0 0 0
14:26:24 0 0 0 0 0 0 0 0 0 0
14:26:25 0 0 0 0 0 0 0 0 0 0
14:26:26 0 0 0 0 0 0 0 0 0 0
14:26:27 0 0 0 0 0 0 0 0 0 0
Best regards
Josef