LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   Slow VM performance on KVM fedora 20 (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/slow-vm-performance-on-kvm-fedora-20-a-4175498697/)

pix9 03-19-2014 02:28 AM

Slow VM performance on KVM fedora 20
 
hello
Friends, I've purchased new laptop following are details of my laptop configurations.

MANUFACTURER : Acer
MODEL : Aspire E1-522-65204G50Mnkk
CPU : AMD A6-5200
RAM : 4GB
HDD : 500GB

I have installed fedora20 on this laptop, there were some bootup issues on defult install so I updated packages in it, now it is working fine, but there are problem when i try to use KVM Virtualization on it, I am trying to install fedora 20 VM(Virtual Machine) on this laptop with help of KVM but installation process is unexpectely slow and it feels like I am using a stonage machine, at some point of time I doubt if installation is progressing or it has halted, some times installer on guest vm stops responding.
Following are details of kernel and other applications which I belive are used for Virtualization.

#### how I am installing Virtual Machine
* I am installing VM with help of fedora 20 installer dvd ISO file for arch X86_64 which is kept on windows partition,

*selinux is in permissive state

* number of VCPU alloted to vm 2

* memory given to VM 1024MB

* VM hdd is qcow2 formatted image under default location of vm images under kvm

* around 90GB-100GB space available at vm installation destination

* type of installation I am trying to do fedora20 minimal

* time taken for installing fedora on vm more than 2 hrs (haven't counted exact time taken, can do so if needed)

####### kernel version
$uname -r
3.13.6-200.fc20.x86_64

#######versions of apps installed
qemu-kvm-1.6.1-3.fc20.x86_64
libvirt-daemon-1.1.3.4-1.fc20.x86_64
virt-manager-1.0.0-5.fc20.noarch

##### cpu info
$cat /proc/cpuinfo
..
..
truncated output (removed repeated information to avoind posting un necessary data)
..
..
processor : 3
vendor_id : AuthenticAMD
cpu family : 22
model : 0
model name : AMD A6-5200 APU with Radeon(TM) HD Graphics
stepping : 1
microcode : 0x700010b
cpu MHz : 800.000
cache size : 2048 KB
physical id : 0
siblings : 4
core id : 3
cpu cores : 4
apicid : 3
initial apicid : 3
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc extd_apicid aperfmperf eagerfpu pni pclmulqdq monitor ssse3 cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt topoext perfctr_nb perfctr_l2 arat xsaveopt hw_pstate proc_feedback npt lbrv svm_lock nrip_save tsc_scale flushbyasid decodeassists pausefilter pfthreshold bmi1
bogomips : 3992.70
TLB size : 1024 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management: ts ttp tm 100mhzsteps hwpstate [11]

######list of pci devices
$lspci
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 16h Processor Root Complex
00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Kabini [Radeon HD 8400]
00:01.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Device 9840
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 16h Processor Function 0
00:02.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 16h Processor Functions 5:1
00:02.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 16h Processor Functions 5:1
00:10.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI Controller (rev 01)
00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 40)
00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB OHCI Controller (rev 39)
00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller (rev 39)
00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB OHCI Controller (rev 39)
00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller (rev 39)
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 3a)
00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD] FCH Azalia Controller (rev 02)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 11)
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 16h Processor Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 16h Processor Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 16h Processor Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 16h Processor Function 3
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 16h Processor Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 16h Processor Function 5
01:00.0 Ethernet controller: Qualcomm Atheros QCA8171 Gigabit Ethernet (rev 13)
01:00.1 SD Host controller: Qualcomm Atheros Device 3010 (rev 13)
05:00.0 Network controller: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter (rev 01)


################# my questions/rerquests as follows.

1 ) I am expirencing very slow Virtual Machine performance slow like 4-5 times slow than it is working on my host system.

2) how can I solve this issue?

3) Any possible cause of the problem?

4) have anyone expirenced this before on laptop systems?

Thank You :)

jefro 03-19-2014 03:36 PM

