Solved Virtualization too slow on Mac?

So I installed FreeBSD on a virtualbox VM on my MacBook Pro 2015... It has a core i5 processor... I gave the VM 2GB of RAM and 128MB video memory... which I thought was quite generous... and it is so slow it's unusable... I thought surely it can handle the xfce desktop... But no, the mouse pointer sometimes take 5 seconds to respond to the trackpad input.
Is this normal? 😮😢
 
So I installed FreeBSD on a virtualbox VM on my MacBook Pro 2015... It has a core i5 processor... I gave the VM 2GB of RAM and 128MB video memory... which I thought was quite generous... and it is so slow it's unusable... I thought surely it can handle the xfce desktop... But no, the mouse pointer sometimes take 5 seconds to respond to the trackpad input.
Is this normal? 😮😢

In my opinion a core i5 should virtualize correctly FreeBSD... if you run FreeBSD in console mode.
If you run FreeBSD with a full graphic desktop, even with light desktop as XFCE... this is a nightmare.
FreeBSD as a guest has no guest add ons, so there are no graphic drivers to enhance video acceleration.
There are Virtualbox guest add ons for Windows Guests, for Linux Guests also, but not for *BSD
This is not recommended to run FreeBSD guest in Virtualbox in graphic mode... if this is your intention.
 
Okay that explains everything. I was going to mention that Ubuntu works fine in comparison, but I was afraid of starting a flame war. But I guess, if Linux has these advantages it's not surprising.
Guess I'll have to use bare metal only in future.
 
This is not recommended to run FreeBSD guest in Virtualbox in graphic mode... if this is your intention.
It actually works just fine. Just not with XFCE, GNOME or any of its derivatives. Mainly due to their dependence on 2D acceleration. I have several perfectly working FreeBSD 12.0 guests with X but use x11-wm/awesome or x11-wm/i3. Seamless mouse works, as does automatic resizing. It may not have 2D acceleration, it works just fine.
 
What Wozzeck, SirDice and such said: The problem isn't virtualization itself, the problem is the graphics.

My main home laptop (personally owned) is an 11-year old 32-bit Mac (vintage 2008). It doesn't have much memory or CPU. I regularly run Windows in a virtual machine on it, using VMware, both as a pure server machine (I have a CRM application that can only run on Windows, don't ask) and as a GUI machine (to run MS Visio, for which there is no equivalent Mac or *nix software). Works excellently, with fine performance. I've occasionally booted FreeBSD in console mode on it (when I'm too lazy to go to the basement and find an unused laptop), and it runs just fine.

The difference is that you are trying to use a version of the FreeBSD GUI that requires graphics acceleration, and that's going to be very unpleasant.
 
Hi all,
It says it is using VT-x acceleration with "nested paging" in the virtualbox main window.
The MacBook has 16 GB RAM so I'm going to try allocating more.
This is probably blasphemy on such a techie forum to be unaware of this but I've just discovered that I actually have a Core i7 CPU! I got mixed up because my ThinkPad has an i5.
A Google search returned that all MacBooks have virtualization enabled by default, and I certainly haven't turned it off. I'm using UFS.
Thanks for all your help.
There doesn't appear to be an option to select how many CPUs to virtualize.
 
Thanks SirDice. It's already set to just one CPU, so it's not that.
I installed the kmod and typed sudo kldload vboxdrv but no performance gain.
 
I've no issues running FreeBSD 12, xfce on
Mac mini(Late 2014)
Processor 3GHz Intel Core i7
Memory 16GB DDR3
Graphics Intel Iris 1536 MB
Monitor: Samsung 34"

I mostly use Firefox and terminal.
 

Attachments

  • Screenshot 2019-02-22 at 18.00.19.png
    Screenshot 2019-02-22 at 18.00.19.png
    41.8 KB · Views: 181
  • Screenshot 2019-02-22 at 18.00.31.png
    Screenshot 2019-02-22 at 18.00.31.png
    63.1 KB · Views: 180
  • Screenshot 2019-02-22 at 18.02.36.png
    Screenshot 2019-02-22 at 18.02.36.png
    49.2 KB · Views: 174
  • Screenshot 2019-02-22 at 18.02.49.png
    Screenshot 2019-02-22 at 18.02.49.png
    51.7 KB · Views: 172
  • Screenshot 2019-02-22 at 18.02.49.png
    Screenshot 2019-02-22 at 18.02.49.png
    51.7 KB · Views: 182
