3

Just started using kvm (qemu? I'm quite fuzzy with the terminology).

To test if everything works fine, I created logical volume on my lvm, and then started virtual machine using:

qemu-system-x86_64 -machine type=pc,accel=kvm -cpu host -hda /dev/vgroup/kvm-1 -m 1024

(of course first I did the same but with -cdrom, to install system).

It seems to be ok, but cpu intensive operations (bzip2/sha512sum) seem to be ~ 20% slower than on host system. Is that normal? Can I do/change tune anything?

Also - is there anything I should add to my qemu invocation to make it better/faster/safer?

I did find some tutorials but they are usually very basic, and don't really focus on performance/security.

user195086
  • 79
  • 1
  • 1
  • 8

1 Answers1

5
  1. start using libvirt - there's no reason to use qemu-kvm directly, when you have a good management package available
  2. start using virtio devices for disks and networking
  3. define what it is you're trying to do, and ask a question then

the benefits are very simple - libvirt generates the kvm command line for you, pushing in a large set of optimizations, usually autogenerated for your specific host properties. Try to run a VM using libvirt, and check what the command line it ran looks like.

As for virtio - that's a set of paravirtualized devices, they perform better than the default emulated devices.

dyasny
  • 18,802
  • 6
  • 49
  • 64
  • 1/2 - what are the benefits over my approach? 3 - i'm trying to learn virtual machine setup/configuration/usage. I understand that there are possibly some general rules (like: use libvirt), and I'd like to know them - so I can avoid common/trivial mistakes, but I'd also like to know (if it's known) - why is given thing better. – user195086 Dec 14 '13 at 21:39
  • the benefits are very simple - libvirt generates the kvm command line for you, pushing in a large set of optimizations, usually autogenerated for your specific host properties. Try to run a VM using libvirt, and check what the command line it ran looks like. As for virtio - that's a set of paravirtualized devices, they perform better than the default emulated devices – dyasny Dec 14 '13 at 22:23