Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: KVM or VirtualBox (or both)?

  1. #11
    Join Date
    Sep 2012
    Beans
    579
    Distro
    Ubuntu Gnome 17.04 Zesty Zapus

    Re: KVM or VirtualBox (or both)?

    KVM or VirtualBox (or both)?
    Is "both" feasible now? I recall trying to get KVM and VB on the same host was a challenge, not done this recently though and a quick google suggests it might be dependent upon which order you start your guests. Would be interested for any recent experience tips?

    @lammert-nijhof, hi I'm picking up your post for the original thread for these quotes...

    So there is no architectural reasons for a difference in performance.
    The clearest reason for this at its core is architectural. A type 2 hypervisor is in-fact just another application running on the host OS that is subject to the hosts memory, disk, video and security management processes, anything it wants to do must be requested from the host os and thus can be denied, overridden, delayed etc. Whereas a type 1 hypervisor in effect is the host os and so isn't subject to the same chain of authority and process requests.

    But with the current prices of video cards I would prefer to share that one expensive card between the VMs.
    In full agreement hear the hardware has sky rocketed however your desire to share the GFX resources is an interesting point. Traditional GFX passthrough doesn't deliver this sharing capability but developments with vfio do allow you to share the hosts video hardware acceleration with multiple guest I believe (https://github.com/qemu/qemu/blob/ma...igd-assign.txt). As such I think your comments about development effort and code quality are on point, big names with big budgets support the develop of kvm and vfio.

    The mentioned performance comparison was not very relevant, because it concentrated on large servers with many CPUs (10 cores and 20 threads).
    I don't see your logic here sorry, are you suggesting that the underlying results might materially change if you consistently reduce the number of processing cores made available to the guest?

    Virtualbox is better for running server production databases and Vbox/KVM and XEN are more or less equal in a home environment for e.g audio and video processing. Which completely proves my point!
    My read of that linked article was that the testers were suspicious of VB's disk performance characteristics suggesting that VB might not be waiting for write confirmations which it should. And whilst I agree the margins for video and audio tests were narrow VB still came last...so I don't see how this "...completely proves my point"?

  2. #12
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: KVM or VirtualBox (or both)?

    Quote Originally Posted by KillerKelvUK View Post
    Is "both" feasible now? I recall trying to get KVM and VB on the same host was a challenge, not done this recently though and a quick google suggests it might be dependent upon which order you start your guests. Would be interested for any recent experience tips?
    They won't run concurrently. You must choose one or the other, but not both at the same time. Perhaps you can run them concurrently if you turn off VT-x/AMD-V in both hypervisors, but they would run even more piggish than they already do, and who wants that? What I meant was having both installed. I run VBox for stuff like Minix, Android, etc, primarily because it's not important to squeeze the nth amount of performance out of those VMs, and KVM for everything else.
    A type 2 hypervisor is in-fact just another application running on the host OS that is subject to the hosts memory, disk, video and security management processes, anything it wants to do must be requested from the host os and thus can be denied, overridden, delayed etc. Whereas a type 1 hypervisor in effect is the host os and so isn't subject to the same chain of authority and process requests.
    To be fair, the line between Type 1 and Type 2 have been blurring over the years. VBox is the only Type 2 I am familiar with, but they have been leveraging more Type 1 features with every release, though still not as tightly bound as KVM or XEN. With the steady retirement of old CPUs I think VBox has just felt more comfortable relying on VT-x/AMD-V, which directs a lot of execution straight to the CPU without intervening translation.

    In the final analysis, theoretical considerations are just theoretical considerations. It's real-world results that count. I would love to have my VBox VMs run as fast as my KVM ones. VBox is just friendlier to use.

  3. #13
    Join Date
    Sep 2012
    Beans
    579
    Distro
    Ubuntu Gnome 17.04 Zesty Zapus

    Re: KVM or VirtualBox (or both)?

    Okay well I'm interested enough to try a comparison myself and see what I can learn and share so will throw VB on over the next couple of days to test out some scenarios.

  4. #14
    Join Date
    Jul 2008
    Location
    The Left Coast of the USA
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: KVM or VirtualBox (or both)?

    So long as the number of cores and threads was constant across testing of all three hypervisors, the relative performance comparison is valid when scaled.

    As to production servers in VBox: No. I think you would find very few Admins who do or recommend that. Rather the opposite. VBox is great for home/small scale non-production use.

    One can use both VBox and KVM on the same machine -- provided only one or the other is running at a time.
    Last edited by QIII; January 24th, 2018 at 01:54 AM.
    Please read The Forum Rules and The Forum Posting Guidelines

    A thing discovered and kept to oneself must be discovered time and again by others. A thing discovered and shared with others need be discovered only the once.
    This universe is crazy. I'm going back to my own.

  5. #15
    Join Date
    Oct 2014
    Location
    Santiago DR
    Beans
    177
    Distro
    Ubuntu

    Cool Re: KVM or VirtualBox (or both)?

    @DuckHook.
    I beg to differ. On the contrary, it is the only sort of proof that really matters, since it speaks to what a user will actually experience and is not just theory.
    It speaks to what you do experience with YOUR machine with YOUR settings. As I showed you, I have completely different experience with my machine. For instance I load VISTA in one minute on my Host giving Vista 2GB of memory. That is at least twice as fast as loading on the original laptop; an Inspiron 1521 from 2008 with an 2-core Athlon at 1.8GHz.
    This is the crux of the matter. You are arguing that VirtualBox is equivalent in performance to KVM without actually having run the two side by side. Your arguments are theoretical, whereas mine are experiential and real.
    I know it is old fashioned, but sometimes it helps, if you read the manual and that is also true for KVM. Sometimes it beats just trying something Besides for practical arguments, see my 1 minute VISTA loading and the next paragraphs:
    You can cite all the numbers you want. It does not substitute for what I've actually seen and felt.
    You must be joking, my numbers don't count, but your feelings about your comparison do.
    Translation: KVM runs faster and is more efficient.
    1. How can you possibly "conclude" any such thing without a side-by-side real-world test???
    2. More importantly, if true, this translates again as: for many machines, KVM is faster and more efficient!
    No I stated precisely what I meant, KVM will run better on machines where VM memory requirements and real memory are getting close. That is my conclusion from your report on using your 2GB laptops with Vista in Vbox and KVM. You described that comparison for me. Vista will not run very well, if you also need the memory for the Vbox host OS from that same 2GB. Vista runs good on my 8GB Host, when I reserve 2GB for the Vista VM (better then on my real Inspiron 1521 hardware). That Phoronix article showed that KVM was faster in compilation, while Vbox was faster serving a database and both were more or less equal (within 10%) in many other tasks, like e.g media format processing.
    I hope you will agree that neither your nor my expectations can have any bearing on reality. Reality is what it is. It doesn't (and shouldn't) care what our expectations are. I have provided my experiences. I am open to explanations about why my KVM machines outperform my VBox ones. I am open to any and all suggestions that might improve my VBox machines to equal or surpass KVM performance. But I cannot pretend that my experiences are other than what they are.
    You talk about your reality and that is completely different from my reality or that of Ryzen 7/GTX1070 owners. That is, why I have to understand, why you get a certain result in a test. I think about changing to KVM, but I want to be convinced for myself that it brings a significant advantage. The work will take days or maybe a week to get all VMs on both desktop and laptop to the same level again,.
    The only advantage of KVM, I see up-to-now, is the more dynamic allocation of memory, which I do not really need, since in my hosts I can run 2-3 VM at the same time and that is sufficient for me.

    You experience with Kubuntu/KDE is only partly understandable to me. Probably the Vbox 3D functionality is not very efficient with the standard Linux driver. I noticed a considerable improvement in the Vbox 3D functionallity going from Linux nouveau driver to Nvidea driver. And as additional advantage I now monitor GPU load and VRAM usage with Conky.

    Again I have no good reason yet to start working on the switch, Going from KVM to Vbox I 'require' CPU load improvement, while displaying 1080p60 YouTube videos in Chromium or Firefox in an Ubuntu 17.10 VM. The current figures with Chromium in Ubuntu 17.10 are:

    • real HW both CPU and GPU close to 50%
    • Vbox VM CPU close to 70% and GPU is between 25-35%

    If KVM would bring the figures of CPU down close to 60% and the GPU e.g. between 35-45%, I would start trying KVM on my laptop.
    Last edited by lammert-nijhof; January 24th, 2018 at 05:28 AM.

  6. #16
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: KVM or VirtualBox (or both)?

    There really is nothing more to discuss here. I am comparing two apples. You keep trying to compare an apple to your theorizations, and insisting that this constitutes a real comparison.

    Until you have actually run the two VM technologies side-by-side, I'm afraid that your assertions will simply remain assertions and we will just be talking past each other.

    Good Luck and Happy Ubuntu-ing!

  7. #17
    Join Date
    Oct 2014
    Location
    Santiago DR
    Beans
    177
    Distro
    Ubuntu

    Re: KVM or VirtualBox (or both)?


    I had to theorize my whole life, we would get requirements from our customers and we had to find a working solution and we had to theorize, how to solve it, what to develop, how much it would cost and we had to estimate e.g. CPU loads. Sorry that I still "theorize".

    So I try to understand your comparison and why you get the results you described. I translate that to my situation, like I did in the past. Your real comparison has no real value for anybody else, then people with the same HW. For example Vista runs lousy in a small Vbox-VM on your 2GB laptop and it runs good in your KVM VM and my 2GB Vbox-VM. Of course! Vista needs all the memory it can get. To be honest Vista did run lousy on my 2GB Inspiron 1521, that is why I definitively switched to Ubuntu. I have no big problems with my VMs including Vista, why would I change? Why should I say KVM is better then Vbox, based on what recent, representative measurements for a typical home situation?

    I like one improvement and that is to bring down the VM-CPU occupation somewhat. My current comparison with Chromium in Ubuntu 17.10 displaying 1080p60 YouTube videos are:

    • real HW both CPU and GPU loads close to 50%
    • Vbox VM CPU close to 70% and GPU is between 25-35%

    That are measurements and a comparison between real HW and a VM.

    The CPU ratio of that VM vs Real-HW is 140%, seems OK, but if KVM could bring that figure down to 120%, I would start promoting and trying KVM on my laptop. If somebody has arguments, why KVM could achieve that goal based on

    • somewhat technical architectural arguments;
    • any comparison between real-HW vs a KVM VM on CPU loads with e.g HD YouTube videos

    It would make me very happy and it could be used for extra or interpolation to my brick.

    Last edited by lammert-nijhof; January 24th, 2018 at 07:34 AM.

  8. #18
    Join Date
    Jul 2007
    Location
    Tāmaki Makau-rau, NZ
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: KVM or VirtualBox (or both)?

    This thread has run its course and is going round in circles.

    Closed.
    BACKUPS are unsexy — until you discover you should have done one yesterday.
    Spare your nerves and do one before you upgrade or install.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •