RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 699991 - it takes around 40mins to reboot windows guest
Summary: it takes around 40mins to reboot windows guest
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Marcelo Tosatti
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-27 07:52 UTC by Suqin Huang
Modified: 2013-01-09 23:50 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-08 22:47:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
registers debug info (10.16 KB, text/plain)
2011-05-03 09:40 UTC, Suqin Huang
no flags Details

Description Suqin Huang 2011-04-27 07:52:24 UTC
Description of problem:
it takes around 40mins to reboot guest while I install win7

Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.159.el6.x86_64

How reproducible:
sometime

Steps to Reproduce:
1.
cmd:
I can reproduce when install win7.64 in Intel Q9550

1. cmd (blk:ide, nic:rtl8139)
qemu-kvm -drive
file=/usr/images/win7-64.qcow2,index=0,if=none,id=drive-ide0-0-0,media=disk,cache=none,format=qcow2,aio=native
\
-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
-device
rtl8139,netdev=idCTN3Lp,mac=9a:db:bf:5d:7a:58,id=ndev00idCTN3Lp,bus=pci.0,addr=0x3
-netdev tap,id=idCTN3Lp,script=/usr/kvm/scripts/qemu-ifup-switch,downscript=no
-m 4096 -smp 4,cores=1,threads=1,sockets=4 \
-drive
file=/usr/ISO/Windows7/en_windows_7_ultimate_with_sp1_x64_dvd_618240.iso,index=1,if=none,id=drive-ide0-0-1,media=cdrom,readonly=on,format=raw
\
-device ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 -drive
file=/usr/isos/windows/winutils.iso,index=2,if=none,id=drive-ide0-1-0,media=cdrom,readonly=on,format=raw
\
-device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -drive
file=/usr/isos/windows/virtio-win.iso,index=3,if=none,id=drive-ide0-1-1,media=cdrom,readonly=on,format=raw
-device ide-drive,bus=ide.1,unit=1,drive=drive-ide0-1-1,id=ide0-1-1 -cpu
cpu64-rhel6,+sse2,+x2apic -fda
/usr/local/staf/test/RHEV/kvm/autotest/client/tests/kvm/images/win7-64/answer.vfd
-spice port=8000,disable-ticketing -vga qxl -rtc
base=localtime,clock=host,driftfix=none -M rhel6.1.0 -boot
order=cdn,once=d,menu=off -usbdevice tablet -enable-kvm
top

2.
3.
  
Actual results:


Expected results:


Additional info:
1. guest win7.64 & win7.32

2. host

kernel: 2.6.32-131.0.7.el6.x86_64

processor : 3
vendor_id : GenuineIntel
cpu family : 6
model  : 23
model name : Intel(R) Core(TM)2 Quad CPU    Q9550  @ 2.83GHz

wp  : yes
flags  : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36
clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc
arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx smx est
tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority
bogomips : 5652.22
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual


host 2:
processor	: 1
vendor_id	: AuthenticAMD
cpu family	: 15
model		: 107
model name	: AMD Athlon(tm) Dual Core Processor 4450B
stepping	: 2

flags		: fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow rep_good extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy 3dnowprefetch lbrv
bogomips	: 2004.10
TLB size	: 1024 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 40 bits physical, 48 bits virtual
power management: ts fid vid ttp tm stc 100mhzsteps

3. top

26348 root      20   0 4878m 3.1g 1388 S  8.3 83.3   4:52.70 poll_sche qemu
26381 root      20   0 4878m 3.1g 1388 S  2.7 83.3   0:25.40 epoll_wai qemu
26364 root      20   0 4878m 3.1g 1388 D  2.0 83.3   6:01.39 sync_page qemu
26365 root      20   0 4878m 3.1g 1388 D  1.0 83.3   4:18.86 sync_page qemu
26366 root      20   0 4878m 3.1g 1388 S  0.0 83.3   2:09.33 kvm_vcpu_ qemu
26367 root      20   0 4878m 3.1g 1388 S  0.0 83.3   2:16.86 kvm_vcpu_ qemu

4. kvm_stat