Hi BSD User,
That is strange because all my settings are the same as yours except possibly the IO APiC (not at the computer just now).
I cannot even drag a terminal window around the screen without an infuriating latency.
 
This should work:
sudo kldload vboxvideo
But it says "no such file or directory" (or words to that effect - I don't have my MacBook in front of me)...
I definitely installed the guest additions with pkg. I'm not sure if the guest additions from the repository match my virtualbox on my Mac though. But if that's the case, I'd expect it to segfault rather than just go slow.
The Handbook itself called the driver "vboxvideo" - what on earth is wrong?
 
  • He is running an Intel I7, you are running a I5
  • He has 16 GB so he must have allocated at less 4 to 6 Gb to the VM, you have allocated 2 GB
  • He can probably run a Sata III + SSD, if you are running a classic hard drive, the controler is overloaded, so it makes a big diff
Wozzeck.Live, the OP corrected the specs of his MacBook in the post #8 of this thread, and quite possibly you missed that one. He is talking about a pretty recent high end MacBook Pro i7/16 GB. Anyway, I own a Mac Mini i5 (End of 2014) with 8 GB of RAM and equipped with an ordinary HD only, and some month ago I tested Xfce4 with FreeBSD 11.2-RELEASE in a VirtualBox on it. While I did not like Xfce very much, I did not experience the slowness either.

I am responding late, because today, I upgraded the VBox installation to the latest ports and packages and to FreeBSD 12.0-RELEASE-p3. Everything including Xfce is running fine and quick, even though, I allocated only 1.5 GB of RAM to the virtual machine. On the Mac, I got attached an ordinary USB mouse and the Appel BT trackpad, both of which work without any delay in Xfce. Except for the following long-standing issue:
Sometimes, I've seen the client lose up to the first three mouse clicks. The latest version on 10-STABLE does not seem to do that, but I have not really paid attention.
For me it´s always the first three mouse clicks after reboot which are lost - and yet we are on 12-RELEASE. I am already used to do a quadruple-click the first time when I actual want to submit a single-click. Every mouse click after this behaves normally. BTW: I followed the advices of wblock@ on informing the VBox Mouse driver to X.org:
Please don't do that any more.
Start the VM. Inside the VM, make sure emulators/virtualbox-ose-additions is installed and enabled in rc.conf:
Code:
vboxguest_enable="YES"
vboxservice_enable="YES"
Remove all old xorg.conf files in the VM. Manually create /usr/local/etc/X11/xorg.conf with only these contents:
Code:
Section "InputDevice"
        Identifier "Mouse1"
        Driver "vboxmouse"
EndSection
 
Hi obsigna,this is so strange. I've tried the Virtualbox/FreeBSD/xfce combo on two Macs now and got the same annoying lag.
Weirdly, the VM is equally sluggish regardless of whether the MacBook in question has a core i7 processor or a core m3 one. No difference at all. Even though the i7 should be about three times faster.
I get the dropped mouse clicks too - but that's the least of my worries.
The Enlightenment desktop runs fine - fast and zippy - but I simply don't like it.
Using virtualbox 5.2 series.
 
Well, recently I updated my Mac to VirtualBox 6, and the actual tests were done with this one. However, that was after I conducted the first tests with Xfce, and which I remember ran fine (in VirtualBox 5.2.?). Did you enable vboxguest in /etc/rc.conf and add the vboxmouse config to /usr/local/etc/X11/xorg.conf conforming to the suggestions in the post of wblock@?

BSD User showed a lot of screen shots, which you said only do reflect the same settings as yours. Please verify once again, that you set the Pointing Device to PS2 Mouse.

Since other DE’s run smoothly, this most probably means that VirtualBox is not the culprit.
 
Hi again obsigna,
Well, when you said virtualbox is not the culprit, it got me thinking and suddenly remembered that I still have kde4 on this VM.
I changed ~/.xinitrc to start kde instead... And against all expectations, it works fine, full speed, just like enlightenment did!
This is an xfce/gtk problem... And it was my low expectations that meant I didn't bother going back to KDE to compare.
I knew my MacBooks couldn't be that useless.
Thanks everyone for all your time. I'll just use KDE in future.
 
Back
Top