I installed Ubuntu with a VirtualBox on my mac. But the more I use Ubuntu, the more I install package, the more it becomes very slow to launch on my VirtualBox. By the way, it makes slow all the apps running on my mac. Is there any other virtual environment more efficient than VirtualBox ?
Before going into detail about Virtualbox, VMware or any other virtualization technology there are a couple of things that need to be checked. When starting to use virtualization one must have the correct hardware or better yet, a more capable and optimized hardware to help with virtualization:
CPU and Motherboard technologies like AMD's AMD-V and Intel's VT-X provide a huge leap in performance over hardware that does not have it, specially in the Input/Output.
Assuming that we have the CPU/Mobo cover, we then look into the amount of memory available. Virtualization requires in most cases that we assign real amounts of memory to a virtualized guest. The more memory assign to the guest, the less memory we have available for the host. So this memory sharing game can improve performance for the guest while lowering for the host or it can be enough to have both running perfectly.
After this, we then have hard disk performance. Is not the same to use a 5400RPM HDD than a 7200RPM HDD than a SSD. The amount of reads and writes the virtualization will do, plus the amount the host will be doing can make the HDD the bottleneck of the problem if the HDD is very slow.
Lastly in the hardware part we have the video and sound card. If the host has an Intel card that can only deliver OpenGL 1.x, we can't expect that the guest will offer OpenGL 4.x. The guest will work with whatever is available from the real graphics card (assuming the virtualization technology and OS allow direct access to the video card). Same goes for the sound.
So taking into consideration the CPU, Motherboard, RAM, HDD and Video/Audio we can play with it and have a virtualized hardware ready host.
If all requirements are met, then we can proceed to see what host OS to use. Some OSes are better at working with virtualization technology than others. Some are even better on specific hardware. The mileage depends on the hardware and OS involved.
With that in mind, in the software department, the guest OS also changes the game. Depending on the OS used in the guest, and the type of OS used in the host, it can have a positive or negative effect on overall performance.
So as you can see there are a lot of variables. Along with everything mentioned above, we also end with the question of:
How will you use the virtualized environment? For what purpose or need?
What virtualization technology is better for me? Virtualbox, VMWare, Parallels (since you mention a MAC), KVM, QEMU, etc...
What version to use and what does each version offer?
Does it repair a bug that affected me?, does it increase or decrease performance?
Will I be using it with a network interface, creating a virtual LAN, accessing a remote PC or offering a remote connection?
What Host is better with a specific virtualization software and what Guest is better for it?
So here are many questions that one must ask before going into the virtualization world.
My suggestions and also to add to your question would be to add the type of hardware you have and what type of use you will be doing with Virtualbox.
Any performance issues with virtualization are generally caused by either having insufficient host hardware, or having a very hardware-intensive host. The virtual environment is rarely an issue. This means that that the physical machine you are running Ubuntu on(your mac) does not have enough resources for a fast boot. You may want to upgrade that machine.
However, certain settings can improve performance. Make sure that under the VM's options, AMD-V/VT-x is enabled, as well as nested paging. If they cause issues, disable nested paging first, then the AMD-V if the problem is not resolved. Also, make sure you have at least 768MB dedicated to Ubuntu. At least 1.5GB is recommended i you have enough RAM in your system. of course, a faster CPU will make booting and running faster.
Another note: Running memory tests in VirtualBox is useless. If there is indeed an issue with your memory, the host would probably crash, not the guest.