kvm statistics

 efer_reload                  0       0
 exits                 52331952    4586
 fpu_reload             3057635     229
 halt_exits             1411439       0
 halt_wakeup            1213669       0
 host_state_reload     13569004     737
 hypercalls                   0       0
 insn_emulation         7274552     225
 insn_emulation_fail         96       0
 invlpg                 2372511      22
 io_exits              11578010     596
 irq_exits              2806064      64
 irq_injections         2222159     101
 irq_window              332208      18
 largepages                  14       0
 mmio_exits               63350      18
 mmu_cache_miss          141168      11
 mmu_flooded              23281       2
 mmu_pde_zapped           70098       2
 mmu_pte_updated         540302       2
 mmu_pte_write           473296       3
 mmu_recycled                 0       0

5. gdb info

gdb

(gdb) bt
#0  0x0000003293cde9a7 in ioctl () from /lib64/libc.so.6
#1  0x000000000042c294 in kvm_vm_ioctl (s=<value optimized out>, type=<value
optimized out>)
    at /usr/src/debug/qemu-kvm-0.12.1.2/kvm-all.c:888
#2  0x000000000042c575 in kvm_get_map (kvm=<value optimized out>,
phys_addr=4026531840, len=<value optimized out>,
    opaque=0x0, cb=0x42b040 <kvm_get_dirty_bitmap_cb>) at
/usr/src/debug/qemu-kvm-0.12.1.2/qemu-kvm.c:662
#3  kvm_get_dirty_pages_range (kvm=<value optimized out>, phys_addr=4026531840,
len=<value optimized out>, opaque=0x0,
    cb=0x42b040 <kvm_get_dirty_bitmap_cb>) at
/usr/src/debug/qemu-kvm-0.12.1.2/qemu-kvm.c:691
#4  0x000000000042c636 in kvm_physical_sync_dirty_bitmap (start_addr=<value
optimized out>, end_addr=<value optimized out>)
    at /usr/src/debug/qemu-kvm-0.12.1.2/qemu-kvm.c:2636
#5  0x00000000004ec315 in cpu_physical_sync_dirty_bitmap
(start_addr=4026531840, end_addr=4093640704)
    at /usr/src/debug/qemu-kvm-0.12.1.2/exec.c:2015
#6  0x000000000044aab1 in vga_sync_dirty_bitmap (opaque=0x3448d40) at
/usr/src/debug/qemu-kvm-0.12.1.2/hw/vga.c:1580
#7  vga_draw_graphic (opaque=0x3448d40) at
/usr/src/debug/qemu-kvm-0.12.1.2/hw/vga.c:1677
#8  vga_update_display (opaque=0x3448d40) at
/usr/src/debug/qemu-kvm-0.12.1.2/hw/vga.c:1938
#9  0x00000000004ca6df in qemu_spice_display_refresh (ssd=0x3446ab0) at
ui/spice-display.c:242
#10 0x000000000040c10e in dpy_refresh (opaque=0x1f74bb0) at
/usr/src/debug/qemu-kvm-0.12.1.2/console.h:268
#11 gui_update (opaque=0x1f74bb0) at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:3649
#12 0x000000000040bb70 in qemu_run_timers (timeout=1000) at
/usr/src/debug/qemu-kvm-0.12.1.2/vl.c:1221
#13 main_loop_wait (timeout=1000) at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:4464
#14 0x000000000042b52a in kvm_main_loop () at
/usr/src/debug/qemu-kvm-0.12.1.2/qemu-kvm.c:2164
#15 0x000000000040ef55 in main_loop (argc=<value optimized out>, argv=<value
optimized out>, envp=<value optimized out>)
    at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:4640
#16 main (argc=<value optimized out>, argv=<value optimized out>, envp=<value
optimized out>)
---Type <return> to continue, or q <return> to quit---
    at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:6845

Comment 2 Dor Laor 2011-04-27 09:39:54 UTC
Please add the required info from the recent rnd comments from Bug 684719

Comment 3 Suqin Huang 2011-05-03 09:40:16 UTC
Created attachment 496469 [details]
registers debug info

Comment 4 Suqin Huang 2011-05-03 09:42:57 UTC
need long time to reproduce, cont to test other guest, and test win7 with vnc

