[one-users] Setting the "SHAREABLE" attribute
Javier Fontan
jfontan at opennebula.org
Thu Jan 30 06:58:11 PST 2014
Reading that piece of code it seems I was totally wrong with that:
--8<------
if (disk->cachemode) {
// bunch of code
} else if (disk->shared && !disk->readonly) {
virBufferAddLit(&opt, ",cache=off");
}
------>8--
It should make some difference. We will take a look on the best way to
add the shareable flag and maybe others.
Cheers
On Thu, Jan 30, 2014 at 4:14 PM, Gareth Bult <gareth at linux.co.uk> wrote:
> Mmm, I can't disagree if that's what the code says .. however turning
> off the cache completely in the GUI does "seem" to make quite a *dramatic*
> difference to the VM performance, whereas setting the sharable flag seems
> to have no performance impact at all .. (when using writethrough ...) ???
>
> --
>
> Gareth Bult
> "The odds of hitting your target go up dramatically when you aim at it."
> See the status of my current project at http://vdc-store.com
>
>
> ----- Original Message -----
> From: "Javier Fontan" <jfontan at opennebula.org>
> To: "Gareth Bult" <gareth at linux.co.uk>
> Cc: "Stefan Kooman" <stefan at bit.nl>, users at lists.opennebula.org
> Sent: Thursday, 30 January, 2014 2:48:15 PM
> Subject: Re: [one-users] Setting the "SHAREABLE" attribute
>
> I'll investigate a bit more on this issue but from the qemu driver
> code it seems that cache is disabled with shareable flag.
>
> On Thu, Jan 30, 2014 at 4:07 PM, Gareth Bult <gareth at linux.co.uk> wrote:
>> Mmm, there has been some discussion around this ..
>>
>> Technically using cache=writeback "should" be safe for migration.
>> (which is the method I use)
>>
>> So .. I need "cache=writeback" and "sharable" for migration to happen.
>> (the performance hit with cache=off is an unacceptable performance hit, at least for me ..)
>>
>> From the QEMU lists, 2012;
>> "In short, if you're using a recent kernel with ext3 or ext4, cache=writeback is absolutely safe. If you're using an older version of ext3, cache=writeback is still safe but ext3 itself isn't. cache=writeback can make the situation worse."
>>
>> ...
>>
>>
>> --
>>
>> Gareth Bult
>> "The odds of hitting your target go up dramatically when you aim at it."
>> See the status of my current project at http://vdc-store.com
>>
>>
>> ----- Original Message -----
>> From: "Stefan Kooman" <stefan at bit.nl>
>> To: "Javier Fontan" <jfontan at opennebula.org>
>> Cc: "Gareth Bult" <gareth at linux.co.uk>, users at lists.opennebula.org
>> Sent: Thursday, 30 January, 2014 2:38:23 PM
>> Subject: Re: [one-users] Setting the "SHAREABLE" attribute
>>
>> Quoting Javier Fontan (jfontan at opennebula.org):
>>> I've been digging a bit more in the shareable issue and it seems that
>>> setting "shareable" to a disk just disables cache in qemu/kvm[1]:
>>>
>>> --8<------
>>> 4158 virBufferAsprintf(&opt, ",cache=%s", mode);
>>> 4159 } else if (disk->shared && !disk->readonly) {
>>> 4160 virBufferAddLit(&opt, ",cache=off");
>>> 4161 }
>>> ------>8--
>>>
>>> Isn't it enough to disable cache for disks that can be migrated?
>> Yes it is, at least in our environment (Ubuntu 13.10). Cache has to be
>> off (to avoid data loss while migrating vm).
>>
>> /etc/one/vmm_exec/vmm_exec_kvm.conf:
>>
>> DISK = [ driver = "raw" , cache = "none", io = "native"]
>>
>> Gr. Stefan
>>
>>
>> --
>> | BIT BV http://www.bit.nl/ Kamer van Koophandel 09090351
>> | GPG: 0xD14839C6 +31 318 648 688 / info at bit.nl
>
>
>
> --
> Javier Fontán Muiños
> Developer
> OpenNebula - The Open Source Toolkit for Data Center Virtualization
> www.OpenNebula.org | @OpenNebula | github.com/jfontan
--
Javier Fontán Muiños
Developer
OpenNebula - The Open Source Toolkit for Data Center Virtualization
www.OpenNebula.org | @OpenNebula | github.com/jfontan
More information about the Users
mailing list