qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] Understanding QEMU Cache Modes and Emulated Disk Writ


From: Narcis Garcia
Subject: Re: [Qemu-discuss] Understanding QEMU Cache Modes and Emulated Disk Write Cache
Date: Wed, 17 Aug 2016 20:16:19 +0200

In the host:
$ sysctl -n vm.dirty_expire_centisecs
$ sysctl -n vm.dirty_writeback_centisecs

https://www.kernel.org/doc/Documentation/sysctl/vm.txt



El 17/08/16 a les 20:03, Andrew Martin ha escrit:
> ----- 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
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]