Jump to content

[SOLVED] CPU usage


Azu

Recommended Posts

I would like to make it so that people on my site can make their own pages and other people can view them. 1 question though

 

Please tell me how can I make it so that all of the people's pages cannot use more then 50% all together, and if they do, then it will limit whoever is using the most cpu? I can limit the bandwidth easily but I don't know how to measure the cpu they are using  :-\

 

This should apply to everything their page does(php/cgi/asp etc)

 

 

If you could just tell me a way that I can measure cpu usage and a way to throttle cpu usage then I could do the rest myself

Link to comment
https://forums.phpfreaks.com/topic/37027-solved-cpu-usage/
Share on other sites

I don't think it can really be done unless you allow your users to run there own instance of Apache which would be of major concern. Apache normally runs as its own user apache, so all child processes belong to the apache user.

 

You might be able to do it if your using a cgi install of php but I'm not too sure.

 

Assuming your using Linux (otherwise I can't be of any assistance) take a look at your /etc/limits file or man limits for infomation on limitting a users resources under Linux.

Link to comment
https://forums.phpfreaks.com/topic/37027-solved-cpu-usage/#findComment-176791
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.