Limiting number of processes: /etc/security/limits.conf vs. /etc/ld.so.preload
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
Limiting number of processes: /etc/security/limits.conf vs. /etc/ld.so.preload
Within a multiuser environment, we are currently enforcing a per user process limit of 40(e.g. also for fcgi processes). This is done via ld.so.preload, that forces the loading of a custom shared library that has been written in C. This library overrides the functions for creating child processes and enforces the process limit.
It works but I'm wondering what are the advantages of this solution and is it better or worse than using limits enforced by pam_limits and /etc/security/limits.conf.
What do you think? I think that this solution might be a lot faster.
Seems kludgey to me ... like using a hacksaw to trim your toenails, sure it'll get the job done but you may not like the result. Also there will be no flexibility, how do you make an exception?
Within a multiuser environment, we are currently enforcing a per user process limit of 40(e.g. also for fcgi processes). This is done via ld.so.preload, that forces the loading of a custom shared library that has been written in C. This library overrides the functions for creating child processes and enforces the process limit.
It works but I'm wondering what are the advantages of this solution and is it better or worse than using limits enforced by pam_limits and /etc/security/limits.conf.
What do you think? I think that this solution might be a lot faster.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.