From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Fjellstrom Subject: Re: virtio disk host cpu overhead? Date: Sat, 11 Mar 2017 09:33:09 -0700 Message-ID: <2460727.SVSaYC5RoY@natasha> References: <4596416.eghLixMk0z@natasha> <20170310015207.GB3213@stefanha-x1.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: kvm@vger.kernel.org To: Stefan Hajnoczi Return-path: Received: from mail.tomasu.net ([192.241.222.217]:36004 "EHLO mail.tomasu.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932827AbdCKQdM (ORCPT ); Sat, 11 Mar 2017 11:33:12 -0500 In-Reply-To: <20170310015207.GB3213@stefanha-x1.localdomain> Sender: kvm-owner@vger.kernel.org List-ID: On Friday, March 10, 2017 9:52:07 AM MST Stefan Hajnoczi wrote: > On Fri, Mar 03, 2017 at 10:05:06AM -0700, Thomas Fjellstrom wrote: > > I've been testing a new samsung 960 evo nvme drive i just got, and running > > tests on it in a guest shows a minimum of double the cpu time on the host > > as it does on the guest. Somehow a guest running a single thread iozone > > or fio test can use 4+ cores on the host side at 50-100%. > > Are you using -drive aio=native? Yes. > Are you pinning threads on the host? No pinning by default. > If the answer to both questions is no, then QEMU uses a thread pool for > disk I/O and those threads could be scheduled on any host CPU. But should they be pegging 4 or more cores, when the host can do the same work with a single core? I don't mind it spreading work out. But using 4x the cpu time to do the same work is a bit much. > Stefan -- Thomas Fjellstrom thomas@fjellstrom.ca