Comment 6 Marcelo Tosatti 2011-06-03 02:58:21 UTC
Suqin,

Please attempt the test with QXL disabled.

Comment 8 Suqin Huang 2011-06-16 10:27:43 UTC
1. host: 4G mem & 2 cpu

processor	: 1
vendor_id	: AuthenticAMD
cpu family	: 15
model		: 107
model name	: AMD Athlon(tm) Dual Core Processor 4450B
stepping	: 2
cpu MHz		: 1000.000
cache size	: 512 KB

flags		: fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow rep_good extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy 3dnowprefetch lbrv

2. qemu-kvm-0.12.1.2-2.160.el6.x86_64
   2.6.32-131.0.10.el6.x86_64

3. install guest with 4G mem & 2 vcpu
   vnc: need around 30mins to reboot during installation

4. install guest with 2G mem & 2 vcpu
   vnc: around 10 mins to reboot during installation
   spice: around 10 mins to reboot during installation

Comment 9 Suqin Huang 2011-06-16 11:14:57 UTC
(In reply to comment #8)
> 1. host: 4G mem & 2 cpu
> 
> processor : 1
> vendor_id : AuthenticAMD
> cpu family : 15
> model  : 107
> model name : AMD Athlon(tm) Dual Core Processor 4450B
> stepping : 2
> cpu MHz  : 1000.000
> cache size : 512 KB
> 
> flags  : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36
> clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext
> 3dnow rep_good extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy
> 3dnowprefetch lbrv
> 
> 2. qemu-kvm-0.12.1.2-2.160.el6.x86_64
>    2.6.32-131.0.10.el6.x86_64
> 
> 3. install guest with 4G mem & 2 vcpu
>    vnc: need around 30mins to reboot during installation

[root@amd-4450b-4-1 ~]# free -m
             total       used       free     shared    buffers     cached
Mem:          3708       3604        103          0          0         10
-/+ buffers/cache:       3593        115
Swap:         5759        873       4886


> 
> 4. install guest with 2G mem & 2 vcpu
>    vnc: around 10 mins to reboot during installation
>    spice: around 10 mins to reboot during installation

[root@amd-4450b-4-1 debug]# free -m
             total       used       free     shared    buffers     cached
Mem:          3708       3605        102          0          2       1258
-/+ buffers/cache:       2343       1364
Swap:         5759         20       5739

Comment 10 Marcelo Tosatti 2011-08-08 22:47:17 UTC
Suqin,

(In reply to comment #9)
> (In reply to comment #8)
> > 1. host: 4G mem & 2 cpu
> > 
> > processor : 1
> > vendor_id : AuthenticAMD
> > cpu family : 15
> > model  : 107
> > model name : AMD Athlon(tm) Dual Core Processor 4450B
> > stepping : 2
> > cpu MHz  : 1000.000
> > cache size : 512 KB
> > 
> > flags  : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36
> > clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext
> > 3dnow rep_good extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy
> > 3dnowprefetch lbrv
> > 
> > 2. qemu-kvm-0.12.1.2-2.160.el6.x86_64
> >    2.6.32-131.0.10.el6.x86_64
> > 
> > 3. install guest with 4G mem & 2 vcpu
> >    vnc: need around 30mins to reboot during installation
> 
> [root@amd-4450b-4-1 ~]# free -m
>              total       used       free     shared    buffers     cached
> Mem:          3708       3604        103          0          0         10
> -/+ buffers/cache:       3593        115
> Swap:         5759        873       4886

The host is 873MB into swap. That is why its slow.

You should decrease the guests memory to avoid swapping and
achieve decent performance.

Closing as not-a-bug.

> > 
> > 4. install guest with 2G mem & 2 vcpu
> >    vnc: around 10 mins to reboot during installation
> >    spice: around 10 mins to reboot during installation
> 
> [root@amd-4450b-4-1 debug]# free -m
>              total       used       free     shared    buffers     cached
> Mem:          3708       3605        102          0          2       1258
> -/+ buffers/cache:       2343       1364
> Swap:         5759         20       5739


Note You need to log in before you can comment on or make changes to this bug.