qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/6] qcow2: Make the L2 cache cover the whole image by default
@ 2018-07-29 21:27 Leonid Bloch
  2018-07-29 21:27 ` [Qemu-devel] [PATCH 1/6 for-3.0] Update .gitignore Leonid Bloch
                   ` (7 more replies)
  0 siblings, 8 replies; 29+ messages in thread
From: Leonid Bloch @ 2018-07-29 21:27 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-block, Kevin Wolf, Max Reitz, Eric Blake, Leonid Bloch

This series makes the qcow2 L2 cache cover the entire image by default.
The importance of this change is in noticeable performance improvement,
especially with heavy random I/O. The memory overhead is very small:
only 1 MB of cache for every 8 GB of image size. On systems with very
limited RAM the maximal cache size can be limited by the existing
cache-size and l2-cache-size options.

The L2 cache is also resized accordingly, by default, if the image is
resized.

The reasons for making this behavior default, unlike in the patches I
have sent previously, are the following:
1) Unelegant complications with making an option to accept either a
   size or a string, while outputting a proper error message.
2) More bulky logic to sort out what to do if the image is being resized
   but the (defined) overall cache size is too small to contain the
   new l2-cache-size.
(Making this behavior default resolves all of these technical issues
neatly)
3) The performance gain (as measured by fio in random read/write tests)
   can be as high as 50%, or even more, so this would be a reasonable
   default behavior.
4) The memory overhead is really small for the gain, and in cases when
   memory economy is critical, the maximal cache values can always be
   set by the appropriate options.

Leonid Bloch (6):
  Update .gitignore
  qcow2: A grammar fix in conflicting cache sizing error message
  qcow2: Options' documentation fixes
  qcow2: Update total_sectors when resizing the image
  qcow2: Make the default L2 cache sufficient to cover the entire image
  qcow2: Resize the cache upon image resizing

 .gitignore                 |  1 +
 block/qcow2.c              | 20 +++++++++++++-------
 block/qcow2.h              |  4 ----
 docs/qcow2-cache.txt       | 30 +++++++++++++++++-------------
 qapi/block-core.json       |  6 +++---
 qemu-options.hx            | 15 +++++++++------
 tests/qemu-iotests/103.out |  4 ++--
 tests/qemu-iotests/137.out |  2 +-
 8 files changed, 46 insertions(+), 36 deletions(-)

-- 
2.17.1

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2018-08-06 11:41 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-29 21:27 [Qemu-devel] [PATCH 0/6] qcow2: Make the L2 cache cover the whole image by default Leonid Bloch
2018-07-29 21:27 ` [Qemu-devel] [PATCH 1/6 for-3.0] Update .gitignore Leonid Bloch
2018-07-30 15:40   ` Eric Blake
2018-07-30 15:43     ` Eric Blake
2018-07-29 21:27 ` [Qemu-devel] [PATCH 2/6 for-3.0] qcow2: A grammar fix in conflicting cache sizing error message Leonid Bloch
2018-07-29 21:27 ` [Qemu-devel] [PATCH 3/6 for-3.0] qcow2: Options' documentation fixes Leonid Bloch
2018-08-03 11:27   ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2018-08-04 11:52     ` Leonid Bloch
2018-07-29 21:27 ` [Qemu-devel] [PATCH 4/6] qcow2: Update total_sectors when resizing the image Leonid Bloch
2018-07-30  9:43   ` Kevin Wolf
2018-07-30 11:41     ` Leonid Bloch
2018-07-30 12:28       ` Kevin Wolf
2018-08-03 11:56         ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2018-07-29 21:27 ` [Qemu-devel] [PATCH 5/6] qcow2: Make the default L2 cache sufficient to cover the entire image Leonid Bloch
2018-07-29 21:27 ` [Qemu-devel] [PATCH 6/6] qcow2: Resize the cache upon image resizing Leonid Bloch
2018-08-03 12:42   ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2018-08-04 11:53     ` Leonid Bloch
2018-07-30 10:55 ` [Qemu-devel] [PATCH 0/6] qcow2: Make the L2 cache cover the whole image by default Kevin Wolf
2018-07-30 12:13   ` Leonid Bloch
2018-07-30 12:44     ` Kevin Wolf
2018-08-03 13:37   ` Alberto Garcia
2018-08-03 14:55     ` Kevin Wolf
2018-08-06  7:47       ` Alberto Garcia
2018-08-06 10:45         ` Kevin Wolf
2018-08-06 11:07           ` Alberto Garcia
2018-08-06 11:30             ` Kevin Wolf
2018-08-06 11:41               ` Alberto Garcia
2018-08-03  7:38 ` Kevin Wolf
2018-08-04 11:48   ` Leonid Bloch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).