aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorLeonid Bloch <lbloch@janustech.com>2018-09-26 19:04:43 +0300
committerKevin Wolf <kwolf@redhat.com>2018-10-01 12:51:12 +0200
commitb749562d9822d14ef69c9eaa5f85903010b86c30 (patch)
treec1b104511519217d7134b190eb0f89ee498c6eab /docs
parent657ada52abb85140e56949f522ecec527b256450 (diff)
qcow2: Assign the L2 cache relatively to the image size
Sufficient L2 cache can noticeably improve the performance when using large images with frequent I/O. Previously, unless 'cache-size' was specified and was large enough, the L2 cache was set to a certain size without taking the virtual image size into account. Now, the L2 cache assignment is aware of the virtual size of the image, and will cover the entire image, unless the cache size needed for that is larger than a certain maximum. This maximum is set to 1 MB by default (enough to cover an 8 GB image with the default cluster size) but can be increased or decreased using the 'l2-cache-size' option. This option was previously documented as the *maximum* L2 cache size, and this patch makes it behave as such, instead of as a constant size. Also, the existing option 'cache-size' can limit the sum of both L2 and refcount caches, as previously. Signed-off-by: Leonid Bloch <lbloch@janustech.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/qcow2-cache.txt15
1 files changed, 10 insertions, 5 deletions
diff --git a/docs/qcow2-cache.txt b/docs/qcow2-cache.txt
index 7e28b41bd3..750447ea4f 100644
--- a/docs/qcow2-cache.txt
+++ b/docs/qcow2-cache.txt
@@ -125,8 +125,12 @@ There are a few things that need to be taken into account:
- Both caches must have a size that is a multiple of the cluster size
(or the cache entry size: see "Using smaller cache sizes" below).
- - The default L2 cache size is 8 clusters or 1MB (whichever is more),
- and the minimum is 2 clusters (or 2 cache entries, see below).
+ - The maximum L2 cache size is 1 MB by default (enough for full coverage
+ of 8 GB images, with the default cluster size). This value can be
+ modified using the "l2-cache-size" option. QEMU will not use more memory
+ than needed to hold all of the image's L2 tables, regardless of this max.
+ value. The minimal L2 cache size is 2 clusters (or 2 cache entries, see
+ below).
- The default (and minimum) refcount cache size is 4 clusters.
@@ -184,9 +188,10 @@ Some things to take into account:
always uses the cluster size as the entry size.
- If the L2 cache is big enough to hold all of the image's L2 tables
- (as explained in the "Choosing the right cache sizes" section
- earlier in this document) then none of this is necessary and you
- can omit the "l2-cache-entry-size" parameter altogether.
+ (as explained in the "Choosing the right cache sizes" and "How to
+ configure the cache sizes" sections in this document) then none of
+ this is necessary and you can omit the "l2-cache-entry-size"
+ parameter altogether.
Reducing the memory usage