Re: kvm very slow

Matthew Kent
2007-08-10T00:09:06Z

[-- Attachment #1: Type: text/plain, Size: 2892 bytes --]

[oops sorry. should have included the full dmesg from the bad boot and
cc'd the original poster]

On Thu, 2007-09-08 at 16:23 -0700, Matthew Kent wrote:
> On Wed, 2007-01-08 at 07:22 +0200, Ulrich Schreiner wrote:
> > hi,
> >
> > im using a 64 bit fedora7 system with a quad-core processor to host
> > multiple virtual machines.
> >
>
> literally the exact same setup here
>
> > my current kernel is:
> >
> > Linux testserver 2.6.22.1-27.fc7 #1 SMP Tue Jul 17 17:19:58 EDT 2007
> > x86_64 x86_64 x86_64 GNU/Linux
> >
> > (now there is a 2.6.22.1-33.fc7 to download, but i think it is not the
> > point here).
> >
>
> 2.6.22.1-41.fc7 x86_64 host
>
> > i installed
> >
> > kvm.x86_64: 31-1.fc8
>
> kvm-33
>
> >
> > because of a crash i reported as a bug with the older kvm module.
> >
> > this system starts a F7 image with the following command:
> >
> > /usr/bin/qemu-kvm
> > -net nic,macadr=52.54.00.12.34.57
> > -net tap,script=./ifup.py,ifname=tap0
> > -hda /var/qemu/vm_images/F7image.img
> > -boot c: -m 512 -vnc :2 -k de
> >
> > inside the image there is fedora 7, but a 32bit system.
> >
>
> almost exact same as here except using 32 bit fedora rawhide
> (development) guest running kernel 2.6.23-0.74.rc2.git1.fc8
>
> > almost everything works (reboot hangs), but the system is extremely
> > slow! the clock inside the system is extremely slow: every *virtual*
> > second in the image is about two or more seconds in the *real* world.
>
> and I'm having the exact same issue here. The hardware clock works fine
> (least from the output of /proc/driver/rtc and hwclock) but the system
> time quickly falls behind in the guest, approx 0.5 secs for every 1 real
> second.
>
> No combination of selecting different clocksources in the guest,
> disabling CONFIG_NO_HZ, etc seemed to make any difference. And the fact
> is my fc7 x86_64 install works just great so I doubt its the host.
>
> What I did notice though was ACPI wasn't being enabled by default for
> the 32bit kernel with the message
>
> ACPI: no DMI BIOS year, acpi=force is required to enable ACPI
>
> and that the acpi_pm clocksource the x86_64 guest picked by default,
> which worked fine, was missing. eg:
>
> 2.6.23-0.74.rc2.git1.fc8 i686 default boot:
>
> /sys/devices/system/clocksource/clocksource0/available_clocksource
> pit jiffies tsc
> /sys/devices/system/clocksource/clocksource0/current_clocksource
> pit
>
> 2.6.23-0.74.rc2.git1.fc8 i686 with acpi=force:
>
> /sys/devices/system/clocksource/clocksource0/available_clocksource
> tsc acpi_pm pit jiffies
> /sys/devices/system/clocksource/clocksource0/current_clocksource
> tsc
>
> and now everything seems great, hardware and system time seem 1:1
> again.
>
> Attached is a diff of the dmesg from each boot.
>
> As to why this is...
--
Matthew Kent <mkent-rTVjrLRGJfNWk0Htik3J/w@public.gmane.org>
http://magoazul.com

[-- Attachment #2: dmesg.f7_32bit_default --]
[-- Type: text/plain, Size: 11434 bytes --]

Linux version 2.6.23-0.74.rc2.git1.fc8 (kojibuilder-fbpyxXtnJUxHcw7WmXvZTaw4yJhunYrG28t4la5Gatg@public.gmane.org) (gcc version 4.1.2 20070723 (Red Hat 4.1.2-17)) #1 SMP Tue Aug 7 19:21:07 EDT 2007
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000e8000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 000000001fff0000 (usable)
BIOS-e820: 000000001fff0000 - 0000000020000000 (ACPI data)
BIOS-e820: 00000000fffc0000 - 0000000100000000 (reserved)
0MB HIGHMEM available.
511MB LOWMEM available.
Using x86 segment limits to approximate NX protection
Entering add_active_range(0, 0, 131056) 0 entries of 256 used
Zone PFN ranges:
DMA 0 -> 4096
Normal 4096 -> 131056
HighMem 131056 -> 131056
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0 -> 131056
On node 0 totalpages: 131056
DMA zone: 56 pages used for memmap
DMA zone: 0 pages reserved
DMA zone: 4040 pages, LIFO batch:0
Normal zone: 1735 pages used for memmap
Normal zone: 125225 pages, LIFO batch:31
HighMem zone: 0 pages used for memmap
Movable zone: 0 pages used for memmap
DMI not present or invalid.
Using APIC driver default
ACPI: RSDP 000FA670, 0014 (r0 QEMU )
ACPI: RSDT 1FFF0000, 002C (r1 QEMU QEMURSDT 1 QEMU 1)
ACPI: FACP 1FFF002C, 0074 (r1 QEMU QEMUFACP 1 QEMU 1)
ACPI: DSDT 1FFF0100, 0832 (r1 BXPC BXDSDT 1 INTL 20060912)
ACPI: FACS 1FFF00C0, 0040
ACPI: APIC 1FFF0938, 0040 (r1 QEMU QEMUAPIC 1 QEMU 1)
ACPI: no DMI BIOS year, acpi=force is required to enable ACPI
ACPI: Disabling ACPI support
Allocating PCI resources starting at 30000000 (gap: 20000000:dffc0000)
swsusp: Registered nosave memory region: 000000000009f000 - 00000000000a0000
swsusp: Registered nosave memory region: 00000000000a0000 - 00000000000e8000
swsusp: Registered nosave memory region: 00000000000e8000 - 0000000000100000
Built 1 zonelists in Zone order. Total pages: 129265
Kernel command line: ro root=/dev/VolGroup00/LogVol00 console=tty0 console=ttyS0 debug
Found and enabled local APIC!
mapped APIC to ffffb000 (fee00000)
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
CPU 0 irqstacks, hard=c0817000 soft=c07f7000
PID hash table entries: 2048 (order: 11, 8192 bytes)
Detected 2400.636 MHz processor.
Console: colour VGA+ 80x25
console [tty0] enabled
console [ttyS0] enabled
Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
... MAX_LOCKDEP_SUBCLASSES: 8
... MAX_LOCK_DEPTH: 30
... MAX_LOCKDEP_KEYS: 2048
... CLASSHASH_SIZE: 1024
... MAX_LOCKDEP_ENTRIES: 8192
... MAX_LOCKDEP_CHAINS: 16384
... CHAINHASH_SIZE: 8192
memory used by lock dependency info: 1024 kB
per task-struct memory footprint: 1680 bytes
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 504980k/524224k available (2241k kernel code, 18676k reserved, 1216k data, 568k init, 0k highmem)
virtual kernel memory layout:
fixmap : 0xffc53000 - 0xfffff000 (3760 kB)
pkmap : 0xff800000 - 0xffc00000 (4096 kB)
vmalloc : 0xe0800000 - 0xff7fe000 ( 495 MB)
lowmem : 0xc0000000 - 0xdfff0000 ( 511 MB)
.init : 0xc0766000 - 0xc07f4000 ( 568 kB)
.data : 0xc063074d - 0xc0760a44 (1216 kB)
.text : 0xc0400000 - 0xc063074d (2241 kB)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
SLUB: Genslabs=22, HWalign=64, Order=0-1, MinObjects=4, CPUs=1, Nodes=1
Calibrating delay using timer specific routine.. 9619.97 BogoMIPS (lpj=4809986)
Security Framework v1.0.0 initialized
SELinux: Initializing.
SELinux: Starting in permissive mode
selinux_register_security: Registering secondary module capability
Capability LSM initialized as secondary
Mount-cache hash table entries: 512
CPU: After generic identify, caps: 078bfbfd 2191abfd 00000000 00000000 00000001 00000000 00000000 00000000
CPU: L1 I cache: 8K
CPU: L2 cache: 128K
CPU: After all inits, caps: 078bf3fd 2191abfd 00000000 00000040 00000001 00000000 00000000 00000000
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
Compat vDSO mapped to ffffe000.
Checking 'hlt' instruction... OK.
SMP alternatives: switching to UP code
Freeing SMP alternatives: 12k freed
CPU0: Intel QEMU Virtual CPU version 0.9.0 stepping 03
SMP motherboard not detected.
Brought up 1 CPUs
sizeof(vma)=84 bytes
sizeof(page)=56 bytes
sizeof(inode)=604 bytes
sizeof(dentry)=160 bytes
sizeof(ext3inode)=856 bytes
sizeof(buffer_head)=56 bytes
sizeof(skbuff)=180 bytes
sizeof(task_struct)=3376 bytes
khelper used greatest stack depth: 3160 bytes left
Booting paravirtualized kernel on bare hardware
khelper used greatest stack depth: 3084 bytes left
Time: 22:48:42 Date: 07/09/107
NET: Registered protocol family 16
PCI: PCI BIOS revision 2.10 entry at 0xfa130, last bus=0
PCI: Using configuration type 1
Setting up standard PCI resources
khelper used greatest stack depth: 2928 bytes left
ACPI: Interpreter disabled.
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI: disabled
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
* Found PM-Timer Bug on the chipset. Due to workarounds for a bug,
* this clock source is slow. Consider trying other clock sources
PCI quirk: region b000-b03f claimed by PIIX4 ACPI
PCI quirk: region b100-b10f claimed by PIIX4 SMB
PCI: Using IRQ router PIIX/ICH [8086/7000] at 0000:00:01.0
NetLabel: Initializing
NetLabel: domain hash size = 128
NetLabel: protocols = UNLABELED CIPSOv4
NetLabel: unlabeled traffic allowed by default
Time: tsc clocksource has been installed.
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 7, 655360 bytes)
TCP bind hash table entries: 16384 (order: 7, 589824 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
checking if image is initramfs... it is
Freeing initrd memory: 3801k freed
apm: BIOS version 1.2 Flags 0x03 (Driver version 1.16ac)
audit: initializing netlink socket (disabled)
audit(1186699721.596:1): initialized
Total HugeTLB memory allocated, 0
khelper used greatest stack depth: 2888 bytes left
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
SELinux: Registering netfilter hooks
ksign: Installing public key data
Loading keyring
- Added public key 5890683852E154E7
- User ID: Red Hat, Inc. (Kernel Module GPG key)
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Limiting direct PCI/PCI transfers.
PCI: PIIX3: Enabling Passive Release on 0000:00:01.0
Activating ISA DMA hang workarounds.
Boot video device is 0000:00:02.0
pci_hotplug: PCI Hot Plug PCI Core version: 0.5
khelper used greatest stack depth: 2860 bytes left
isapnp: Scanning for PnP cards...
isapnp: No Plug & Play device found
Generic RTC Driver v1.07
Non-volatile memory driver v1.2
Linux agpgart interface v0.102
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16450
RAMDISK driver initialized: 16 RAM disks of 16384K size 4096 blocksize
input: Macintosh mouse button emulation as /class/input/input0
PNP: No PS/2 controller found. Probing ports directly.
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
mice: PS/2 mouse device common for all mice
input: AT Translated Set 2 keyboard as /class/input/input1
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
TCP cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 17
Using IPI No-Shortcut mode
Magic number: 3:809:855
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
Freeing unused kernel memory: 568k freed
Write protecting the kernel read-only data: 916k
Clocksource tsc unstable (delta = 542506452 ns)
Time: pit clocksource has been installed.
USB Universal Host Controller Interface driver v3.0
insmod used greatest stack depth: 2492 bytes left
ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver
insmod used greatest stack depth: 2400 bytes left
input: ImExPS/2 Generic Explorer Mouse as /class/input/input2
SCSI subsystem initialized
libata version 2.21 loaded.
ata_piix 0000:00:01.1: version 2.11
PCI: Setting latency timer of device 0000:00:01.1 to 64
scsi0 : ata_piix
scsi1 : ata_piix
ata1: PATA max MWDMA2 cmd 0x000101f0 ctl 0x000103f6 bmdma 0x0001c000 irq 14
ata2: PATA max MWDMA2 cmd 0x00010170 ctl 0x00010376 bmdma 0x0001c008 irq 15
ata1.00: ATA-7: QEMU HARDDISK, 0.9.0, max UDMA/100
ata1.00: 20971520 sectors, multi 16: LBA48
ata1.00: configured for MWDMA2
ata2.00: ATAPI: QEMU CD-ROM, 0.9.0, max UDMA/100
ata2.00: configured for MWDMA2
scsi 0:0:0:0: Direct-Access ATA QEMU HARDDISK 0.9. PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 20971520 512-byte hardware sectors (10737 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
sd 0:0:0:0: [sda] 20971520 512-byte hardware sectors (10737 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
sda: sda1 sda2
sd 0:0:0:0: [sda] Attached SCSI disk
scsi 1:0:0:0: CD-ROM QEMU QEMU CD-ROM 0.9. PQ: 0 ANSI: 5
insmod used greatest stack depth: 876 bytes left
device-mapper: ioctl: 4.11.0-ioctl (2006-10-12) initialised: dm-devel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
EXT3-fs: INFO: recovery required on readonly filesystem.
EXT3-fs: write access will be enabled during recovery.
kjournald starting. Commit interval 5 seconds
EXT3-fs: dm-0: orphan cleanup on readonly fs
ext3_orphan_cleanup: deleting unreferenced inode 2254377
EXT3-fs: dm-0: 1 orphan inode deleted
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
SELinux: Disabled at runtime.
SELinux: Unregistering netfilter hooks
audit(1186699726.899:2): selinux=0 auid=4294967295
sd 0:0:0:0: Attached scsi generic sg0 type 0
scsi 1:0:0:0: Attached scsi generic sg1 type 5
sr0: scsi3-mmc drive: 4x/4x xa/form2 tray
Uniform CD-ROM driver Revision: 3.20
sr 1:0:0:0: Attached scsi CD-ROM sr0
ne2k-pci.c:v1.03 9/22/2003 D. Becker/P. Gortmaker
PCI: setting IRQ 11 as level-triggered
PCI: Found IRQ 11 for device 0000:00:03.0
eth0: RealTek RTL-8029 found at 0xc100, IRQ 11, 52:54:00:12:34:56.
piix4_smbus 0000:00:01.3: Found 0000:00:01.3 device
FDC 0 is a S82078B
device-mapper: multipath: version 1.0.5 loaded
EXT3 FS on dm-0, internal journal
kjournald starting. Commit interval 5 seconds
EXT3 FS on sda1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
Adding 1048568k swap on /dev/VolGroup00/LogVol01. Priority:-1 extents:1 across:1048568k

[-- Attachment #3: Type: text/plain, Size: 315 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

[-- Attachment #4: Type: text/plain, Size: 186 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org