<div dir="ltr">On 21 September 2012 21:58, Henrik Ahlgren <span dir="ltr"><<a href="mailto:pablo@seestieto.com" target="_blank">pablo@seestieto.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On Fri, Sep 21, 2012 at 09:22:24PM +1000, Amos Shapira wrote:<br>
</div><div class="im">> 2. Maintenance - if I get to share the common disk image among all of them<br>
> then I only need to install/update it once instead of once for each KVM<br>
> guest (we already use Puppet but it doesn't mean it comes for free).<br>
<br>
</div>How do you plan on upgrading the read-only VMs after the initial<br>
installation, or are they short-lived and frequently recreated from<br>
scratch using a fresh image? Read-only, shared /usr between machines<br>
is a nice idea in theory, but at least the modern linux distros'<br>
package management tend not to support it that well in practice.<br></blockquote><div><br>The KVM agents host Atlassian Bamboo build agents (<a href="http://www.atlassian.com/software/bamboo/overview">http://www.atlassian.com/software/bamboo/overview</a>).<br>

I want them to run continuously and be ready to be used for builds but:<br>1. I can take them down for maintenance any time between builds.<br>2. They are disposable (i.e. loosing them for disk crash is NOT a catastrophe), so I want maximum speed even on expense of less (or actually no) redundancy.<br>

<br>The only way to update their software that I could think of so far is to rebuild the base image on the KVM host and reboot the KVM guests from the new image next time they become idle.<br><br>Have you got other ideas?<br>

 </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
IMHO using a QCOW2 backing files as base templates works pretty well<br>
and gives you similar disk space savings, at least initially. And<br>
KSM does the same with RAM.<br>
</blockquote></div><br>Thanks for the suggestion.<br><br>I am not interested in saving disk space, I have enough of it. The main motivation for this exercise the potential speed-up from having some disk blocks read once then shared by all the KVM agents in memory.<br>

<br>About KSM - my understanding is that it doesn't come free (the KVM's have to madvise(2) about candidate memory pages, and the kernel still has to scan the memory to find them) and I assume that I can remove the need for KSM since I can already tell that the disk images are identical, so why let the kernel try to find the identical pages?<br clear="all">

<br>Cheers,<br><br>--Amos<br>-- <br><div dir="ltr">
            <a href="http://www.linkedin.com/in/gliderflyer" target="_blank">
            <span>
      
          <img src="http://s4.licdn.com/scds/common/u/img/webpromo/btn_viewmy_160x25.png" alt="View my profile on LinkedIn" height="25" width="160">
        
    </span></a></div><br>
</div>