Re: Shouldn't cache=none be the default for drives?

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

 



Am Thu, 08 Apr 2010 06:09:05 +0000 schrieb Thomas Mueller:

> Am Thu, 08 Apr 2010 10:05:09 +0400 schrieb Michael Tokarev:
> 
>> 08.04.2010 09:07, Thomas Mueller wrote: []
>>> This helped alot:
>>>
>>> I enabled "deadline" block scheduler instead of the default "cfq" on
>>> the host system. tested with: Host Debian with scheduler deadline,
>>> Guest Win2008 with Virtio and cache=none. (26MB/s to 50MB/s boost
>>> measured) Maybe this is also true for Linux/Linux.
>>>
>>> I expect that scheduler "noop" for linux guests would be good.
>> 
>> Hmm.   I wonder why it helped.  In theory, host scheduler should not
>> change anything for cache=none case, at least for raw partitions of LVM
>> volumes.  This is because with cache=none, the virtual disk image is
>> opened with O_DIRECT flag, which means all I/O bypasses host scheduler
>> and buffer cache.
>> 
>> I tried a few quick tests here, -- with LVM volumes it makes no
>> measurable difference.  But if the guest disk images are on plain files
>> (also raw), scheduler makes some difference, and indeed deadline works
>> better.  Maybe you were testing with plain files instead of block
>> devices?
> 
> ah yes, qcow2 images.

... but does the scheduler really now about O_DIRECT? isn't O_DIRECT 
meant to bypass only buffers (aka "return write not before it really hit 
the disk")? my understanding is that the scheduler is layer down the 
stack. but only guessing - i'm not a kernel hacker. :)

- Thomas  


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux