Sponsored by Dragon Age: Origins
Follow the Dragon Age: Origins development team on Twitter view!
twitter.com/DragonAge - EA presents BioWare's new dark fantasy epic Dragon Age: Origins. '9/10' from Game Informer.
51 Comments
- DavidGX, on 12/27/2008, -3/+30Good stuff.
- oomfoofoo, on 12/27/2008, -2/+20How did this get on the front page without "ubuntu" in the title?
- diggits57, on 12/27/2008, -4/+21Nice Technology!!
- allocate, on 12/27/2008, -8/+22Very similar to windows where you kill all your porn-related processes.
- int19h, on 12/27/2008, -0/+12Use "bum" :)
- twiztidsinz, on 12/27/2008, -2/+11Master the art of making a ' "For those who dont like two pages, see my reply" and reply to your own post with the story ' post.
You get less buries out of frustration. - ThunderKitty, on 12/27/2008, -4/+13Thanks
- Aurabolt, on 12/27/2008, -1/+8Am I the only one who pronounces "daemons" like this: "day-minns" ?
- MattS, on 12/27/2008, -23/+30Because I cant stand multi-paged forced layout... Article follows:
=======================
Computing News
Banish your daemons for a faster Linux PC
How to manage your machine's background processes
8 hours ago | Tell us what you think [ 1 comments ]
system-monitor-linux
Keep an eye on your system monitor – it's the only way you'll be able to tell if there's any advantage from disabling services
ZoomZoom
<>
In common with other parts of the early Unix operating system, the term 'daemon' gives little away about what its function might be.
A daemon is a task that runs in the background, and there's a small army of them that are started when you fire up your machine. There are daemons for controlling automated tasks, daemons for managing power and CPU use, daemons for printing and daemons for writing the system logs. Some denote their status by ending with the letter 'd', while others prefer the anonymity of names like 'binfmpt-support' or 'brltty'.
Daemons are obviously an important part of the running environment. But there's also a slight problem. Without any divine inspiration, the average Linux distribution can't accurately guess which daemons are going to be of use to you, and which aren't. The result is that they'll normally play it safe and err on the side of caution.
This means that your desktop may include a laptop power management daemon, or Bluetooth tools, neither of which may be of great use. These will still get loaded up and use valuable memory, so you can save boot time and memory by spending a little time pruning your daemons, and fitting them to your own requirements. The trick is knowing which ones to cut.
Services are what most people think of when they consider daemons. They're often started at boot time and run silently in the background – but they don't necessarily need to be lightweight system management processes. There's no reason why complete application suites can't be considered daemons.
Which services are and aren't running is entirely dependent on your distribution and what you're using your distribution for. If you're using a distribution that's suitable for a server environment, it's likely that the Apache web server, along with its school of helper applications, is running as a daemon.
That's a major resource hog if you don't happen to require a web server, and it wasn't so long ago that distributions like Mandriva installed and ran a web server by default. This is unlikely to happen in these frugal times, but there's probably still going to be something you don't need running in the background.
List the possible offenders
There are many ways of listing which services are running, but one of the clearest ways to do so is to use a command line tool called chkconfig. You might need to install this manually through your package manager, but when it's run from the command line, it creates a list of running services and outputs these to the terminal. Running the command on a default Ubuntu installation gave us 93 separate tasks, whereas running the same command on OpenSUSE 11 gave us 83 tasks. The first thing you might notice is that it's difficult to define exactly what each service is responsible for. Here's a cutting from the top of the chkconfig output on our Ubuntu machine:
acpi-support 2345
acpid 2345
alsa-utils off
anacron 2345
apmd on
The service names are listed on the left, while to the right of each is a description of that service's runlevel. Linux, and Unix before it, uses different runlevels to run different services. For example, runlevel 1 is typically used as a single-user system maintenance mode. This might mean there are no network services, and there certainly won't be a graphical desktop.
In the above example output, you can see that the anacron daemon, which handles running tasks at a specific time, will only be running when the system is booted into runlevels 2, 3, 4 and 5. The problem with runlevels is that there's no particular standard across distributions. The only levels common to all distributions are 1 and 6, which are used to halt and reboot the machine respectively. Runlevel 3 in Gentoo is the full multi-user environment with a desktop. That's runlevel 4 in Slackware and runlevel 5 in Ubuntu, Fedora and OpenSUSE.
If you ever want to switch to another runlevel while from within your current session, use the telinit command, followed by the number of the level you want to switch to. It's a good idea to try runlevel 3, for example, as with most distributions this will give you a good idea of the potential speed and memory improvements you can expect after you've gone to the trouble of pruning the services from your system you don't require. That means that you can't assume that our instructions for removing services from one runlevel are necessarily going to apply to your chosen distribution.
Daemon Hill
But before we can get stuck into editing which services we can safely remove, we need to make sure we can get back the default working configuration.
Fortunately, chckconfig can also be used to save the current configuration of services as well as checking those running and their runlevels. Just type chkconfig -A >services.save. This will pipe the output from the chkconfig command into a file called services.save, and if you look at this file in a text editor you'll see that it contains exactly the same output as the standard command.
This makes it a great solution if you can't remember exactly what services were running when you started tinkering with your system, because you can just load up the file and take a look. And as you might expect, you can use chkconfig to start and stop services, as well as changing the runlevels they're associated with.
The command chkconfig sshd off would stop the SSH server daemon, for example, while typing chkconfig sshd --level 23 off would ensure that SSH wouldn't be running when the system boots into levels three and four.
These changes are only made after a system reboot – even if you're just turning a service off. But the best thing about chkconfig is that when you've successfully managed to mess up your services installation, you can pipe the contents of that file back into chkconfig to restore the same services configuration out of the desolate wastes of a broken installation. You just need to type chkconfig -s <services.save.
While chkconfig is a clear and quick way to view your daemons and save their configuration state, we wouldn't recommend its use for enabling and disabling them. There are graphical tools that are much better suited to the task. Ubuntu even includes a basic services editing window that can be opened from the System > Administration menu. But we'd recommend a tool called the Boot- Up Manager (it really is called 'bum' for short).
There are Ubuntu packages, and it's what Yast uses on OpenSUSE for enabling and disabling services. Just look for System Services in the Services section. In Export mode, the Boot-Up Manager lists all the possible daemons on your system, including those that aren't currently running, and enables you to select when each daemon runs and at what runlevel.
This leaves us prepared for the next step – finding out what the various services do, and which are safe to remove. As we've discussed, the number and type of services running are dependent on the distribution you're using. Some have more while some have fewer (Ubuntu), but we'll cover the most likely candidates for removal on most Linux distributions. You should try to disable one at a time, and make sure there aren't any ill effects from the change.
Cron, Anacron and atd
Likelihood that you'll miss it: 3/5
If you've ever used Cron to schedule the execution of a particular task at a specific time, you'll know exactly what the Cron daemon is responsible for. It patiently waits in the background for the correct date and time, before dutifully executing the command held in its configuration files. You can check exactly what Cron is getting up to by looking at the contents of /etc/crontab, and if you're happy to exclude those tasks from your system, you can safely disable Cron. A close cousin to Cron is called Anacron. This can be found running on Ubuntu, but not on OpenSUSE 11. The difference between Cron and Anacron is that Anacron ensures tasks are run even when the system isn't running. It will make sure a backup scheduled for the night before will be run when the machine is turned on. For this reason, Anacron is more likely to be used for system tasks. In a similar vein, you'll find the atd daemon, which controls the scheduling of tasks executed with the at command. This would normally be a non-recurring command that needs to be run at a specific time.
AppArmor
Likelihood that you'll miss it: 3/5
Both OpenSUSE and Ubuntu use AppArmor to beef up security. It stops one compromised tool being able to wreak havoc on the rest of the system. That's definitely a good thing. But if you can be sure that your system is not going to be compromised or at risk because it's not on a network, running AppArmor makes very little sense and you should disable the daemon. Otherwise, we'd recommend you keep it running.
Apport
Likelihood that you'll miss it: 2/5
This is the background crash-reporting service in Ubuntu. You've probably seen it in action when an application crashes, as it's apport that's responsible for the window that appears explaining what's happened, and asks whether you'd like to report the fault to the Ubuntu team. It's a very useful tool for the Ubuntu developers, because it enabled them to get reports from a massive install base where their distribution is being used in all kinds of environments. Apport doesn't have an immediate effect on the user, but if everyone disables it, the rate at which developers add bugfixes and stability improvements may slow down.
Avahi-daemon
Likelihood that you'll miss it: 1/5
Avahi provides automatic discovery of various network services. In theory, it should be a great help for laptop users, as Avahi should simplify the detection of services like printing or file sharing – except that this rarely seems to happen. And it's going to be even less useful for desktop users, as they're even less likely to change their network regularly enough to reap the benefits.
Bluetooth
Likelihood that you'll miss it: 1/5
If your computer isn't equipped with a Bluetooth device, then you don't need to run the bluetooth daemon. Its only job is to wait for remote Bluetooth devices to connect, and pass on those connections to any Bluetooth management utilities that might be running, such as those provided by both Gnome and KDE. While Bluetooth hardware is commonly found on portable devices and laptops, there are relatively few desktop machines with this ability. For this reason, deciding whether to leave this daemon running or disabling it should be easy.
CUPS
Likelihood that you'll miss it: 2/5
CUPS is the printing daemon. It's responsible for picking up print jobs from the various applications you use and sending them to your printer. This obviously means that if you don't have a printer, you don't need to run CUPS.
GPM
Likelihood that you'll miss it: 1/5
All this daemon does is add mouse support for the pure console view. If you run a desktop, you're hardly ever going to need this facility. The only times you might need it is when you need to run your system at a lower runlevel, in which case it might make sense to enable it for runlevels 1 and 2, and not for 3 and 4.
KLogd
Likelihood that you'll miss it: 3/5
KLog is the process that creates your system logs. These are an essential part of any system, especially if your machine acts as some kind of server. But then you have to ask yourself when the last time you took a looked at those log files was. If the answer is 'never', you won't lose anything by disabling this daemon.
NTP
Likelihood that you'll miss it: 4/5
The Network Time Protocol will sync your local clock with the date and time on a couple of remote machines. It's a great way to keep your local time exactly right, and NTP will automatically update your machine for daylight savings time.
Powersaved, Powernowd and Laptop-mode
Likelihood that you'll miss it: 4/5
These daemons are responsible for reducing the clock speed of your CPU when it's not being used. This is useful for laptop owners to get better battery life from their machines. But if you're after maximum performance, these aren't necessary, especially if your CPU doesn't support the stepping functionality. The laptop-mode daemon makes similar adjustments to the hard drive and can also lengthen the battery life of a laptop by setting the spin-down time to a longer duration, for example. If this functionality doesn't concern you, you can disable it.
Background processes
Services aren't the only anonymous tasks running on your system. Just type ps aux to see a list of running processes, or use the System Monitor tool for your desktop.
You'll see the usual suspects running as daemons with root ownership, and the number of processes running might surprise you. There are tasks that have started as your desktop launches, many of which will be a part of the desktop itself. Our standard Ubuntu installation running Gnome showed 36 such processes running, whereas OpenSUSE with the same desktop had 33.
Many of these processes handle things like the Gnome desktop, audio and the Nautilus file manager, but many others should be optional. For - ethana2, on 12/27/2008, -0/+5My advice to everyone: leave all these things alone. If you deactivate these services and forget about it, you'll only be that much more confused when some random thing doesn't work. If your system runs a bluetooth daemon in the absence of a bluetooth adapter, you have a bug to file.
- SpyDerMann, on 12/27/2008, -0/+4Modern distros have advanced a lot regarding boot time. PCLinuxOS boots under 50 seconds, while Mepis boots under 40 secs. And I heard there's a distro that boots around 20 seconds, but forgot the name.
- RetepNamenots, on 12/27/2008, -2/+6It takes Linux Mint just under 35 seconds to boot, and Windows XP just under 50 seconds...
- uRmyHartBstopR, on 12/28/2008, -0/+3>>I don't know... does firefox suck up every last CPU cycle until your restart it ever 2 hours like it does on windows?
It's a browser it caches a lot of stuff.
>>And can you launch multiple instances of foxfire as separate processes?
doing ps aux | grep firefox I only see 1 firefox and the ps command. So it's... one I guess.
>>How about tabs as separate processes?
They're probably threads. It's probably the same as the 2nd question. Why don't you go to a firefox forum and ask instead of digg? Or google. - FreakyPhil31, on 12/27/2008, -1/+4These articles always seem so promising until you realize that all you've accomplished is take away a measly 10 seconds from the boot process which totals more than 65 seconds...
- FreakyPhil31, on 12/27/2008, -0/+3Yes, I have. I don't recall which graphical manager(Enlightment, XFCE) it uses but it's lightning fast. I use Gnome + Compiz because I like eye-candy.
- rootlinuxusr, on 12/28/2008, -0/+3A.K.A. "demons"
- Phocion55, on 12/27/2008, -0/+3Not entirely sure how to break this to you, but the Windows XP kernel is largely written in C as well.
http://wiki.answers.com/Q/IN_which_Programming_lan ...
http://www.certforums.co.uk/forums/showthread.php? ...
Moving on....... - Metasquares, on 12/28/2008, -0/+3The power of root compels you!
- syst3m3ltdown, on 12/27/2008, -1/+4I agree use BUM. it's a graphical editor to anything that starts up, including scripts and services... very usefull
- ScottyMcBaggs, on 12/27/2008, -0/+3ROFL , "don't like me no generic i386 binaries," i'm sure you can tell the difference
http://funroll-loops.info/ - smotpoker, on 12/27/2008, -0/+3I don't understand why there is such a big difference in people's boot time experiences. Linux has always booted faster on nearly every system I've tried (unless it was a live cd or block for network stuff such as mounting nfs shares, sync with ntpds, join wifi network or the like). Most people I've discussed it with experienced the same (faster or same boot times compared to XP) though there are a few cases where XP boots faster.
In the case of Ubuntu, I think it is sometimes slower because it automatically checks for new hardware on every boot (which can probably be disabled somehow). Also, the Linux kernel often uses a single driver for multiple devices which can make it take a bit longer for them to determine what specific model hardware they are interfacing with and react accordingly whereas in Windows, the hardware vendor usually provides a driver that is likely taylored to a specific model/revision of their hardware and doesn't need to check the version or load superfluous driver-code for other models into memory - SmellyGeekBoy, on 12/27/2008, -0/+265 seconds!? Have you tried Damn Small Linux?
- oobuntu, on 12/27/2008, -1/+3thats funny, i always thought it a way of saving resources on your running system, mainly RAM, (but also i/o and cpu to some extent). not all of us are running with many gigs of ram - when my 768mb gets used up, my system grinds to a halt as it starts swapping virtual memory to/from disk.
- inactive, on 12/27/2008, -3/+5I don't doubt that your wrong.
- Dongvid, on 12/27/2008, -2/+4Cool article.
The beauty of Archlinux is that you know what's in your distro. It's like the equivalent to building your own PC versus buying an HP or Gateway or other commercial brand; you get what you want. And no compiling involved like on Gentoo. - matthekc, on 12/28/2008, -0/+2Different languages are good for different things C and C++ happen to be excellent for large system projects.
http://www.linuxjournal.com/article/4402
The point is some languages are better suited to specific types of tasks. - luvdownbabylon, on 01/08/2009, -0/+2there is an extension available for firefox if you use that called AutoPager; it works most the time. though on some pages it seems to loop forever, but is easily diabled via a status-bar icon (click toggles it).
- FreakyPhil31, on 12/27/2008, -2/+4Thanks. I'm downloading Mint-Felicia right now. I've been wanting to try it out for quite a while. Plus my webcam won't work under 64-bit Ubuntu but i'm sure it will with 32-bit Mint.
- eighto2, on 01/05/2009, -0/+2good stuff
- mahadiga, on 12/28/2008, -0/+2I prefer rcconf
- bipolarruledout, on 12/27/2008, -0/+2I don't know... does firefox suck up every last CPU cycle until your restart it ever 2 hours like it does on windows? And can you launch multiple instances of foxfire as separate processes? How about tabs as separate processes?
- ethana2, on 12/27/2008, -0/+2That's what AMD64 is for.
- uRmyHartBstopR, on 12/28/2008, -0/+2Articles goes over few daemons... Is it really going to give that much of a speed boost? Turning off like a few daemons doesn't seem like much. Why not just compile the kernel yourself?
- netRealm, on 12/27/2008, -0/+2Yeah...please people, don't turn your cron daemon off.
- csarak, on 12/29/2008, -0/+2I pronounce it that way. I think it's supposed to be pronounced "DEE-munz" but I like pronouncing it that way to distinguish it from large red minions of the devil.
- RetepNamenots, on 12/27/2008, -2/+3I'm not sure why but Mint, although based on Ubuntu, seems to boot up much faster on my machine than Ubuntu does.
- techdever, on 12/27/2008, -2/+3dugg for effort and for fapping over the comments section
- Aurabolt, on 12/27/2008, -1/+2Here's how to solve this problem: start with a minimal install (a REAL minimal install: Gentoo) and install only what you want from there.
- Jernau, on 12/28/2008, -0/+1One thing not mentioned in the article that will make a huge different in boot time is recompiling the kernel img that is used at boot after altering the initramfs build file. Basically you can remove a few of the hooks that aren't needed for your computer, I found that it sped up my boot process significantly. For instance, if you know that you have a SATA HDD you don't need to be loading the SCSI and PATA modules, so you can remove those hooks. A fairly thorough guide for it can be found here:
http://wiki.archlinux.org/index.php/Mkinitcpio
I assume it's similar with other distributions, but have only personally done this on a Dell Inspiron 1420 running Arch. - YourNameHere1, on 12/27/2008, -0/+1A lot of people use Arch because of the ABS/AUR. So if you like to compile pkgs using C[XX]FLAGS/MAKEFLAGS then you can.
- matx, on 12/27/2008, -5/+6I doubt disabling a lot of these will speed things up.
- SpyDerMann, on 12/27/2008, -3/+4His wrong what?
- CrudOMatic, on 12/27/2008, -1/+2"""And no compiling involved like on Gentoo"""
That was the best part about Gentoo - don't like me no generic i386 binaries. - LostSoul83, on 12/28/2008, -0/+1The other day I followed an article on DistroWatch and installed Ubuntu with just the CLI. I then pulled in Gnome and only what I need and it only uses 137 megs of ram now instead of 250! This is especially great for those of us who have garbage laptops with only 512 megs of ram. I know you can take it one step further and build a kernel with only your hardware supported, but I'm not hardcore enough to do that. :)
- insertnewsn, on 12/28/2008, -0/+1That's how I pronounce it too. Are we both wrong? :-(
- YourNameHere1, on 12/28/2008, -0/+1Arch is both i686 and generic x86_64.... with the option to build your own pkgs and custom kernels using your custom C[XX]FLAGS and MAKEFLAGS for your processor.
With pacbuilder-svn you can rebuild your entire system from source with just one command:
sudo pacbuilder --world --builddeps --keepdeps --verbose
It took about 24hours to re-build about 500 packages.... only 90% built properly, then I had to edit some PKGBUILDs. If I can't build something correctly then I cheat and use the generic binary.
Update with: sudo pacbuilder -Subkve
(I add the edit option just in case for version edits) - FreakyPhil31, on 12/27/2008, -2/+2I have 4 Gb of ram so background processes are not much of an issue. The issue is having too many useless processes loading during boot and slowing down the booting process.
- FreakyPhil31, on 12/27/2008, -4/+4Funny, I use Ubuntu(8.04Hardy) and it's the opposite. Maybe it's time to go green...
- insanebrain, on 12/27/2008, -5/+3tl;dr
-
Show 51 - 52 of 52 discussions


What is Digg?
Browsing Digg on your phone just got easier with our enhancements to the