From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Hetze Subject: Strange CPU usage pattern in SMP guest Date: Sun, 21 Mar 2010 01:13:04 +0100 Message-ID: <20100321001304.B8EAF30301DA@mail.linux-ag.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE To: kvm@vger.kernel.org Return-path: Received: from ironport.linux-ag.com ([62.245.157.240]:4054 "EHLO ironport.linux-ag.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752806Ab0CUAXM (ORCPT ); Sat, 20 Mar 2010 20:23:12 -0400 Received: from localhost (mail.linux-ag.de [62.245.157.206]) by mail.linux-ag.de (Postfix) with ESMTP id B8EAF30301DA for ; Sun, 21 Mar 2010 01:13:04 +0100 (CET) Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: Hi *, in an 6 CPU SMP guest running on an host with 2 quad core Intel Xeon E5520 with hyperthrading enabled we see one or more guest CPUs working in a very strange pattern. It looks like all or nothing. We can easily identify the effected CPU with xosview. Here is the mpstat output compared to one regular working CPU: mpstat -P 4 1 Linux 2.6.31-16-generic-pae (guest) 21.03.2010 _i686_ (6 CPU) 00:45:19 CPU %usr %nice %sys %iowait %irq %soft %stea= l %guest %idle 00:45:20 4 0,00 100,00 0,00 0,00 0,00 0,00 0,0= 0 0,00 0,00 00:45:21 4 0,00 100,00 0,00 0,00 0,00 0,00 0,0= 0 0,00 0,00 00:45:22 4 0,00 100,00 0,00 0,00 0,00 0,00 0,0= 0 0,00 0,00 00:45:23 4 0,00 100,00 0,00 0,00 0,00 0,00 0,0= 0 0,00 0,00 00:45:24 4 0,00 66,67 0,00 0,00 0,00 33,33 0,0= 0 0,00 0,00 00:45:25 4 0,00 100,00 0,00 0,00 0,00 0,00 0,0= 0 0,00 0,00 00:45:26 4 0,00 100,00 0,00 0,00 0,00 0,00 0,0= 0 0,00 0,00 00:45:27 4 0,00 100,00 0,00 0,00 0,00 0,00 0,0= 0 0,00 0,00 00:45:28 4 0,00 100,00 0,00 0,00 0,00 0,00 0,0= 0 0,00 0,00 00:45:29 4 0,00 100,00 0,00 0,00 0,00 0,00 0,0= 0 0,00 0,00 00:45:30 4 0,00 0,00 50,00 0,00 0,00 0,00 0,0= 0 0,00 50,00 00:45:31 4 0,00 0,00 0,00 0,00 0,00 0,00 0,0= 0 0,00 100,00 00:45:32 4 0,00 0,00 0,00 0,00 0,00 0,00 0,0= 0 0,00 100,00 00:45:33 4 0,00 0,00 0,00 0,00 0,00 0,00 0,0= 0 0,00 100,00 00:45:34 4 0,00 0,00 25,00 25,00 0,00 25,00 0,0= 0 0,00 25,00 00:45:35 4 0,00 0,00 0,00 50,00 0,00 0,00 0,0= 0 0,00 50,00 00:45:36 4 0,00 0,00 50,00 0,00 0,00 0,00 0,0= 0 0,00 50,00 00:45:37 4 0,00 0,00 0,00 66,67 0,00 0,00 0,0= 0 0,00 33,33 00:45:38 4 0,00 0,00 0,00 0,00 0,00 50,00 0,0= 0 0,00 50,00 00:45:39 4 0,00 0,00 0,00 0,00 0,00 0,00 0,0= 0 0,00 100,00 00:45:40 4 0,00 0,00 0,00 50,00 0,00 25,00 0,0= 0 0,00 25,00 00:45:41 4 0,00 0,00 50,00 0,00 0,00 50,00 0,0= 0 0,00 0,00 00:45:42 4 0,00 33,33 0,00 0,00 0,00 0,00 0,0= 0 0,00 66,67 00:45:43 4 33,33 0,00 33,33 0,00 0,00 33,33 0,0= 0 0,00 0,00 00:45:44 4 0,00 0,00 0,00 33,33 0,00 33,33 0,0= 0 0,00 33,33 00:45:45 4 0,00 0,00 0,00 100,00 0,00 0,00 0,0= 0 0,00 0,00 mpstat -P 5 1 Linux 2.6.31-16-generic-pae (guest) 21.03.2010 _i686_ (6 CPU) 00:46:05 CPU %usr %nice %sys %iowait %irq %soft %stea= l %guest %idle 00:46:06 5 0,00 50,51 4,04 10,10 1,01 4,04 0,0= 0 0,00 30,30 00:46:07 5 0,92 1,83 0,92 55,05 0,00 1,83 0,0= 0 0,00 39,45 00:46:08 5 0,00 0,96 3,85 64,42 0,00 1,92 0,0= 0 0,00 28,85 00:46:09 5 1,71 1,71 7,69 61,54 0,85 7,69 0,0= 0 0,00 18,80 00:46:10 5 1,71 1,71 5,13 64,10 0,85 9,40 0,0= 0 0,00 17,09 00:46:12 5 0,85 50,00 25,42 6,78 0,00 5,08 0,0= 0 0,00 11,86 00:46:13 5 0,00 28,70 3,48 21,74 0,00 5,22 0,0= 0 0,00 40,87 00:46:14 5 0,00 3,45 15,52 18,10 0,86 14,66 0,0= 0 0,00 47,41 00:46:15 5 0,98 0,00 3,92 87,25 0,00 3,92 0,0= 0 0,00 3,92 00:46:16 5 1,72 0,00 4,31 17,24 0,00 9,48 0,0= 0 0,00 67,24 00:46:17 5 0,85 0,00 3,42 12,82 0,85 27,35 0,0= 0 0,00 54,70 00:46:18 5 0,00 0,86 7,76 12,93 0,00 27,59 0,0= 0 0,00 50,86 00:46:20 5 0,00 0,00 6,90 36,21 0,00 6,03 0,0= 0 0,00 50,86 00:46:21 5 0,86 0,86 5,17 22,41 0,00 35,34 0,0= 0 0,00 35,34 00:46:22 5 0,00 0,85 9,40 18,80 0,00 23,93 0,0= 0 0,00 47,01 00:46:23 5 0,00 4,04 11,11 9,09 1,01 20,20 0,0= 0 0,00 54,55 00:46:24 5 0,00 5,00 11,00 10,00 0,00 29,00 0,0= 0 0,00 45,00 00:46:25 5 1,00 9,00 10,00 3,00 0,00 28,00 0,0= 0 0,00 49,00 00:46:26 5 0,00 1,00 9,00 13,00 1,00 26,00 0,0= 0 0,00 50,00 00:46:27 5 3,00 4,00 12,00 20,00 0,00 25,00 0,0= 0 0,00 36,00 00:46:28 5 0,00 0,00 8,08 16,16 0,00 8,08 0,0= 0 0,00 67,68 00:46:29 5 0,98 0,98 3,92 4,90 0,00 5,88 0,0= 0 0,00 83,33 00:46:30 5 1,01 2,02 8,08 24,24 0,00 7,07 0,0= 0 0,00 57,58 00:46:31 5 0,00 0,00 7,00 4,00 1,00 20,00 0,0= 0 0,00 68,00 00:46:32 5 1,01 1,01 11,11 14,14 0,00 15,15 0,0= 0 0,00 57,58 00:46:33 5 0,99 2,97 9,90 32,67 0,99 9,90 0,0= 0 0,00 42,57 In CPU4, all values are simple fractions while CPU5 shows what I would expect as an real live workload. Any idea whats happening here? The host CPUs do not show any such pattern. Best regards, Sebastian --=20 Sebastian Hetze Mitglied des Vorstands Linux Information Systems AG Bundesallee 93, D-12161 Berlin =46on: +49 30 726238-0, Fax: +49 30 726238-99 s.hetze@linux-ag.com, http://www.linux-ag.com ---------------------------------------------------------- Sitz der Gesellschaft: Putzbrunner Str. 71, 81739 M=FCnchen Amtsgericht M=FCnchen: HRB 128 019 Vorstand: Rudolf Strobl, Sebastian Hetze Aufsichtsrat: Michael Tarabochia (Vorsitzender)