Skip to content

Commit a1da6f6

Browse files
author
Ahmet Inan
committed
added sequential writes
1 parent 05d9d73 commit a1da6f6

File tree

5 files changed

+29
-8
lines changed

5 files changed

+29
-8
lines changed

README.md

+11-8
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ Usage of ./smr:
3838
total bytes to write (default 1048576)
3939
```
4040

41-
Here the very noisy log visualized:
42-
43-
```
44-
# gnuplot noisy.txt
45-
```
41+
Here the very noisy log made with synchronized writes at random positions:
4642
![1MiB log](1MiB.png)
4743

4844
Noticed the downward spikes right from the beginning?
@@ -63,11 +59,18 @@ Seems that the cache works in groups of 240 transactions and needs to update a r
6359
Using exponential moving average to smooth out a little:
6460
(FYI: EMA filtering causes nonlinear phase delays.)
6561

66-
```
67-
# gnuplot ema.txt
68-
```
6962
![smoothed out](ema.png)
7063

7164
One thing can be seen immediately from the diagrams above:
7265
The size of the persistent cache used for the device management of the HDD must be around 32GiB.
66+
So we could write to the drive at random positions using small chunks up to a few GiB and then should leave it alone for some time for it to merge the writes.
67+
68+
Doing sequential writes, as long as they are not synchronized at each write, leads to more sustained performance:
69+
![seq async 1MiB log](seq_async.png)
70+
71+
If you need to know that your data has made to persistent storage by using ```-sync```, you have to take a performance hit:
72+
![seq sync 1MiB log](seq_sync.png)
73+
74+
Using exponential moving average to smooth out a little:
75+
![smoothed out](seq_ema.png)
7376

seq.txt

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
set term png
2+
set xlabel "GiB written"
3+
set ylabel "MiB/s"
4+
set yrange[0:]
5+
6+
async = 0
7+
sync = 0
8+
set output "seq_ema.png"
9+
plot \
10+
"seq_async_1MiB.log" u ($3/1073741824):(async=0.99*async+0.01*$4, async/1048576) w l t "sequential unsynced 1 MiB chunks",\
11+
"seq_sync_1MiB.log" u ($3/1073741824):(sync=0.99*sync+0.01*$4, sync/1048576) w l t "sequential synced 1 MiB chunks"
12+
13+
set output "seq_async.png"
14+
plot "seq_async_1MiB.log" u ($3/1073741824):($4/1048576) w l t "sequential unsynced 1 MiB chunks"
15+
16+
set output "seq_sync.png"
17+
plot "seq_sync_1MiB.log" u ($3/1073741824):($4/1048576) w l t "sequential synced 1 MiB chunks"
18+

seq_async.png

6.97 KB
Loading

seq_ema.png

5.75 KB
Loading

seq_sync.png

5.55 KB
Loading

0 commit comments

Comments
 (0)