Announcement

Collapse
No announcement yet.

Linux KVM Continues Offering Much Better Performance Than VirtualBox

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Linux KVM Continues Offering Much Better Performance Than VirtualBox

    Phoronix: Linux KVM Continues Offering Much Better Performance Than VirtualBox

    With the release earlier this month of Oracle VirtualBox 6.0, besides running some benchmarks of its VMSVGA 3D graphics support, I also ran some basic benchmarks to see how a similarly configured VM under both VirtualBox 6.0 with Linux KVM setup via virt-manager would compare for performance as we hit the end of 2018. This quick round of Linux virtualization tests was done on the AMD Ryzen Threadripper 2990WX system.

    http://www.phoronix.com/vr.php?view=27348

  • Hi-Angel
    replied
    Oh, btw, I just remember what was a show-stopper for me for using QEMU/KVM compared to VirtualBox. QEMU grabs keyboard, and there's no way to disable that. And no, I don't want to press the "keyboard-capture" releasing hotkey each time I switch a window, depending on how you use the VM that can be too much overhead (and it was in my case).

    VirtualBox does allow to disable keyboard-grab, so you can use your window manager combinations without pressing any additional hotkey.

    I even reported a bug to QEMU, 4 years ago I think. Although it's interesting that I couldn't find it right now with google. Either way, nobody ever replied to it.

    Leave a comment:


  • t.s.
    replied
    Originally posted by SystemCrasher View Post
    I doubt this bold statement is true. Should I bother self to find any single distro that does not bothers about virtualbox to prove you wrong? Just one is enough to prove you wrong.
    • Opensuse, checked.
    • Fedora, checked.
    • Redhat, checked.
    • Archlinux, checked.
    • Debian, checked.
    • Ubuntu, checked.
    • Gentoo, checked.
    All major distros have it. So? Are you using niche distros? If you have serious works using linux but using niche distro, I'd call you amazing!

    Originally posted by SystemCrasher View Post
    I looked on command lines few times, learned to do that myself, RTFMed man and --help to go further than that - at which point I don't really need GUI and I probably already use more options than one could hope to pack in anyhow sane GUI.
    Well, good for you. Keep it up. Me, who use VM sparsely, didn't have time and would rather not wasting my time for that, as it is not my main focus.

    Originally posted by SystemCrasher View Post
    ..just buggy to decode on many computers/devices around. There're just few devices I used to film all that, obviously. My way would be: write shell script to run ffprobe..
    OK, we all know how great you are with script and automation, of all things related to linux. Me, not. I'll just automated what I need.

    Originally posted by SystemCrasher View Post
    Guess I've long surpassed "basic shit" kind of thing...
    Got it. Great.

    Originally posted by SystemCrasher View Post
    ..Fail to use that - and you'll miss most of coolest things Linux got to offer. It is not possible to make GUIs for all cool stuff Linux and programs around can do. If you failed to get idea, run ffmpeg --help full and try to imagine GUI doing all that. So either one would miss most options or they have to use command line.
    Err.. ... .... yeah, you're right.

    Leave a comment:


  • SystemCrasher
    replied
    Originally posted by starshipeleven View Post
    Are you aware that Virtualbox and its kernel module packages (the source for them anyway as it is compiled on the host system) and also the "guest additions" guest side modules are shipped by all distros and your own distro's package is 100% guaranteed to work on your own distro's kernel?
    I doubt this bold statement is true. Should I bother self to find any single distro that does not bothers about virtualbox to prove you wrong? Just one is enough to prove you wrong.

    Then, I do build my own kernels. I'm curious to try new stuff, even unreleased one, it fun, and I think I like my own kernel config over what distros got to offer. Most notably I prefer "full preempt" builds. Somehow distros rarely go this far when it comes to low latency & desktop-optimized experience. Even their so called "low latency" kernels are half-way there. It could even eventually be some -RC on some machines, just to see how it performs before it lands on my head fully. So uhm yea, cool story about distro kernels, blah-doh.

    I only know of GNOME Boxes, and it's not Qt.
    Maybe it has been aqemu. Or qemuctl. Or something else I've forgot. Either way, I looked on command lines few times, learned to do that myself, RTFMed man and --help to go further than that - at which point I don't really need GUI and I probably already use more options than one could hope to pack in anyhow sane GUI. Say I have rather custom network bring-up for VMs. I doubt any GUI would let it me to set up the way I like it with all subtle details I need.

    That's bs, in 99% of the cases a GUI application will never ever need to deal with all ffmpeg options to play a video or make a file conversion.
    Why should I bother self about some abstract needs of abstract applications in first place? I bother self about my own needs, that's where ffmpeg proven to be useful. Look, it can even be used to automate some non-trivial transcodings or so.

    Say, I had about 300+ movies from cameras, these are huge, taking busloads of disk space, as well terribly slow to upload over net anywhere and pretty challenging or just buggy to decode on many computers/devices around. There're just few devices I used to film all that, obviously. My way would be: write shell script to run ffprobe, guess which kind of video is that and run ffmpeg transcode with parameters optimized for that group of videos. From me it only took coarse identification of few large groups of videos and parameters suitable for certain groups. Then transcoding mostly happened without my intervention.

    What the GUI way would be to e.g. apply same set of filters to videos taken at more or less same day and time by same device? Mutating it for another device or date/time? I don't really get how to do that through GUI with reasonable efforts. Ability to apply busload of filters & advanced processing is a very good option. Ffmpeg got very powerful set of filters.

    The GUI for KVM (virt-manager or even GNOME-Boxes) can't do basic shit
    Guess I've long surpassed "basic shit" kind of thing...

    I don't give a shit about performance if I can actually get the job done in less time than it would take to actually learn how to set up KVM.
    I still think most of Linux powers comes from its command line. Fail to use that - and you'll miss most of coolest things Linux got to offer. It is not possible to make GUIs for all cool stuff Linux and programs around can do. If you failed to get idea, run ffmpeg --help full and try to imagine GUI doing all that. So either one would miss most options or they have to use command line.

    Leave a comment:


  • starshipeleven
    replied
    Originally posted by SystemCrasher View Post
    I wouldn't call custom kernel modules user-friendly, this alone implies a lot of room why it could backfire and implies nobody supports such kernel.
    Are you aware that Virtualbox and its kernel module packages (the source for them anyway as it is compiled on the host system) and also the "guest additions" guest side modules are shipped by all distros and your own distro's package is 100% guaranteed to work on your own distro's kernel?

    Because there is a difference between out-of-tree but still technically opensource so it is packaged by all distros vs not opensource where some things are shipped in source form by the vendor only.

    As for virt-manager, doh, there're plenty of other GUIs for qemu-kvm as well.
    I only know of GNOME Boxes, and it's not Qt.

    Somehow I like result more than what GUI things can afford. At the end of day it isn't possible to put so many options to GUI in sane way. Same story with ffmpeg.
    That's bs, in 99% of the cases a GUI application will never ever need to deal with all ffmpeg options to play a video or make a file conversion.

    The GUI for KVM (virt-manager or even GNOME-Boxes) can't do basic shit I can do with Virtualbox or even VMWare GUI, like for example increasing video RAM to the ultra-high amount of 64MB to support my 4k screen (which requires me to go and edit the xml config file directly in virt-manager/qemu/KVM) instead of just hardcoding it to 16MB.

    And I like when Linux boots me another Linux - with nearly everything working out of the box, decent performance and so on. As for windows... well, okay I don't use Windows.
    I don't give a shit about performance if I can actually get the job done in less time than it would take to actually learn how to set up KVM.

    As I said the only reason I'm migrating to KVM is because I need some of its features AND because VMWare is a massive PITA to maintain in a rolling release distro.

    Leave a comment:


  • SystemCrasher
    replied
    Originally posted by starshipeleven View Post
    Virtualbox is very user-friendly
    I wouldn't call custom kernel modules user-friendly, this alone implies a lot of room why it could backfire and implies nobody supports such kernel. As for virt-manager, doh, there're plenty of other GUIs for qemu-kvm as well. Actually 1st time I ran it I've used some GUI, something qt-based. However now I do not really need all that and can just craft appropriate commandlines manually. Somehow I like result more than what GUI things can afford. At the end of day it isn't possible to put so many options to GUI in sane way. Same story with ffmpeg.

    And I like when Linux boots me another Linux - with nearly everything working out of the box, decent performance and so on. As for windows... well, okay I don't use Windows.

    Leave a comment:


  • gilboa
    replied
    Originally posted by starshipeleven View Post
    Yeah I'm sure this is either an issue for newer versions than what is used in stable-based distros, or it is a mistake in configuration on my part.

    For the BSOD on install, this is the thread I read https://forum.level1techs.com/t/wind...install/127425

    As you can see below I also tried with Windows 10 1703 as said in the forum but it did not really work either.

    Ryzen 5 1600X on a Asrock x370 Gaming ITX with 16GB ECC ram. VM disk images are stored in a local Sata drive with ext4 filesystem.

    It also has Virtualbox installed (I hoped I could switch over to KVM and uninstall it eventually as it kinda sucks even if it actually works reliably).

    I generated the VM using the GUI interface (virt-manager), this is the xml configuration file, I'm not doing anything fancy like PCIe/VGA passthrough (nor I plan to do so).

    Code:
    <domain type='kvm'>
    <name>win10</name>
    <uuid>be4650c5-e66e-4181-8869-26b8d9af3a21</uuid>
    <metadata>
    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
    <libosinfo:os id="http://microsoft.com/win/10"/>
    </libosinfo:libosinfo>
    </metadata>
    <memory unit='KiB'>4194304</memory>
    <currentMemory unit='KiB'>4194304</currentMemory>
    <vcpu placement='static'>2</vcpu>
    <os>
    <type arch='x86_64' machine='pc-q35-3.0'>hvm</type>
    </os>
    <features>
    <acpi/>
    <apic/>
    <hyperv>
    <relaxed state='on'/>
    <vapic state='on'/>
    <spinlocks state='on' retries='8191'/>
    </hyperv>
    <vmport state='off'/>
    </features>
    <cpu mode='custom' match='exact' check='partial'>
    <model fallback='allow'>kvm64</model>
    </cpu>
    <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
    <timer name='hypervclock' present='yes'/>
    </clock>
    <on_poweroff>destroy</on_poweroff>
    <on_reboot>restart</on_reboot>
    <on_crash>destroy</on_crash>
    <pm>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
    </pm>
    <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
    <driver name='qemu' type='qcow2'/>
    <source file='/run/media/alby/data_xeon_ext4/KVM_VM_folder/win10_disk.qcow2'/>
    <target dev='vda' bus='virtio'/>
    <boot order='2'/>
    <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
    <driver name='qemu' type='raw'/>
    <source file='/run/media/alby/data_xeon_ext4/winiso/Win10/Windows1709_32-64_EN.iso'/>
    <target dev='sdb' bus='sata'/>
    <readonly/>
    <boot order='1'/>
    <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <disk type='file' device='cdrom'>
    <driver name='qemu' type='raw'/>
    <source file='/run/media/alby/data_xeon_ext4/winiso/KVM_drivers_virtio-win-0.1.141.iso'/>
    <target dev='sdc' bus='sata'/>
    <readonly/>
    <address type='drive' controller='0' bus='0' target='0' unit='2'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
    <master startport='0'/>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
    <master startport='2'/>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
    <master startport='4'/>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x2'/>
    </controller>
    <controller type='sata' index='0'>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pcie-root'/>
    <controller type='pci' index='1' model='pcie-root-port'>
    <model name='pcie-root-port'/>
    <target chassis='1' port='0x10'/>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
    </controller>
    <controller type='pci' index='2' model='pcie-root-port'>
    <model name='pcie-root-port'/>
    <target chassis='2' port='0x11'/>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
    </controller>
    <serial type='pty'>
    <target type='isa-serial' port='0'>
    <model name='isa-serial'/>
    </target>
    </serial>
    <console type='pty'>
    <target type='serial' port='0'/>
    </console>
    <input type='tablet' bus='usb'>
    <address type='usb' bus='0' port='1'/>
    </input>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='spice' autoport='yes'>
    <listen type='address'/>
    <image compression='off'/>
    </graphics>
    <sound model='ich9'>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
    </sound>
    <video>
    <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    </video>
    <redirdev bus='usb' type='spicevmc'>
    <address type='usb' bus='0' port='2'/>
    </redirdev>
    <redirdev bus='usb' type='spicevmc'>
    <address type='usb' bus='0' port='3'/>
    </redirdev>
    <memballoon model='virtio'>
    <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </memballoon>
    </devices>
    </domain>
    I never used to virt-manager GUI, but can you drop the CPU emulation to core2 or sandy-bridge?

    - Gilboa

    Leave a comment:


  • starshipeleven
    replied
    Originally posted by SystemCrasher View Post
    TBH I don't get why ppl bother self with VirtualBox on linux.
    - Out of tree kernel crap to add some woes.
    - Limided features.
    - Awkward performance.
    - Company behind it is opensource-unfriendly generally.

    On other hand KVM is built-in in each and every linux version. It can take some efforts to get fully familiar with qemu+kvm but it does pays for itself. Been there, checked that.
    Virtualbox is very user-friendly, much more than KVM (even with virt-manager GUI), and is much more convenient and hassle-free to use than VMWare (which is far superior otherwise), especially on a rolling release distro. For example I've never had issues with out-of-tree Virtualbox modules while VMWare ones routinely fail if your kernel version is too new.

    That said I'm slowly migrating to KVM because I need more features, but boy is virt-manager limited, I have to use commandline and read documentation way too often to do stuff.

    Also the guest drivers for Windows have to be installed manually from an ISO you download from Fedora/RedHat as there you find the only ones that are actually signed so Windows accepts them, while Virtualbox/VMWare automate this process without requiring you to figure out where is stuff and what you need to do.
    Last edited by starshipeleven; 01-02-2019, 12:40 PM.

    Leave a comment:


  • SystemCrasher
    replied
    TBH I don't get why ppl bother self with VirtualBox on linux.
    - Out of tree kernel crap to add some woes.
    - Limided features.
    - Awkward performance.
    - Company behind it is opensource-unfriendly generally.

    On other hand KVM is built-in in each and every linux version. It can take some efforts to get fully familiar with qemu+kvm but it does pays for itself. Been there, checked that.

    Leave a comment:


  • starshipeleven
    replied
    Originally posted by gilboa View Post
    I'm running a number of Windows 10 and Windows 2K12 (server) on KVM either directly (from command line) or from my large oVirt cluster.
    No issues what-so-ever.
    Yeah I'm sure this is either an issue for newer versions than what is used in stable-based distros, or it is a mistake in configuration on my part.

    For the BSOD on install, this is the thread I read https://forum.level1techs.com/t/wind...install/127425

    As you can see below I also tried with Windows 10 1703 as said in the forum but it did not really work either.

    Host hardware? CPU?
    Ryzen 5 1600X on a Asrock x370 Gaming ITX with 16GB ECC ram. VM disk images are stored in a local Sata drive with ext4 filesystem.

    It also has Virtualbox installed (I hoped I could switch over to KVM and uninstall it eventually as it kinda sucks even if it actually works reliably).

    I generated the VM using the GUI interface (virt-manager), this is the xml configuration file, I'm not doing anything fancy like PCIe/VGA passthrough (nor I plan to do so).

    Code:
    <domain type='kvm'>
      <name>win10</name>
      <uuid>be4650c5-e66e-4181-8869-26b8d9af3a21</uuid>
      <metadata>
        <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
          <libosinfo:os id="http://microsoft.com/win/10"/>
        </libosinfo:libosinfo>
      </metadata>
      <memory unit='KiB'>4194304</memory>
      <currentMemory unit='KiB'>4194304</currentMemory>
      <vcpu placement='static'>2</vcpu>
      <os>
        <type arch='x86_64' machine='pc-q35-3.0'>hvm</type>
      </os>
      <features>
        <acpi/>
        <apic/>
        <hyperv>
          <relaxed state='on'/>
          <vapic state='on'/>
          <spinlocks state='on' retries='8191'/>
        </hyperv>
        <vmport state='off'/>
      </features>
      <cpu mode='custom' match='exact' check='partial'>
        <model fallback='allow'>kvm64</model>
      </cpu>
      <clock offset='localtime'>
        <timer name='rtc' tickpolicy='catchup'/>
        <timer name='pit' tickpolicy='delay'/>
        <timer name='hpet' present='no'/>
        <timer name='hypervclock' present='yes'/>
      </clock>
      <on_poweroff>destroy</on_poweroff>
      <on_reboot>restart</on_reboot>
      <on_crash>destroy</on_crash>
      <pm>
        <suspend-to-mem enabled='no'/>
        <suspend-to-disk enabled='no'/>
      </pm>
      <devices>
        <emulator>/usr/bin/qemu-system-x86_64</emulator>
        <disk type='file' device='disk'>
          <driver name='qemu' type='qcow2'/>
          <source file='/run/media/alby/data_xeon_ext4/KVM_VM_folder/win10_disk.qcow2'/>
          <target dev='vda' bus='virtio'/>
          <boot order='2'/>
          <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
        </disk>
        <disk type='file' device='cdrom'>
          <driver name='qemu' type='raw'/>
          <source file='/run/media/alby/data_xeon_ext4/winiso/Win10/Windows1709_32-64_EN.iso'/>
          <target dev='sdb' bus='sata'/>
          <readonly/>
          <boot order='1'/>
          <address type='drive' controller='0' bus='0' target='0' unit='1'/>
        </disk>
        <disk type='file' device='cdrom'>
          <driver name='qemu' type='raw'/>
          <source file='/run/media/alby/data_xeon_ext4/winiso/KVM_drivers_virtio-win-0.1.141.iso'/>
          <target dev='sdc' bus='sata'/>
          <readonly/>
          <address type='drive' controller='0' bus='0' target='0' unit='2'/>
        </disk>
        <controller type='usb' index='0' model='ich9-ehci1'>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x7'/>
        </controller>
        <controller type='usb' index='0' model='ich9-uhci1'>
          <master startport='0'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x0' multifunction='on'/>
        </controller>
        <controller type='usb' index='0' model='ich9-uhci2'>
          <master startport='2'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x1'/>
        </controller>
        <controller type='usb' index='0' model='ich9-uhci3'>
          <master startport='4'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x2'/>
        </controller>
        <controller type='sata' index='0'>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
        </controller>
        <controller type='pci' index='0' model='pcie-root'/>
        <controller type='pci' index='1' model='pcie-root-port'>
          <model name='pcie-root-port'/>
          <target chassis='1' port='0x10'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
        </controller>
        <controller type='pci' index='2' model='pcie-root-port'>
          <model name='pcie-root-port'/>
          <target chassis='2' port='0x11'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
        </controller>
        <serial type='pty'>
          <target type='isa-serial' port='0'>
            <model name='isa-serial'/>
          </target>
        </serial>
        <console type='pty'>
          <target type='serial' port='0'/>
        </console>
        <input type='tablet' bus='usb'>
          <address type='usb' bus='0' port='1'/>
        </input>
        <input type='mouse' bus='ps2'/>
        <input type='keyboard' bus='ps2'/>
        <graphics type='spice' autoport='yes'>
          <listen type='address'/>
          <image compression='off'/>
        </graphics>
        <sound model='ich9'>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
        </sound>
        <video>
          <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
        </video>
        <redirdev bus='usb' type='spicevmc'>
          <address type='usb' bus='0' port='2'/>
        </redirdev>
        <redirdev bus='usb' type='spicevmc'>
          <address type='usb' bus='0' port='3'/>
        </redirdev>
        <memballoon model='virtio'>
          <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
        </memballoon>
      </devices>
    </domain>

    Leave a comment:

Working...
X