Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Ubuntu Server installation on VirtualBox since I am a Mac OS X user and I want to launch some Linux-dependent programs on Ubuntu rarely by connecting it via SSH. Therefore I want to make a fine tuning to Ubuntu installation (not as much as changing the kernel) to consume less system resources.

On the idle state (no ssh clients connected, no intentional user programs running) it consumes about %2-2.5 CPU and 450 MB of RAM.

I'm looking for ways to decrease this. Main purpose is to develop some C programs using vim and gcc.

share|improve this question

migrated from Jul 12 '11 at 2:58

This question came from our site for system and network administrators.

A few ideas (maybe a bit obvious):

  • Use 32-bit if at all possible, 64-bit uses more RAM
  • Stick to CLI environment (do an expert install from alternate ISO)
  • Suspend it when not in use! This is the best way to conserve RAM and it only takes 5-10 seconds to bring it back up.
share|improve this answer

Look at services you don't use, and remove them. CUPS comes up to my mind. Desktop helpers like wheather-plugin and so on.

share|improve this answer
there's no desktop environment. this is ubuntu server. how can I see running services? – ahmet alp balkan Jul 12 '11 at 4:30
runlevel to detect the current runlevel. ls /etc/rc2.d/ if the runlevel is 2, for example. ps shows the running processes. In most cases, daemons will end in a d like cupsd, sshd but not always, and not all processes ending in d are daemons. – user unknown Jul 12 '11 at 11:33

Depending on the demands of your applications the Ubuntu Server requires a minimum of 128 MB RAM. So this is the minimum of RAM you should give to your virtual machine. Further steps to reduce resource usage may be:

  • After having launched a virtual machine terminate Virtual Box Manager to free system resources.

  • To further reduce RAM usage there also is a possibility to run Virtual Box in headless mode by issuing:

    VBoxManage startvm "VM name" --type headless

    By this you will only have access to your virtual machine over a RDP protocol (PUEL-Version of Virtual Box required!). The Virtual Box Manager and GUI elements will not be launched.

  • Of course you could also purge all unwanted applications from your Ubuntu Server installation but this will only free some hard disk space (which should not be a relevant issue nowadays).

  • As has aready be mentioned some unwanted services may be removed but this could affect system stability.

If you need a very lean Linux system you may consider to go the other way by choosing a distribution that installs only a basic OS where you need to add (rather than remove) all applications needed.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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