[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-discuss] Understanding QEMU Cache Modes and Emulated Disk Writ
From: |
Andrew Martin |
Subject: |
Re: [Qemu-discuss] Understanding QEMU Cache Modes and Emulated Disk Write Cache |
Date: |
Wed, 17 Aug 2016 13:03:04 -0500 (CDT) |
----- Original Message -----
> From: "Jakob Bohm" <address@hidden>
> To: "Andrew Martin" <address@hidden>
> Cc: address@hidden
> Sent: Wednesday, August 17, 2016 10:32:39 AM
> Subject: Re: [Qemu-discuss] Understanding QEMU Cache Modes and Emulated Disk
> Write Cache
>
> On 17/08/2016 16:56, Andrew Martin wrote:
> >
> >
> > ----- Original Message -----
> >> From: "Jakob Bohm" <address@hidden>
> >> To: address@hidden
> >> Sent: Wednesday, August 17, 2016 9:34:32 AM
> >> Subject: Re: [Qemu-discuss] Understanding QEMU Cache Modes and Emulated
> >> Disk Write Cache
> >>
> >> On 17/08/2016 15:21, Andrew Martin wrote:
> >>> According to this page, cache=writeback enables the disk write cache:
> >>> http://www.ibm.com/support/knowledgecenter/linuxonibm/liaat/liaatbpkvmguestcache.htm
> >>>
> >>> Is this the write cache on the physical disk itself, or the write cache
> >>> on
> >>> the
> >>> qcow2 image (does the qcow2 even have a disk write cache)? Does this
> >>> cache
> >>> get
> >>> bypassed when fdatasync(2) calls come in from the guest?
> >>>
> >>> When is the guest's page cache ever used?
> >> Whenever the Guest OS feels like it, because the Guest OS doesn't (in
> >> principle) know the virtual disk is virtual.
> > Would this primarily be for reads then, since write(2) is written to the
> > host
> > page cache?
>
> The write(2) calls we are talking about are the virtual hardware disk
> writes done by the guest OS, qemu does not know or care if the Guest OS
> caches data before doing those writes.
>
> >
> > Does QEMU create an emulated disk cache for the qcow2 image, or is that
> > just
> > the host page cache?
>
> I don't know. I presume that qemu at least keeps some of the qcow2
> metadata in memory to avoid excessive host disk I/O.
>
Thanks for the clarification. One final question - how can I calculate the delay
between when the data is written and when it is flushed to permanent storage? Is
this just the period between subsequent fdatasync(2) calls when I strace the
QEMU
process?
Thanks,
Andrew
- [Qemu-discuss] Understanding QEMU Cache Modes and Emulated Disk Write Cache, Andrew Martin, 2016/08/16
- Re: [Qemu-discuss] Understanding QEMU Cache Modes and Emulated Disk Write Cache, Fam Zheng, 2016/08/17
- Re: [Qemu-discuss] Understanding QEMU Cache Modes and Emulated Disk Write Cache, Andrew Martin, 2016/08/17
- Re: [Qemu-discuss] Understanding QEMU Cache Modes and Emulated Disk Write Cache, Jakob Bohm, 2016/08/17
- Re: [Qemu-discuss] Understanding QEMU Cache Modes and Emulated Disk Write Cache, Andrew Martin, 2016/08/17
- Re: [Qemu-discuss] Understanding QEMU Cache Modes and Emulated Disk Write Cache, Jakob Bohm, 2016/08/17
- Re: [Qemu-discuss] Understanding QEMU Cache Modes and Emulated Disk Write Cache,
Andrew Martin <=
- Re: [Qemu-discuss] Understanding QEMU Cache Modes and Emulated Disk Write Cache, Narcis Garcia, 2016/08/17
- Re: [Qemu-discuss] Understanding QEMU Cache Modes and Emulated Disk Write Cache, Andrew Martin, 2016/08/17
- Re: [Qemu-discuss] Understanding QEMU Cache Modes and Emulated Disk Write Cache, Narcis Garcia, 2016/08/18
- Re: [Qemu-discuss] Understanding QEMU Cache Modes and Emulated Disk Write Cache, Andrew Martin, 2016/08/18