[HOW] Veracrypt file container very slow write on SMB

This forum serves as a free discussion zone, intended to facilitate community conversations on topics unrelated to TerraMaster products and services.
User avatar
EriChan
TM Support
Posts: 310
Joined: 06 Jan 2026, 12:27
China

Re: [HOW] Veracrypt file container very slow write on SMB

Post by EriChan »

wenuam wrote: 29 Jul 2026, 15:32
Samba does not read back the data to compare or verify it after writing.The ~20x speed drop is not caused by extra network or read traffic, but by physical disk latency and IOPS limits when synchronous flushes are enforced.

Here is what actually happens under the hood:
  • Client Flush Requests: Backup applications and OS file managers frequently issue SMB2_FLUSH commands, explicitly asking the NAS to commit data to physical non-volatile storage before sending the next chunk.
  • Hardware Blocking (fsync): With strict sync = yes, Samba strictly honors these commands by calling Linux fsync(), forcing the hard drive to write data immediately to physical platters/NAND.
  • The IOPS Bottleneck: Physical hard drives (and USB-connected storage) can only process around 100 to 200 physical write/flush operations per second (IOPS). If a client sends frequent flush requests with small buffers, the mechanical seek latency forces throughput down to around 4 MB/s ($100 flushes/sec x small buffer).
When strict sync = no is set, Samba intercepts these flush requests in high-speed system RAM (Page Cache), completely bypassing physical disk latency during transfer—allowing the NAS to easily sustain 70 MB/s+.
To contact our team, please send email to following addresses, remember to replace (at) with @

Technical team: support(at)terra-master.com(for technical support)
Service team: service(at)terra-master.com(for purchasing, return, replacement, RMA service)
User avatar
Gremlin
Gold Member
Posts: 1719
Joined: 02 Dec 2022, 22:31
Great Britain

Re: [HOW] Veracrypt file container very slow write on SMB

Post by Gremlin »

EriChan wrote: 29 Jul 2026, 21:11
Thanks for the explanation. I was wondering which end did what :!:
I appreciate these short "inside the NAS" explanations when they are available.
F5-221 TOS7.0.1130 - 4x4TB (Ironwolf) Traid
F2-424 TOS7.0.1130 - 2x500GB nvme (P3) Traid, 2x6TB HDD (HGST) Traid
F2-221 TOS7.0.1130 - 1x3TB Ext4, 1x4TB Btrfs
F2-425+ TOS7.0.1130 - 2x500GB nvme (P3) Traid, 2x6TB HDD (EXOS) Traid
User avatar
wenuam
Posts: 20
Joined: 02 Oct 2024, 18:38
France

Re: [HOW] Veracrypt file container very slow write on SMB

Post by wenuam »

Then if the NAS can sustain 70 MB/s write speed with no data loss (I checked) what is the "strict sync = yes" waiting for if the data can be written fast enough to the disk ?

Is "Linux fsync()" the bottleneck ? I don't think this alone could send the writing speed to a crawl, otherwise there is a big design flaw there.

Write speed fluctuate nonetheless even with "strict sync = no", but not as much and at least the general throughput is comfortable.
Post Reply

Return to “Lounge and Boast”