no body will cause memory or cpu usage?

wanren

Verified User
Joined
Mar 1, 2010
Messages
29
I have been using DA for several months and everything is working fine. There are several websites being hosted on my server now, I wonder if any website has chance to cause big memory or cpu usage?

Is there some settings to prevent user from causing too much memory or cpu usage?
 
That depends on the nature of the site.... eg. if they use Joomla/etc and have 3,000 users hitting it, then it could struggle - it also depends on the server spec as well.....
 
I've often wondered this ... and a while back I did some research in Apache - came across this - not sure if it's along the same lines as you're wanting - but worth investigating:

top
RLimitCPU Directive
Description: Limits the CPU consumption of processes launched by Apache children
Syntax: RLimitCPU seconds|max [seconds|max]
Default: Unset; uses operating system defaults
Context: server config, virtual host, directory, .htaccess
Override: All
Status: Core
Module: core

Takes 1 or 2 parameters. The first parameter sets the soft resource limit for all processes and the second parameter sets the maximum resource limit. Either parameter can be a number, or max to indicate to the server that the limit should be set to the maximum allowed by the operating system configuration. Raising the maximum resource limit requires that the server is running as root, or in the initial startup phase.

This applies to processes forked off from Apache children servicing requests, not the Apache children themselves. This includes CGI scripts and SSI exec commands, but not any processes forked off from the Apache parent such as piped logs.

CPU resource limits are expressed in seconds per process.
See also

* RLimitMEM
* RLimitNPROC

more information
 
If it's in apache, then it's probably not working for anything run as cgi. Don't most of us now run php as cgi?

Jeff
 
That depends on the nature of the site.... eg. if they use Joomla/etc and have 3,000 users hitting it, then it could struggle - it also depends on the server spec as well.....

Thanks Peter, the problem is that when the server struggles, how can I find out which site or url is causing the problem? Do you have any clue?
 
Last edited:
I've often wondered this ... and a while back I did some research in Apache - came across this - not sure if it's along the same lines as you're wanting - but worth investigating:

Thanks, Ranz,I will look into it further
 
If it's in apache, then it's probably not working for anything run as cgi. Don't most of us now run php as cgi?

Jeff

hi, Jeff. I can't understand your suggestion. Are you referring Ranz's reply? Thanks!
 
hi, Jeff. I can't understand your suggestion. Are you referring Ranz's reply? Thanks!
Yes; sorry I wasn't more clear. If PHP is running as an apache module, then Ranzi's solution should help, but if it's running as cgi, i don't think it will.

Jeff
 
Back
Top