0

So I'm dealing with the performance of virtual machines on my laptop for couple hours now, they are just too laggy and I tried everything. After manually setting nvidia gpu for virtualbox.exe and also setting high performance power plan I got this. Chromium on Kali machine straight up crashed it, got the message "memory could not be read". So chrome being chrome even on Linux or what? It didn't even load the tab, after I tried to go to google.com it just went black screen on the Chromium tab and crashed shortly after. Is there a way to make chrome at least somewhat useable on vm or should I just try other browser?

Fresh virtual machine, guest additions installed. Host 8gb VM 1gb.

  • You forgot to mention two critical facts: 1: how much ram did you assign the vm? 2: how much ram does the host have? This behavior points to system being out of ram. – Lizardx Jul 13 '19 at 3:09
  • @Lizardx my bad. The host has 8gb of ram and the vm is left with standard 1gb, because somewhere on the Stack I've found a highly upvoted comment about not assigning vms more than standard amount of resources apart from vram "because it's enough" – gr0und Jul 13 '19 at 9:56
  • Please do not respond in comments; edit your question to make it clearer and more complete.   P.S. Kali seems to be something of a resource hog; it needs a lot. – Scott Jul 13 '19 at 10:10
1

The host has 8gb of ram and the vm is left with standard 1gb, because somewhere on the Stack I've found a highly upvoted comment about not assigning vms more than standard amount of resources apart from vram "because it's enough"

As your experience shows, whatever other people say, 1 gB is NOT enough to run this system, and that is why Chrome is destabilizing and the system is bogging down, this is classic behavior for a system out of memory.

What each system needs is not a generic, it depends on the programs opened, the kernel version, the desktop/window manager, how many programs are open, how many tabs per browser etc.

When I do vm testing, which I do a fair amount of when needed, I only assign 1 gB to systems running a light window manager, when it's kde/gnome etc, I give 2 gB, but that's only for testing the base system, not actually using it, running firefox/chrome/gimp, or other resource heavy applications.

When you're in the vm, you can readily see what is eating up the ram with:

inxi -tm10

which will give you a list of the top 10 ram consumers, plus the memory available/used totals.

top or htop will also show this information, if you sort the output by memory use. They both also show used/available ram on top:

Mem[... (used to the right)

if you see

Swap[.. being used, that's why it's slow.

If the used percentage is even remotely close to 90% or so before opening chrome, the system will bog down once you open the browser, or whatever else needs ram that isn't assigned and thus forces the system into some type of swap behavior, which I'm not sure how works in a vm.

A quick check shows Kali defaults to using Gnome, and there is no way you can run Gnome with 1 gB of ram. Maybe fluxbox or openbox type window managers, but not kde, gnome, or probably even xfce, unless you don't run any other ram consuming software like chrome/firefox/gimp etc.

Rather than listen to abstract rules for things like how much ram to assign a vm, just test it yourself, and increase the amount until it reaches a point where your workload can perform effectively. There's no formula beyond maybe, if gnome/kde, add 1 gB at least. But that's not a formula either, since the ram consumed can vary release to release, so you want to know this yourself, not rely on rules that can't be made and which should be based on your needs and setup, not a general thing.

To me, anyone using Kali should be aware of such issues to begin with, since it's an expert level distro not meant for casual users.

0

Here is a couple of ideas that may work. I don’t use VM’s so some of these may not work. But you can try these

  • Use Firefox or Opera
  • Clear out tasks in the CPU usage window in the VM
  • Insert more RAM if you aren’t maxed
  • Close tasks in the main OS
  • Allocate more RAM to the VM
  • Delete guests or other users that aren’t used often/necessary
  • Restart the pc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.