Laptops are terrible for this sort of thing I'd think.

As I recall, kvm has a module that needs cpu support. If bios support isn't enabled or motherboard fully supported then kvm simply runs in emulated mode which sounds about right.

Second deal is hard drive maybe. Just too slow. Might use a usb 3.0 external to help solve some of the speed issues.

dyasny 03-19-2014 09:20 PM

lsmod | grep kvm
domxml output for the VM
what options are used to mount the partition the disk images are in?

pix9 03-20-2014 03:05 PM

1 Attachment(s)
@jefro I also believed that laptops are bad for running vm's until I saw my boss running 5 vms simultaneously (different HW config)on his laptop, still his laptop is 2 years old, mine is more recent once, what I am suspecting is it's firmware issue I am hoping things should work better on fedora 21 in that case. For your other point about HDD being slow I will try different ways of installation from different sources on this weekend and post here if any progress or failure whatever the results are( i am expecting least chances here because native system was working very well during installation.).

@dyasny here are out puts that you've requested
taken while vm was running (tho no OS installed on it.)
#lsmod |grep kvm
kvm 444322 0

for domxml please check the attachment fed20.xml.txt

Thank you

dyasny 03-20-2014 04:40 PM

you only have the kvm module running. you also need kvm_amd or kvm_intel for the system to actually use KVM

dyasny 03-20-2014 04:42 PM

here's some more proof from the domxml:

Quote:

<emulator>/usr/bin/qemu-system-x86_64</emulator>

allend 03-20-2014 06:48 PM

As you have an Aspire E1-522, then this may help. http://community.acer.com/t5/Noteboo...22/td-p/151267
Apparently a hack is needed to access the Advanced BIOS menus to turn on hardware virtualisation.

pix9 03-28-2014 05:33 AM

I am trying to work out the suggestion provided by allend. Will soon try to update sucess/failure what ever may the results.

thank you :)

dyasny 03-30-2014 10:22 PM

you don't have all of the kvm modules loaded, this is why you aren't using kvm and the VM is slow. try to load the modules before you start playing with firmware.

allend 03-31-2014 05:07 PM

Pray tell, how will kvm work without the processor hardware virtualisation extensions?
http://www.linux-kvm.org/page/FAQ#Wh..._to_use_KVM.3F

dyasny 03-31-2014 05:55 PM

Quote:

Originally Posted by allend (Post 5144358)
Pray tell, how will kvm work without the processor hardware virtualisation extensions?
http://www.linux-kvm.org/page/FAQ#Wh..._to_use_KVM.3F

How can it work at all, if the kernel modules aren't loaded? And yes, thanks for referencing the site I've helped edit since 2008...

allend 03-31-2014 07:27 PM

Can we agree that there are two things that are needed to solve the OP's problem?
1. The hardware needs to be set up so that the AMD processor is using the SVM extensions. Post#7 (which does require a firmware change on this hardware)
2. The kvm_amd kernel module will then need to be loaded to make use of the enabled extensions. Post#5

dyasny 03-31-2014 11:28 PM

All I am saying is first try to load that module, and only then try the more complicated solutions, according to the error message you receive. There have been bugs reported in some Debian and Ubuntu versions, where kvm_amd and kvm_intel modules were mistakenly removed from the list of modules to be loaded on boot, leaving the kvm module in there nonetheless. Running a single command to make sure this isn't it is so much simpler than hacking your BIOS for hours, risking bricking your mobo completely, just to realize the problem was never there. Always try the simple and obvious solutions first.

pix9 11-05-2014 09:30 AM

Thank you for your suggestion, Actully I've sold my old laptop and purchased new one. I tried fixing the bios setting, but since there are chances that I may brick my laptop, I decided on selling it, rather than taking risk. with my new laptop I've checked that virtualization is allowed in BIOS.

Thank you.
Regards.

dijetlo 11-10-2014 12:56 PM

The other thing...

Use something other than the installation CD to generate your image...


All times are GMT -5. The time now is 04:48 AM.