ubuntu server on virtual box, slow performance troubleshoot

1

1

I run Ubuntu 14.02 headless server on a Virtual Box. I ssh into the box using Cygwin. I use screen, it has ~6 tabs open.

In the first tab I run ember serve. It watches files for changes, and serves them on web server. Other tabs run emacs. When I hit save on emacs, the browser in my host refreshes (by ember-cli).

In average it takes ~1 second to refresh the page almost instantly. But sometimes it takes ~7 seconds to refresh the page, and emacs slows down too.

What could cause this problem, how can I detect and fix it?

VirtualBox Settings:

  • Base Memory: 512MB

facebook

Posted 2015-06-04T11:54:21.523

Reputation: 159

Answers

0

By far the most likely explanation is that you have too little memory,

You find out the use of your Ubuntu memory by means of

 # free -m
             total       used       free     shared    buffers     cached
Mem:          7863       4007       3855        308        303       1710
-/+ buffers/cache:       1994       5869
Swap:         6143          0       6143

Check the size of the used swap, 0 in my case because I have 8GB of memory and I am doing nothing at this time. If instead your swap is fully used, as I presume, your VM is spending all the time swapping pages in and out of memory, slowing down you system.

Increase the size of the VM's memory by clicking on its name, then System, then Base Memory.

MariusMatutiae

Posted 2015-06-04T11:54:21.523

Reputation: 41 321