Which services can I close on a low memory system ?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Which services can I close on a low memory system ?
In system monitor, there are numerous processes. Some such as metacity and nautilus are using 12-21 mb memory. Since my server is a 512 mb computer, which services or processes can I safely remove or end ?
The short answer is "Whatever processes you don't need." Unfortunately, the only one who can answer that is you.
1) Identify a process you think you can live without.
2) Learn what it does.
3) Decide if you can live without it, or if it's worth looking for a leaner alternative.
Metacity is probably your window manager, and nautilus is probably your default file manager, which would be needed for certain desktop functions, so those are probably not good candidates. But I'm willing to bet you don't need that bluetooth app.
There are much lighter weight distros than Ubuntu; if you want to stay with Ubuntu, there a much lighter weight desktops (window manager +) solutions than Gnome ...
Distribution can be as important as desktop when it comes to memory requirements. For example, Xubuntu with Xfce uses 50% more memory than Debian with Gnome! For a compact, stable Xfce distro you could try Salix or Vector Standard.
In system monitor, there are numerous processes. Some such as metacity and nautilus are using 12-21 mb memory. Since my server is a 512 mb computer, which services or processes can I safely remove or end ?
Seeing as you're referring to it as a server: get rid of the (ANY) GUI.
That should make a good start.
Is that computer only a server? In other words, do you need a desktop running on it?
If that's only a server you should not need X for anything at all, and much less a desktop environment like Gnome. If you also use that computer as a desktop, you should look for a lighter overall solution. With that amount of ram you shouldn't have problems with any distro, as long as you don't use kde, gnome or xfce and you know how to configure the services that are running.
Either way (if you use it dedicated or also as a desktop) what kind of server is it? What is it supposed to serve? Printing, files, web, ssh, ....? Let us know so we can give better advice.
Unless you are using vino and vinagre together and are using a bluetooth device I would disable the vino server and the bluetooth daemon as they are always starting, also if your not using evolution you could disable the evolution background process.
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233
Rep:
servers shouldn't ever need a gui, i would backup my config files, install a server distribution (such as ubuntu server), without the desktop, install webmin if you need a gui type access (webmin is a web based management), then put your config files back into place. the server install should install a base system + whatever daemons (server services) you need + dependencies, guis on server machines eat more resources than necessary for server management and provide security holes at that, which is why you will almost NEVER, if ever, see a desktop of ANY kind installed on a server farm. After that, as suggested, learn what each service does and (if you have installed webmin, go to the system/bootup/shutdown, checkmark the ones that you don't need and click 'disable now and on startup', this way if it breaks something you can usually go back in and turn them back on)
Wow thank you everyone for your prompt and informative replies. It is a server, I am going to learn how to instal and configure openVPN server on it. That should be its main purpose. But since I am comfortable on windows and new to linux, I thought I could do things easier in gnome. However the last couple of days have been extra ordinary, I have done a lot of tasks and all in terminal, so I think I am going to remove gnome . Thank you for your collective answers. How do I remove gnome and all its updates ?
Last edited by banuazizi; 07-19-2011 at 09:35 PM.
Reason: Corrections
you might do a little web searching to find out what these services do. You probably don't print from your server, or want to run an ftp server, etc... for example:
turn off printing
$ /sbin/chkconfig –level 0123456 cups off
turn off rpc, nfs stuff
$ /sbin/chkconfig –level 0123456 portmap off
$ /sbin/chkconfig –level 0123456 nfslock off
$ /sbin/chkconfig –level 0123456 netfs off
However the last couple of days have been extra ordinary, I have done a lot of tasks and all in terminal, so I think I am going to remove gnome . Thank you for your collective answers. How do I remove gnome and all its updates ?
You don't need to remove Gnome to reduce memory usage; if you change the run level so the system does not start the GUI (sorry, IDK how to do that on Ubuntu but it should be easy enough to find the answer by netsearching) the memory usage will be much reduced. Uninstalling Gnome etc. is only necessary to reduce file system usage.
However the last couple of days have been extra ordinary, I have done a lot of tasks and all in terminal, so I think I am going to remove gnome. How do I remove gnome and all its updates ?
Congratulations! Have a look for /etc/inittab and if you have that it should have a line
id:5:initdefault:
Replace the "5" by a "3" and next time you will boot into the CLI. Keep Gnome, just in case. If you ever want it, you can use the command "startx".
Congratulations! Have a look for /etc/inittab and if you have that it should have a line
id:5:initdefault:
Replace the "5" by a "3" and next time you will boot into the CLI. Keep Gnome, just in case. If you ever want it, you can use the command "startx".
And that will make no difference in Ubuntu (or most other debian based distros).
They consider x a service, and its started in all runlevels from 2 to 5 by default,
and has nothing to do with inittab.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.