You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Dave Viner <da...@pobox.com> on 2006/10/30 23:18:28 UTC

RLimitMEM, RLimitCPU

from reading the docs on RLimitCPU, http://httpd.apache.org/docs/2.0/ 
mod/core.html#rlimitcpu , it looks like this applies only to procs  
that are _forked_ from apache, rather than the apache children.  in  
the case of modperl, the child proc is the service-er of the  
request.... is there a config parameter which allows me to limit to  
CPU and/or memory of the children?

thanks
dave


Re: RLimitMEM, RLimitCPU

Posted by Dave Viner <da...@pobox.com>.
yup... i think this is exactly what i'm looking for!

Thanks!

dave

On Oct 30, 2006, at 3:07 PM, Perrin Harkins wrote:

> On Mon, 2006-10-30 at 15:02 -0800, Dave Viner wrote:
>> Sorry for not being clear.  Let me try again.
>
> Actually, it's my mistake.  I thought you were talking about
> Apache2::Resource.  Is that what you're looking for?
>
>> The docs appear to say that RLimitCPU will not apply to httpd
>> processes, only the CGI processes (which, i believe, the httpd
>> process fork/execs).
>
> Yes, I think your reading of it was correct.  You need something like
> Apache2::Resource to control the mod_perl resource usage.
>
> - Perrin
>


Re: RLimitMEM, RLimitCPU

Posted by Perrin Harkins <pe...@elem.com>.
On Mon, 2006-10-30 at 15:02 -0800, Dave Viner wrote:
> Sorry for not being clear.  Let me try again.

Actually, it's my mistake.  I thought you were talking about
Apache2::Resource.  Is that what you're looking for?

> The docs appear to say that RLimitCPU will not apply to httpd  
> processes, only the CGI processes (which, i believe, the httpd  
> process fork/execs).

Yes, I think your reading of it was correct.  You need something like
Apache2::Resource to control the mod_perl resource usage.

- Perrin


Re: RLimitMEM, RLimitCPU

Posted by Dave Viner <da...@pobox.com>.
Sorry for not being clear.  Let me try again.

I want to configure my server such that each process (httpd) which  
services requests can consume only a set portion of CPU or memory.  I  
am using pure mod_perl... no cgi, no ssi, and i don't fork any process.

The docs appear to say that RLimitCPU will not apply to httpd  
processes, only the CGI processes (which, i believe, the httpd  
process fork/execs).

will RLimitCPU limit the CPU consumption of httpd processes even if  
they do not fork CGI procs?

dave


On Oct 30, 2006, at 2:25 PM, Perrin Harkins wrote:

> On Mon, 2006-10-30 at 14:18 -0800, Dave Viner wrote:
>> from reading the docs on RLimitCPU, http://httpd.apache.org/docs/2.0/
>> mod/core.html#rlimitcpu , it looks like this applies only to procs
>> that are _forked_ from apache, rather than the apache children.
>
> I'm not following this.  What's the distinction you're making  
> here?  We
> normally use "apache children" and "child processes" interchangeably.
> Are you looking for a solution for processes that your fork from your
> perl code?
>
> - Perrin
>


Re: RLimitMEM, RLimitCPU

Posted by Perrin Harkins <pe...@elem.com>.
On Mon, 2006-10-30 at 14:18 -0800, Dave Viner wrote:
> from reading the docs on RLimitCPU, http://httpd.apache.org/docs/2.0/ 
> mod/core.html#rlimitcpu , it looks like this applies only to procs  
> that are _forked_ from apache, rather than the apache children.

I'm not following this.  What's the distinction you're making here?  We
normally use "apache children" and "child processes" interchangeably.
Are you looking for a solution for processes that your fork from your
perl code?

- Perrin