Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.