[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Performance issues with /gnu/store in virtual machines
From: |
Christopher Baines |
Subject: |
Re: Performance issues with /gnu/store in virtual machines |
Date: |
Sun, 20 Aug 2017 11:22:09 +0100 |
On Sun, 20 Aug 2017 11:02:16 +0200
Ricardo Wurmus <address@hidden> wrote:
> Hi Chris,
>
> > So I was trying out using VMs created through Guix for more things,
> > particularly as they can be run as part of derivations, e.g. the
> > system tests for Guix.
> >
> > However, I'm seeing anything that does I/O performing very poorly
> > compared with the host system.
>
> (I’m not using VMs as KVM doesn’t work on my laptop.)
>
> Have you tried specifying “virtio” drivers for the virtual disks? I
> don’t think they are the default and I’m hopeful that with virtio
> drivers I/O performance will be comparable.
I think I may already be using virtio, at least that is what is
specified as the trans option for the mount in the VM? I think this is
the relevant bit from the vm start script:
-virtfs local,path="/gnu/store",security_model=none,mount_tag="TAG_gnu_store"
This is how the mount shows up in the vm:
TAG_gnu_store on /gnu/store type 9p (ro,relatime,sync,dirsync,trans=virtio)
One thing I have just tried, is adding the cache=loose option in (by
directly editing the mapping->file-system procedure in (gnu system
vm)). For my really quick test [1], this did increase the initial
runtime from ~8 to ~11 seconds, but subsequent runs were down to ~5
seconds from the original ~8.
5 seconds though, is still 16 times longer than the ~0.3 seconds this
command takes to run on the host, so it's still slow by comparison.
1: time find /gnu/store/*-guile* -name guile | wc -l
pgpnJeNEzlMqH.pgp
Description: OpenPGP digital signature