Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

KVM performance problems (potentially a newbie issue)

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
db_404
Guru
Guru
Posts: 336
Joined: Thu Dec 05, 2002 2:41 pm

KVM performance problems (potentially a newbie issue)

  • Quote

Post by db_404 » Sat Apr 11, 2009 5:32 pm

I'm _think_ getting some significant kvm performance issues, my 'usual' virtualization environment is Xen, but I was wanting to try out kvm for it's newer kernel support and also for greater flexibillity.

The problem is that a seemingly low cpu load (say 20%) on the kvm guest, results in much higer (150%+) cpu loads on the guest, and from a user perspective the guest just 'feels' much slower than the host even though they are both non-graphical environments (this is a small server). This seems wrong and has me wondering if I've configured something in a fundamentally incorrect way. I'm wondering if it's just falling back to quemu emulation for the CPU - but I'm not sure how to check for this

My guest os is 2.6.27-gentoo-r8, with KVM paravirt options, and using paravirt network and block drivers, the host os is 2.6.28-gentoo-r4. KVM version is kvm-84.

In terms of CPU, it's an AMD dual athlon 64, so it has svm support:

Code: Select all

$ cat /proc/cpuinfo 
processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 15
model		: 107
model name	: AMD Athlon(tm) Dual Core Processor 5050e
stepping	: 2
cpu MHz		: 2600.000
cache size	: 512 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 2
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 1
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 rdtscp lm 3dnowext 3dnow rep_good pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy 3dnowprefetch
bogomips	: 5224.31
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

processor	: 1
vendor_id	: AuthenticAMD
cpu family	: 15
model		: 107
model name	: AMD Athlon(tm) Dual Core Processor 5050e
stepping	: 2
cpu MHz		: 2600.000
cache size	: 512 KB
physical id	: 0
siblings	: 2
core id		: 1
cpu cores	: 2
apicid		: 1
initial apicid	: 1
fpu		: yes
fpu_exception	: yes
cpuid level	: 1
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 rdtscp lm 3dnowext 3dnow rep_good pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy 3dnowprefetch
bogomips	: 5211.31
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
The kvm_amd module is loaded:

Code: Select all

# lsmod
Module                  Size  Used by
bridge                 53856  0 
stp                     6724  1 bridge
llc                    10016  2 bridge,stp
tun                    15684  2 
kvm_amd                34124  2 
kvm                   144048  1 kvm_amd
I'm starting my VM with a command like (using lvm for block storage):

Code: Select all

kvm -smp 2 -m 2048 \
-net nic,model=virtio,macaddr=52:54:00:12:34:01 \
-net tap -drive index=0,file=/dev/storage1/host-boot,if=virtio,boot=on \
-drive index=1,file=/dev/storage1/host,if=virtio \
-drive index=2,file=/dev/storage1/host-swap,if=virtio \
-vnc :1
Any thoughts as to why I'm seeing issues would be greatly appreciated.
Top
redbottle
n00b
n00b
Posts: 25
Joined: Thu Mar 15, 2007 10:11 pm

  • Quote

Post by redbottle » Sat Apr 11, 2009 6:32 pm

I don't see anything wrong with your setup, but the kvm faq has an entry on how to check if you're falling back to qemu mode.
Top
bbgermany
Veteran
Veteran
User avatar
Posts: 1844
Joined: Mon Feb 21, 2005 8:19 am
Location: Oranienburg/Germany

  • Quote

Post by bbgermany » Sun Apr 12, 2009 10:14 am

Try without smp and you will see an incredible performance jump. The smp implementation of kvm seems to be a bit buggy. Search the forums and you will find some posts about the same issue.

bb
Desktop: Ryzen 7 5800X, 32GB, 2TB, RX7700XT
Noebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB
Top
db_404
Guru
Guru
Posts: 336
Joined: Thu Dec 05, 2002 2:41 pm

  • Quote

Post by db_404 » Sun Apr 12, 2009 7:21 pm

Thanks for the tip on smp, I'll give that a try, shame though, I could use the extra CPU horsepower.

I checked the qemu fallback information in the KVM faq, and I'm not falling back to quemu, so it may well be a smp issue.
Top
Post Reply

4 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic