simple sync write test

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

gea

Well-Known Member
Dec 31, 2010
3,141
1,182
113
DE
I have added a simple sync write test into current napp-it (Pools > Benchmark > syncwrite).
It opens a file, writes a character and closes the file and checks how often this can be done in an intervall like 60s and gives a good impression of your sync write performance degration.

With a diskbased pool the difference of sync=disabled (use writecache only) vs sync=always (commit every write) is really really huge, even with a good SSD only pool you get a degration.

example (SSD Pool, Sandisk Extreme, 2 x vdev Z2)

Code:
begin writing..

results 
filesystem: /av/test
sync setting:    always
write per commit:    1KB
writes: 8691
time (s): 30
writes/s: 289


begin writing... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

results 
filesystem: /av/test
sync setting:    disabled
write per commit:    1KB
writes: 898385
time (s): 30
write /s: 29946
 
Last edited:

gea

Well-Known Member
Dec 31, 2010
3,141
1,182
113
DE
I have extended this simple test to test sync vs async with small and larger filesize, optional with modified recsize settings and a final sequential dd test with 5GB (current napp-it free/Pro)

exa disk based pool

Code:
hostname                           filer
pool                               tank
write loop                         10 s
remark                             2 x Z2/6 disk vdev HGST Ultrastar 4TB

test 1/2 results                   writes via cache + sync logging    writes via cache only            
data per write                     8KB                                8KB                              
sync setting                       always                             disabled                         
compress setting                   off                                off                              
recordsize setting                 128K                               128K                             
write actions                      47                                 454                              
write actions/s                    4                                  45                               
throughput                         32 KBytes/s                        360 KBytes/s                     

test 3/4 results                   writes via cache + sync logging    writes via cache only            
data per commit                    256K                               256K                             
sync setting                       always                             disabled                         
compress setting                   off                                off                              
recordsize setting                 128K                               128K                             
write actions                      535                                436                              
write actions/s                    53                                 43                               
throughput                         13.6 MBytes/s                      11.0 MBytes/s                    

test 5/6 results                   writes via cache + sync logging    writes via cache only            
data                               5GB                                5GB                              
sync setting                       always                             disabled                         
dd sequential                      1.1 GB/s                           1.0 GB/s
vs a similar SSD only

Code:
hostname                           video-1
pool                               av1
write loop                         10 s
remark                             2 x Z2/6 disk vdev Sandisk Extrem 960GB, no Slog

test 1/2 results                   writes via cache + sync logging    writes via cache only            
data per write                     8KB                                8KB                              
sync setting                       always                             disabled                          
compress setting                   off                                off                              
recordsize setting                 128K                               128K                              
write actions                      1056                               3660                              
write actions/s                    105                                366                              
throughput                         840 KBytes/s                       2.9 MBytes/s                      

test 3/4 results                   writes via cache + sync logging    writes via cache only            
data per commit                    256K                               256K                              
sync setting                       always                             disabled                          
compress setting                   off                                off                              
recordsize setting                 128K                               128K                              
write actions                      162                                1846                              
write actions/s                    16                                 184                              
throughput                         4.1 MBytes/s                       47.1 MBytes/s                    

test 5/6 results                   writes via cache + sync logging    writes via cache only            
data                               5GB                                5GB                              
sync setting                       always                             disabled                          
dd sequential                      861.2 MB/s                         2.1 GB/s
 
  • Like
Reactions: Monoman and Xfinity