LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 01-09-2012, 03:23 AM   #1
brianmcgee
Member
 
Registered: Jun 2007
Location: Munich, Germany
Distribution: RHEL, CentOS, Fedora, SLES (...)
Posts: 399

Rep: Reputation: 38
Question 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.
 
Old 01-09-2012, 08:26 AM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644
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?
 
Old 01-10-2012, 10:41 AM   #3
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 669

Rep: Reputation: 134Reputation: 134
Quote:
Originally Posted by brianmcgee View Post
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.
What about using 'ulimit -u'?
 
  


Reply

Tags
fcgi, ld.so.preload, limiting, limits.conf, processes


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] /etc/security/limits.conf and nice Mr. Alex Linux - Newbie 4 02-19-2011 05:44 PM
ulimit and /etc/security/limits.conf chakkerz Linux - General 2 01-23-2011 02:42 AM
etc/security/limits.conf - what does it do? Ken_1969 Red Hat 5 03-14-2010 05:25 PM
/etc/security/limits.conf reverse Linux - Security 4 10-20-2007 04:10 PM
Apache: limiting the number of processes that start up tarballed Linux - Networking 2 09-02-2003 04:33 PM


All times are GMT -5. The time now is 10:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration