I'm setting up VNC on my VPS with 768mb ram. What would be the best setup to save the most memory? Right now I tried Gnome-core with vncserver but it uses a lot of RAM.

I remember having a VNC running on only 512Mb with no problem. But on this new one I'm getting errors all the time because it's used up all my RAM.

  • Run htop, press F6 to sort by memory usage and check what processes are using memory. When you identify these processes we could propose you some replacements.
    – pbm
    Jun 4, 2012 at 20:27
  • cant run htop from VNC, cant start any programs without getting: Failed to fork (Cannot allocate memory) So have to be somthing i can run from ssh session Jun 4, 2012 at 20:33
  • You can run htop from ssh session.
    – pbm
    Jun 4, 2012 at 20:37
  • hmm im just getting "command not found"? Running Ubuntu 12.04 LTS Jun 4, 2012 at 20:41
  • Try top and when it starts press M (Shift + m)...
    – pbm
    Jun 4, 2012 at 20:44

1 Answer 1


From top output that you posted it is clear that you have only 16 megabytes of free RAM.

There is no single process that is using your RAM - GNOME starts many components - and most of the processes that are visible on list comes from GNOME session.

I see two solutions:

  • remove X and use console only environment
  • install some lightweight WM

Depending on the purpose of that VPS you should choose solution. If you want to run on it some services that doesn't need X, and you installed X and GNOME to "simplify" management just remove it. Install mc for file management and mcedit or nano as editor.

If X is required to run some software on VPS remove GNOME and all stuff installed by GNOME (you have cups running on server - it's unnecessary unless you have printer connected to VPS ;)) and install some lightweight WM like fluxbox or fvwm.

  • Perfect! used fluxbox instead, worked like a charm! Jun 5, 2012 at 0:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .