Wednesday, September 05, 2007

Limits.conf

Setting limits on what processes can be very helpful for those testing out various distributions - Gutsy in my case. There will always be rogue applications spawning tens, sometimes hundreds, of same processes due to bugs. And this almost always happens on Alpha versions. So beware. If you're not up to it, DO NOT INSTALL AN ALPHA VERSION!

Here's one of the tips I learned. You see, a bug in KMail caused it to create multiple KMail processes. If you don't set a limit, it'll slow down your system. Worse, your system would freeze rendering it unusable. Here's how you set limits on running processes.

Edit /etc/security/limits.conf as root and append the following lines.

* soft nproc 200
* hard nproc 300

When you hit the 200th process, it'll warn you.
And your system won't allow you to go beyond 300 processes.

This is very, very useful for shell providers. You can even limit a user to 5 or even 2 processes. But for a tester like me, 300 processes is enough. It'll make sure I can run all the programs I need without worrying about rogue apps going nuts all over my system.

Blogged with Flock