From 7754325932885dea532da94fe08bd5c57feeb6a7 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 28 Oct 2019 14:31:03 +0100 Subject: [PATCH] 4300: Polish slide by changing
 to .

---
 2019-kvm-forum/4300-block-status-impact.html | 65 ++++++++++++++++++++--------
 2019-kvm-forum/notes-04-fast-zero            | 17 ++++----
 2 files changed, 54 insertions(+), 28 deletions(-)

diff --git a/2019-kvm-forum/4300-block-status-impact.html b/2019-kvm-forum/4300-block-status-impact.html
index 948e973..7d8d764 100644
--- a/2019-kvm-forum/4300-block-status-impact.html
+++ b/2019-kvm-forum/4300-block-status-impact.html
@@ -5,23 +5,50 @@
 

Block status: does it change the status quo?

- Filler text - need a graphic here showing multiple combinations: - -
[WZ] = WRITE_ZEROES -
[BS] = BLOCK_STATUS - -

-                  O(1) server             O(n) server
-pre-patch         [WZ]                    [WZ...........]
-
-status sees zero  [BS]                    [BS]
-                  (no improvement)        (noticeably faster)
-
-status sees data  [BS][WZ]                [BS][WZ...........]
-		  (noticeably slower)     (marginally slower)
-
-status is slow    [BS............]        [BS............]
-                  (noticeably slower)     (noticeably slower)
-
- + Checking whether a block is already zero will eliminate the need to + write zeroes to that block, but at what cost? + +

+ block status reports hole + block status reports data + write zeroes + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
O(1) serverO(n) server
no block status  
block status sees zero  
block status sees data  +    +  
block status is slow  +    +  
+ +

+ If checking once per block is bad, can we instead check once per + image? +

Or why even check - what if we ensure the image starts + with all zeroes?

diff --git a/2019-kvm-forum/notes-04-fast-zero b/2019-kvm-forum/notes-04-fast-zero index 19622d0..c818417 100644 --- a/2019-kvm-forum/notes-04-fast-zero +++ b/2019-kvm-forum/notes-04-fast-zero @@ -53,15 +53,14 @@ didn't really help, for a couple of reasons. If writing zeroes is fast, checking the destination first is either a mere tradeoff in commands (BLOCK_STATUS replacing WRITE_ZEROES when the destination is already zero) or a pessimization (BLOCK_STATUS still has to be -followed by WRITE_ZEROES). And if writing zeroes is slow, we have a -speedup holes when BLOCK_STATUS itself is fast on pre-existing -destination holes, but we encountered situations such as tmpfs that -has a linear rather than constant-time lseek(SEEK_HOLE) -implementation, where we ended up with quadratic behavior all due to -BLOCK_STATUS calls. Thus, for now, qemu-img convert does not use -BLOCK_STATUS, and as mentioned earlier, I used the noextents filter in -my test case to ensure BLOCK_STATUS is not interfering with timing -results. +followed by WRITE_ZEROES). Conversely, if writing zeroes is slow, the +penalty of the extra check when the destination is not a hole could be +in the noise, but whether or not we have a definite speedup for +avoiding WRITE_ZEROES depends on whether BLOCK_STATUS itself is fast - +yet we encountered situations such as tmpfs that has a linear rather +than constant-time lseek(SEEK_HOLE) implementation, where we ended up +with quadratic behavior all due to BLOCK_STATUS calls. Thus, for now, +qemu-img convert does not use BLOCK_STATUS. * Heading: Pre-zeroing: a tale of two servers - 4400- .term -- 1.8.3.1