Hi all.
Our vm created by qemu is often stuck for one or two seconds.The following is our configuration.
Qemu:
QEMU emulator version 2.0.0 (Debian 2.0.0+dfsg-2ubuntu1.1), Copyright (c) 2003-2008 Fabrice Bellar
Hypervisor System: Ubuntu-14.04-server
VM System: Centos6.5-x86_64
VM Config: 8VCPU,24G RAM MEMORY
We have a busy java process named BusyA in the VM.The BusyA process consume %200 CPU about every 10 seconds.
And the BusyA process has 200 threads.
We pin all the busy threads to core 4-7 by the command taskset -p 0xf0 thread_id .in all the busy threads to core 4-7 by the command taskset -p 0xf0 thread_id .
We write a very simple script to test if stucked.
script:
#!/usr/bin/env bash
i=0
while read input
do
i=`expr $i + 1`
echo $i
done
We call this bash_test process and pin it to cpu0 with command "taskset -p 0x01 bash_test_pid"
So we start test by press Enter key.
When the bash_test process is stucked,we get the following monitor info from top.
Tasks: 291 total, 12 running, 279 sleeping, 0 stopped, 0 zombie
Cpu0 : 4.9%us, 9.8%sy, 0.0%ni, 83.2%id, 0.0%wa, 0.0%hi, 2.1%si,
Cpu1 : 10.9%us, 8.8%sy, 0.0%ni, 78.2%id, 0.0%wa, 0.0%hi, 2.1%si,
Cpu2 : 6.9%us, 46.6%sy, 0.0%ni, 35.1%id, 11.3%wa, 0.0%hi, 0.2%si,
Cpu3 : 3.0%us, 0.8%sy, 0.0%ni, 91.5%id, 4.6%wa, 0.0%hi, 0.0%si,
Cpu4 : 17.1%us, 3.2%sy, 0.0%ni, 78.8%id, 0.0%wa, 0.0%hi, 0.9%si,
Cpu5 : 21.4%us, 0.5%sy, 0.0%ni, 77.0%id, 0.0%wa, 0.0%hi, 1.1%si,
Cpu6 : 12.9%us, 1.0%sy, 0.0%ni, 86.1%id, 0.0%wa, 0.0%hi, 0.0%si,
Cpu7 : 17.1%us, 2.3%sy, 0.0%ni, 79.6%id, 0.0%wa, 0.0%hi, 0.9%si,
Mem: 24024140k total, 6104132k used, 17920008k free, 117012k buffer
Swap: 2064376k total, 0k used, 2064376k free, 636348k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2508 root 20 0 9868m 1.4g 99m S 201.3 6.0 59:26.00 java
My conclusion is that:
the bash_test process will be stucked when the %xxsy is high even if the cpu0 is idle.
Is there some way to adjust the qemu or to debug qemu ?
If this is not the right mail list to ask this question,please tell me .
Best Regards!
Yuchang