Page 1 of 2

Host Slows Down

Posted: 18. Dec 2016, 21:06
by Orestis
Hello,

I am running Ubuntu 16.10 on my laptop(i5-7200U, SSD, 8 GB ram) and I have windows 10 on virtualbox. When I start the virtualbox Ubuntu(host) lags but windows(guest) are fine. I gave 5gb of ram for windows,so I still get 3gb + swap for my ubuntu. Same settings with a 5-6 year old laptop and I had no problems. Can you help me?

Thanks, Orestis

Re: Host Freezes

Posted: 18. Dec 2016, 21:31
by Perryg
Swap is not usable memory. If swap is actually used thing will be really slow. We would need to see the guests log file ( as an attachment ) to be able to tell more.

Re: Host Freezes

Posted: 18. Dec 2016, 21:37
by Orestis
there are 4 log files and they are all very big. Which one should I upload?

Re: Host Freezes

Posted: 18. Dec 2016, 21:51
by Perryg
One that shows the problem. Start the guest and when you see it is making the host slow down, stop the guest ( not saved state ). and post the vbox.log ( not one with a number behind it ). Compress it if it is too large to post otherwise.

Re: Host Freezes

Posted: 19. Dec 2016, 12:38
by Orestis
I guess that's the one

Re: Host Freezes

Posted: 19. Dec 2016, 14:55
by socratis
VirtualBox VM 5.1.6_Ubuntu r110634 linux.amd64 (Sep 14 2016 06:43:10) release log
• You are using the fork/distro version of VirtualBox. Uninstall it and install the official one from https://www.virtualbox.org/wiki/Downloads
00:00:00.322977 Host RAM: 7851MB total, 5860MB available
00:00:00.507379   RamSize           <integer> = 0x000000013b800000 (5 293 211 648, 4 GB)
• You allocated 5048 MB of RAM when you have 5860 available. You're close to running out of resources.
00:00:00.507374   Name              <string>  = "Windows !!!!!" (cb=14)
• Did you actually name your VM with 4 exclamation points? Impressive! I thought it was throwing an error. ;)

• Remove the guest additions DVD after you're done installing the GAs. People tend to forget them and this may cause problems when you're changing VirtualBox versions.

• This log doesn't show any crash or hang or anything out of the ordinary.

Re: Host Freezes

Posted: 19. Dec 2016, 15:27
by Perryg
Actually the log would not show a crash or hang since the OP says the host is sluggish and not the guest. I would say the combination of the Ubuntu fork and extension pack fork along with the high commitment of memory would be the first place to start. As I said swap is not usable memory and if the host swap is in fact being used the host will suffer greatly. You can see by running top or htop in the hosts terminal and see if swapping is the issue. If it is being used reduce the amount or RAM assigned to the guest or add more memory to the host.

Re: Host Freezes

Posted: 19. Dec 2016, 15:31
by socratis
Perryg wrote:since the OP says the host is sluggish and not the guest
Ah, it was the title of the thread that threw me off: "Host freezes". If it is slowdown of the host, something more appropriate then, like "Host increased viscosity"? ;)

Re: Host Freezes

Posted: 19. Dec 2016, 18:17
by Orestis
So.... I installed the original version of virtualbox, didn't change anything. Then I reduced the ram to 3GB and now it is working fine but the guest is slower.... So the log shows that I have 5860 MB of available ram but I have 7,7 GB of ram in total. Is it because the rest 2 GB are used from the host? I had 5gb guest in a 8gb laptop(5-6 years old laptop) and I neve had this issue.

Re: Host Freezes

Posted: 19. Dec 2016, 18:31
by Perryg
It is simple math. If you starve the host by giving almost all of the available RAM to the guest the host will be forced to try and move programs to swap. swap is a hard drive virtual memory ( not RAM ) and runs really slow. Point is you either need to reduce the amount of running programs on the host to free up available memory, reduce the amount of memory given to the guest, or add more memory to the host. The rule of thumb is to not allocate more than 50% of the available memory to a guest. Yes you can allocate more but as you see things just happen and usually not for the good.

Did you look at top or htop in a host terminal yet? It will tell you everything you need to know.

Re: Host Slows Down

Posted: 22. Dec 2016, 12:53
by Orestis
so with htop: CPU:2 processes for virtual box, about 35% each and chrome 8-10% the rest are really small Ram: bigger is Franz(messaging app), weird thing is that htop shows 21 processes for Franz each one consuming 7.1% that doesn't make any sense

Re: Host Slows Down

Posted: 22. Dec 2016, 14:56
by Perryg
I would need to see a new guest log ( as an attachment ) as well as a screen shot of htop when the host is showing the slow down.

Re: Host Slows Down

Posted: 23. Dec 2016, 22:19
by Orestis
http://tinypic.com/r/dgnbyv/9


So this is the log and htop from the last time it lagged. This was under 5gb of guest and 3 gb of host. If I give 4gb to the guest then the host if fine but the guest is a bit slow....

Re: Host Slows Down

Posted: 23. Dec 2016, 22:44
by Perryg
Memory is maxed out and swap is at 1GB so there is no doubt that you have a slow down on the host. You either need to reduce the amount of memory given to the guest or add more memory to the host.
Ultimately you want to never see any swap memory being used as it will always slow things down.

Re: Host Slows Down

Posted: 24. Dec 2016, 16:43
by Orestis
Yes I get that. My questions is how is it possible with a 5 year old laptop to have the same ram configuration and never have problems. The two laptops had Ubuntu 16.10(Unity, Gnome or KDE). It just doesn't make any sense