From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Baines Subject: Re: Performance issues with /gnu/store in virtual machines Date: Sun, 20 Aug 2017 11:22:09 +0100 Message-ID: <20170820112209.56847394@cbaines.net> References: <20170817210547.3fafde57@cbaines.net> <87wp5ywr1j.fsf@elephly.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/hi=v.fGDuY=fZSTRPlMWdEJ"; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46574) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djNN8-0004XM-0O for help-guix@gnu.org; Sun, 20 Aug 2017 06:22:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1djNN4-0004Jk-2B for help-guix@gnu.org; Sun, 20 Aug 2017 06:22:22 -0400 Received: from li622-129.members.linode.com ([212.71.249.129]:58943 helo=mira.cbaines.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djNN3-0004Jd-RV for help-guix@gnu.org; Sun, 20 Aug 2017 06:22:17 -0400 In-Reply-To: <87wp5ywr1j.fsf@elephly.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Ricardo Wurmus Cc: help-guix@gnu.org --Sig_/hi=v.fGDuY=fZSTRPlMWdEJ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sun, 20 Aug 2017 11:02:16 +0200 Ricardo Wurmus wrote: > Hi Chris, >=20 > > 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. =20 >=20 > (I=E2=80=99m not using VMs as KVM doesn=E2=80=99t work on my laptop.) >=20 > Have you tried specifying =E2=80=9Cvirtio=E2=80=9D drivers for the virtua= l disks? I > don=E2=80=99t think they are the default and I=E2=80=99m hopeful that wit= h 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=3D"/gnu/store",security_model=3Dnone,mount_tag=3D"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=3Dvir= tio) One thing I have just tried, is adding the cache=3Dloose 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 --Sig_/hi=v.fGDuY=fZSTRPlMWdEJ Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlmZYtFfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9Xe//Q/+P6/Ie6sbV08DoP2XWpLpQjhQ2Wx29b0Ua6GyQn9mIbHyYPuyH6CxbL/x vUkAd4WZDfWxQVO6OZ2CJeLo8uWZrDU0n2v9GPllbv7k+ssb183m4F8/r9Y6xn5v eQQGdXtlvJKABxSOgtdU33Mv6oliMz6qZalzF/7OBUUZ0YvAM9gdFvDaDAbyP2Z9 lVsJxEiv/uGCDhe0FwUN+mDX4dE3wl8C5VYbZvnZFRiwcKlUQmE4X+GhtrvnTzs3 njlGzD3x8r0D5C+Z7d+HO0yrjVx6RPpEj70VTeitIoqUHEvhkhf0s/PCm5KNh1FL em8bHNwd1wzj+F5+zveZWhr/gU8a8SpwpC0/KK32kWclxEOmSVSDMMJ90pdmAqiV Mbxpc5JaoOyG/aC/lAzXLCTuz49vsQMCYrap6UWcrIDX2CjN4AubByD7qfhYfCqo rNDfhA573hvEgPzJwI9ntd6lTSBBaKji4QDLW/PCGwbolKOmrFF2pvwzdkc40MLL NHLeOiVgvXCUDeOFnJs+OfiIZKlhxPW4Xo6zhkXQWC6rraM4s22oGEosO2UOrXvn T3eec5yJ5nD6Wdl8t17tzs+ROH/3Rsxur5OVHH7aTjYZvF+my7EwimCnyBJ266NG enYJE4RK4OJarjIqKh8sVmi5EtCB6k52iNWEt4eDmrFJFQCg+iY= =LMcG -----END PGP SIGNATURE----- --Sig_/hi=v.fGDuY=fZSTRPlMWdEJ--