From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:50331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6msL-0004gD-VI for qemu-devel@nongnu.org; Thu, 22 Sep 2011 13:15:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R6msL-0002i2-3b for qemu-devel@nongnu.org; Thu, 22 Sep 2011 13:15:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9004) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6msK-0002ht-O6 for qemu-devel@nongnu.org; Thu, 22 Sep 2011 13:15:53 -0400 From: Alex Williamson Date: Thu, 22 Sep 2011 11:15:50 -0600 In-Reply-To: <4E7B6598.307@rdsoftware.de> References: <0NZZCL-1R6MRY0ITD-0002EJ@icpu820.kundenserver.de> <1316635372.4443.104.camel@bling.home> <4E7B6598.307@rdsoftware.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Message-ID: <1316711751.25092.6.camel@x201.home> Mime-Version: 1.0 Subject: Re: [Qemu-devel] Enabling Hyperthreading for Guest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Erik Rull Cc: qemu-devel@nongnu.org On Thu, 2011-09-22 at 18:43 +0200, Erik Rull wrote: > Alex Williamson wrote: > > See the extended -smp options: > > > > -smp n[,maxcpus=cpus][,cores=cores][,threads=threads][,sockets=sockets] > > set the number of CPUs to 'n' [default=1] > > maxcpus= maximum number of total cpus, including > > offline CPUs for hotplug, etc > > cores= number of CPU cores on one socket > > threads= number of threads on one CPU core > > sockets= number of discrete sockets in the system > > > > Try something like: > > > > -smp 4,cores=2,threads=2,sockets=1 > > > > Alex > > > > Great - the correct combination made it :-) > > But the SMP-Performance-Benchmark is horrible :-( > "Only" between 0.35 and 1.05 for the above combination. I'm not sure what that means... > I have the same architecture on the host (2 cores w/ ht enabled) so there > are enough real cores available for computation. > > Any idea what could slow down the performance here? Note that threads aren't real "full" cores, so you're likely going to see some scheduling mismatches between physical threads and virtual threads. One thing that often helps smp guests is to pin vCPUs to pCPUs. You can get the vCPU thread IDs from 'info cpu' in the monitor and pin each to a physical CPU with taskset. If you're using libvirt, virt-manager can configure it to do this too (as well as the cpu topology). Alex