Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. The Lounge
  4. Windows host Linux guest VM speed
Forum Updated to NodeBB v4.3 + New Features

Windows host Linux guest VM speed

Scheduled Pinned Locked Moved Unsolved The Lounge
17 Posts 9 Posters 3.2k Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JonB
    wrote on 23 Oct 2022, 09:03 last edited by
    #1

    Could somebody kind & knowledgeable explain to me --- preferably in syllables of not more than one word --- whether/what speed penalty I am paying running my Linux inside a VirtualBox under Windows host versus if I had a native Linux I booted into? You may assume the VirtualBox is given a decent amount of memory and CPUs. If it makes any significant difference, the VM disk image is on an M2 drive (same as the Windows 11 OS itself). I have done whatever to allow "virtualization" in the BIOS. You may also assume the Windows host is doing "nothing" while I am in the VM doing stuff.

    For this purpose I'm not interested in anything "fancy" like graphics or peripheral devices or anything. Let's take the example of running a make compilation from a command-line terminal.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Axel Spoerl
      Moderators
      wrote on 23 Oct 2022, 13:39 last edited by
      #2

      Dear @JonB ,
      given your reputation, I am paying attention to every word you wrote and to every word I write.
      While I think I exactly know the purpose of your VMing, it has to be mentioned that VM performance penalty is not precisely a Qt issue.
      But as a heavy VM addict, I am happy to share a few of my personal experiences.

      • Windows host / Linux guest:
        I calculate a 30% performance penalty with virtualbox and a little bit less with VMware.
        With 16 cores on the host, a qtbase compile with ninja -j 60 -l 10 is no issue on the host, but freezes the guest.
      • Linux host / Windows guest
        I calculate a 30% performance penalty with virtualbox, approx. 25% with VMware.
        A lot of ups and downs regarding networking stability, tweaks if you run a bleeding edge Linux, Windows 11 etc.

      Generally, if it's just make on the command line, the penalty is ~30% in my experience. I automize and thus optimize a lot using minicoin, especially when it comes to compiling and running a single executable, e.g. an autotest.

      I sincerely hope I could help a bit, in return for so many good contributions from you.
      Cheers
      Axel

      Software Engineer
      The Qt Company, Oslo

      1 Reply Last reply
      4
      • C Offline
        C Offline
        Chris Kawa
        Lifetime Qt Champion
        wrote on 23 Oct 2022, 13:45 last edited by
        #3

        I know that's not the question, and I'm neither kind nor knowledgeable when it comes to Linux or VMs, but if it's just command line stuff like make you're after, wouldn't WSL be a better option? It's pretty much a full Linux distro running on a Windows kernel, so as close to native speeds as you can get, apart from running it standalone.

        J 1 Reply Last reply 23 Oct 2022, 13:53
        0
        • C Chris Kawa
          23 Oct 2022, 13:45

          I know that's not the question, and I'm neither kind nor knowledgeable when it comes to Linux or VMs, but if it's just command line stuff like make you're after, wouldn't WSL be a better option? It's pretty much a full Linux distro running on a Windows kernel, so as close to native speeds as you can get, apart from running it standalone.

          J Offline
          J Offline
          JonB
          wrote on 23 Oct 2022, 13:53 last edited by JonB
          #4

          @Chris-Kawa said in Windows host Linux guest VM speed:

          wouldn't WSL be a better option?

          Nooooo!!! :) That's not what I'm trying to achieve. Am very happy sitting in my Linux VM when I'm doing Linuxy things (mostly just Qt), and in my main Windows host outside that. Also I just want to understand just what a VM like VB is costing me,

          @Axel-Spoerl said in Windows host Linux guest VM speed:

          given your reputation, I am paying attention to every word you wrote and to every word I write.

          Gosh! I do hope that does not mean anything bad/scary! :) Certainly not my intention.

          Your "30% penalty" is very interesting. make was only an example, same for compilation etc. Not looking to optimize those, just they show I'm not using anything particularly graphic-y or desktop-y or OS-y. It just means there will be (plenty of) processor/memory/some disk involved.

          That's somewhat more of a penalty than I was hoping for. But then again I have no idea what to expect!

          You may well be right with this figure. Now of course I'd like to understand where that 30% is disappearing to?! In layman's terms :)

          Here is my layman's guess?:

          • RAM: VM can access that at full speed?
          • CPU/core: VM can use that at full speed?
          • I/O: That's all I can imagine goes through something of the host OS, which may be a bottleneck?
          1 Reply Last reply
          0
          • K Offline
            K Offline
            Kent-Dorfman
            wrote on 24 Oct 2022, 05:51 last edited by
            #5

            I have very strong opinions about VMs and which should be the host and which should be the guest. I cannot tell you anything specific about performance of a linux guest under windoze because I refuse to do it that way. My issue has never been so much about the windoze performance penalty as it is about the effects of the domain security model on a guest running under windows. Too often I suffered poor performance because the IT minions believe they must have 100 and one security agents running on dev workstations. I mean devs are there to bring down the company infrastructure with malevolent code, right?

            I don't trust windows to manage my hardware because I cannot fully manage my hardware under windoze. I would go the other route and run windoze as a guest under a properly configured linux box instead. I've enjoyed a lot of success taking that route...got fed up with vbox several years ago: their config mechanisms were too convoluted and the oracle support channel folks were bigger jerks than I am...that says a lot. Once you figure out its quirks, QEMU is a solid hypervisor when used in conjunction with the kvm module...near native speeds on a well configured VM where the cores are reserved for the vm and you use a raw partition as the guest disk.

            1 Reply Last reply
            2
            • A Offline
              A Offline
              Axel Spoerl
              Moderators
              wrote on 24 Oct 2022, 07:12 last edited by
              #6

              Answers to your questions, @JonB are based on Linux hosted VM, basically for the same reasons which @Kent-Dorfman has mentioned.

              RAM: VM can access that at full speed?
              Almost full speed, provided that you have ample memory on the host.
              E.g. if the host has 64GB and there are no major activities besides running the VM, 32 GB can be accessed with a speed penalty < 10%.

              CPU/core: VM can use that at full speed?

              Same as Memory. With VMWare, you can manage CPU affinity to make physical assignments / restrictions.

              I/O: That's all I can imagine goes through something of the host OS, which may be a bottleneck?

              Virtual disks, represented by a single file, can be quite a bottle neck, especially many files are opened for writing at the same time (compiling).
              Mapping a network drive from the host into the VM can speed things up quite a bit, if the host as a fast disk.
              It's also an option to mount physical harddisks or even partitions, see here for an example.
              I use such setups for VMs that I frequently use, mainly for compiling and testing across platforms.

              Software Engineer
              The Qt Company, Oslo

              1 Reply Last reply
              1
              • D Offline
                D Offline
                DerReisende
                wrote on 24 Oct 2022, 15:01 last edited by
                #7

                I found that VMWare is quite a bit faster and more polished when it comes to running virtual machines compared to VirtualBox on windows. VB always felt sluggish compared to VMare.

                J 1 Reply Last reply 24 Oct 2022, 15:27
                0
                • D DerReisende
                  24 Oct 2022, 15:01

                  I found that VMWare is quite a bit faster and more polished when it comes to running virtual machines compared to VirtualBox on windows. VB always felt sluggish compared to VMare.

                  J Offline
                  J Offline
                  JonB
                  wrote on 24 Oct 2022, 15:27 last edited by
                  #8

                  @DerReisende
                  I found VirtualBox easy to install and use. If VMware is the one I'm thinking of, very confusing.

                  D J 2 Replies Last reply 24 Oct 2022, 17:01
                  0
                  • J JonB
                    24 Oct 2022, 15:27

                    @DerReisende
                    I found VirtualBox easy to install and use. If VMware is the one I'm thinking of, very confusing.

                    D Offline
                    D Offline
                    DerReisende
                    wrote on 24 Oct 2022, 17:01 last edited by
                    #9

                    @JonB Both are easy to install. But when it comes to guest performance I found VMWare to have better driver support and thus better performance of a linux guest compared to VirtualBox. With VirtualBox it always felt sort of sluggish although I followed the docs and installed some recommended drivers. But this might be due to the machine.
                    I now use a native Linux system and have abandoned all VMs :) Much better…

                    J 1 Reply Last reply 24 Oct 2022, 18:37
                    1
                    • D DerReisende
                      24 Oct 2022, 17:01

                      @JonB Both are easy to install. But when it comes to guest performance I found VMWare to have better driver support and thus better performance of a linux guest compared to VirtualBox. With VirtualBox it always felt sort of sluggish although I followed the docs and installed some recommended drivers. But this might be due to the machine.
                      I now use a native Linux system and have abandoned all VMs :) Much better…

                      J Offline
                      J Offline
                      JonB
                      wrote on 24 Oct 2022, 18:37 last edited by
                      #10

                      @DerReisende
                      Thanks, interesting!

                      The most apparent difference between the two is licensing: VirtualBox is free and open-source. VMware is free for personal use only. However, the free version for personal and educational use has limited features.

                      I think I'm supposed to support open source, am I not?

                      1 Reply Last reply
                      0
                      • J JonB
                        24 Oct 2022, 15:27

                        @DerReisende
                        I found VirtualBox easy to install and use. If VMware is the one I'm thinking of, very confusing.

                        J Offline
                        J Offline
                        JonB
                        wrote on 24 Oct 2022, 19:05 last edited by JonB
                        #11

                        @JonB said in Windows host Linux guest VM speed:

                        @DerReisende
                        I found VirtualBox easy to install and use. If VMware is the one I'm thinking of, very confusing.

                        Oh yeah, it was "VMware's ESXi". I found it hard! :( It may be that when set up and running it was better, I don't know, but I found configuring it/installing on it a nightmare! Is that the software you mean instead of VirtualBox?

                        D JKSHJ 2 Replies Last reply 24 Oct 2022, 20:48
                        0
                        • J JonB
                          24 Oct 2022, 19:05

                          @JonB said in Windows host Linux guest VM speed:

                          @DerReisende
                          I found VirtualBox easy to install and use. If VMware is the one I'm thinking of, very confusing.

                          Oh yeah, it was "VMware's ESXi". I found it hard! :( It may be that when set up and running it was better, I don't know, but I found configuring it/installing on it a nightmare! Is that the software you mean instead of VirtualBox?

                          D Offline
                          D Offline
                          DerReisende
                          wrote on 24 Oct 2022, 20:48 last edited by
                          #12

                          @JonB No, never used ESXi. Thought about it and Proxmox but abandoned everything for a native linux server and a couple of dual boot laptops as both looked fairly complicated to me. The only VM left here is Win 11 ARM64 on a M1 MacBook Air running with Parallels.

                          1 Reply Last reply
                          0
                          • J JonB
                            24 Oct 2022, 19:05

                            @JonB said in Windows host Linux guest VM speed:

                            @DerReisende
                            I found VirtualBox easy to install and use. If VMware is the one I'm thinking of, very confusing.

                            Oh yeah, it was "VMware's ESXi". I found it hard! :( It may be that when set up and running it was better, I don't know, but I found configuring it/installing on it a nightmare! Is that the software you mean instead of VirtualBox?

                            JKSHJ Offline
                            JKSHJ Offline
                            JKSH
                            Moderators
                            wrote on 25 Oct 2022, 02:27 last edited by
                            #13

                            @JonB said in Windows host Linux guest VM speed:

                            Oh yeah, it was "VMware's ESXi". I found it hard! :(

                            ESXi is a product that targets large enterprises. It's not for your home PC! And definitely not comparable with VirtualBox.

                            VMWare Player is the one that's on the same "level" as VirtualBox.

                            I think I'm supposed to support open source, am I not?

                            That's for you to decide. Different people have different reasons for supporting free/open-source software -- what's yours?

                            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                            J 1 Reply Last reply 25 Oct 2022, 08:50
                            0
                            • JKSHJ JKSH
                              25 Oct 2022, 02:27

                              @JonB said in Windows host Linux guest VM speed:

                              Oh yeah, it was "VMware's ESXi". I found it hard! :(

                              ESXi is a product that targets large enterprises. It's not for your home PC! And definitely not comparable with VirtualBox.

                              VMWare Player is the one that's on the same "level" as VirtualBox.

                              I think I'm supposed to support open source, am I not?

                              That's for you to decide. Different people have different reasons for supporting free/open-source software -- what's yours?

                              J Offline
                              J Offline
                              JonB
                              wrote on 25 Oct 2022, 08:50 last edited by JonB
                              #14

                              @JKSH
                              Per a colleague's "guarantee" that it would work, I bought a server and put ESXi on it for work a couple of years ago. It was to allow multiple Windows OS images for testing etc. I spent quite a bit on it --- like £800? (our currency was still worth something then). Spent ages understanding it, copying image from source server. Image would work for a few hours, then break/freeze so badly it was not possible to get into it/boot it and had to restart reformatting and reinstalling from scratch just to get in. Decided this was not reliable. The box is now used as a (expensive) doorstop....

                              So if that is how "reliable" or "friendly" that VMWare is I would not go near it! Maybe "VMWare Player" is a simpler virtualizer product?

                              what's yours?

                              Thanks, pint of cider? :) Dunno, just would probably pick a free, open source over anything commercial if given a choice.

                              @Kent-Dorfman said earlier:

                              got fed up with vbox several years ago: their config mechanisms were too convoluted and the oracle support channel folks were bigger jerks than I am...that says a lot.

                              That was my initial experience when I first posted a question or two on the VirtualBox forum. They were a bit "sniffy". But since then it settled down and they have answered my occasional question OK. I can understand how the interface and the product works.

                              Maybe I ought give "VMWare Player" a go, just to see? Do you know: my VirtualBox images are .vdi files, are these accepted by VMWare?

                              1 Reply Last reply
                              0
                              • JoeCFDJ Offline
                                JoeCFDJ Offline
                                JoeCFD
                                wrote on 25 Oct 2022, 14:23 last edited by
                                #15

                                @JonB said in Windows host Linux guest VM speed:

                                VMWare Player

                                VMWare Player is a free one for personal use. Its installation and use are easy and straightforward. I have used it for some years and like it. It is very nice to have it for apps on multiple platforms. I have 4 OSs on it now and can switch conveniently. For performance, definitely go without VMs as DerReisende does.

                                1 Reply Last reply
                                0
                                • fcarneyF Offline
                                  fcarneyF Offline
                                  fcarney
                                  wrote on 25 Oct 2022, 21:03 last edited by
                                  #16

                                  I have run into multiple issue with VirtualBox. I just don't like using it if I don't have to. I have seen networking fail, speed issues, file transfer issues, opengl problems, and more. It would not surprise me if speed in compiling is greatly impacted. It seems like these problems have gotten progressively worse over time (I noticed over last 4 years).

                                  C++ is a perfectly valid school of magic.

                                  1 Reply Last reply
                                  0
                                  • J Offline
                                    J Offline
                                    JessieJim1
                                    wrote on 24 Apr 2023, 09:54 last edited by
                                    #17

                                    The exact amount of virtualization overhead you will experience depends on several factors, including the resources allocated to the virtual machine (such as memory and CPUs), the complexity of the guest operating system, and the workload being performed in the virtual machine.

                                    1 Reply Last reply
                                    0

                                    • Login

                                    • Login or register to search.
                                    • First post
                                      Last post
                                    0
                                    • Categories
                                    • Recent
                                    • Tags
                                    • Popular
                                    • Users
                                    • Groups
                                    • Search
                                    • Get Qt Extensions
                                    • Unsolved