
08-31-2007, 05:11 AM
|
|
Mr. Awesome
|
|
Join Date: Jul 2002
Posts: 5,602
|
|
How to limit cpanel hosting accounts by cpu/memory?
Does anyone know how to do this?
I know bluehost.com "sort of" does this. If you use more then x % of the total CPU or memory of the server, then your account will be limited automatically.
(A page is displayed saying that the page you're trying to view can't be displayed because it is using too much resources.)
Does anyone know how they do this?
__________________
Want to sell domain names? Sign up today for an eNom.com reseller account from a trusted eNom ETP provider.
* We provide support and service to over 3245 happy eNom domain name and SSL certificate resellers!
|

08-31-2007, 05:26 AM
|
|
Web Hosting Master
|
|
Join Date: Oct 2004
Location: Kerala, India
Posts: 4,617
|
|
__________________
David | www.cliffsupport.com
Affordable Server Management Solutions sales AT cliffsupport DOT com
iWebManager | Access WHM from iPhone and Android
|

08-31-2007, 05:29 AM
|
|
Web Hosting Evangelist
|
|
Join Date: Jun 2006
Location: Cluj Napoca
Posts: 468
|
|
It's hard to detect a user that will use x% of the total CPU or memory (excluding cgi and other things that he will run from his user, you can limit that with ulimit for example). An ideea is to check apache status regulary and do some math with the results, set a query time limit and check the logs, you can do that automatically mysql has some tools to sort the result a.s.o. I do not think there is an easy way to do it.
__________________
█ IntoDNS - Check your DNS health and configuration
█ IntoVPS - US Fremont and Dallas;EU - Netherlands and Romania VPS hosting
|

08-31-2007, 05:32 AM
|
|
Web Hosting Evangelist
|
|
Join Date: Jun 2006
Location: Cluj Napoca
Posts: 468
|
|
RLimitMem:
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.
Same with the other one. It's ok to do that, but the bigger problem is to limit accounts that lead to high load because of some long mysql queries and too many apache processes.
__________________
█ IntoDNS - Check your DNS health and configuration
█ IntoVPS - US Fremont and Dallas;EU - Netherlands and Romania VPS hosting
|

08-31-2007, 05:52 AM
|
|
Mr. Awesome
|
|
Join Date: Jul 2002
Posts: 5,602
|
|
Looks like hsphere can do this on a per-account and per-plan basis:
http://www.psoft.net/HSdocumentation...resources.html
We're using cpanel, but all our servers run PHP as a CGI (using phpsuexec).
My understanding is that with this setup, using rlimit in each customer's virtual host will effectively limit all the customer's activity, including php/mysql/apache?
__________________
Want to sell domain names? Sign up today for an eNom.com reseller account from a trusted eNom ETP provider.
* We provide support and service to over 3245 happy eNom domain name and SSL certificate resellers!
|

08-31-2007, 05:58 AM
|
|
Web Hosting Evangelist
|
|
Join Date: Jun 2006
Location: Cluj Napoca
Posts: 468
|
|
It will not include apache/mysql. It will include cgi's as it says in the link. cgi's are easy to limit but with that you cannot limit mysql usage or apache usage (load created when serving a page). It will include the php process if it will be executed as cgi. It's a start but far from being what you want.
__________________
█ IntoDNS - Check your DNS health and configuration
█ IntoVPS - US Fremont and Dallas;EU - Netherlands and Romania VPS hosting
|

01-05-2013, 09:15 PM
|
|
Newbie
|
|
Join Date: Jan 2012
Posts: 14
|
|
i dont know if that help ,
but in order to make daily CPU / RAM consumption available for my Cpanel users I make simple script shell that create daily file named : <login>-cpu.html , and put it in user public_html .
The script is available at :
http://50dh.info/create-daily-cpu-peruser.txt
you can easily add suspension if limit are raised ,
any improvements are welcome .
|

01-05-2013, 09:41 PM
|
|
Newbie
|
|
Join Date: Oct 2012
Posts: 12
|
|
Hi @mrzippy
Please let me to share my ideas..
If you want to tweak overall cpu limit, you can use @david510, @50dh and @Cristi4n ideas, or if you hard to understand that tweaks technically, you can install ConfigServer Firewall and edit the cpu limit configuration.
Otherwise if you want per user limitation, you can use CloudLinux + cPanel and you can ask support from them.
Thank you so much
|

01-05-2013, 09:49 PM
|
|
Web Hosting Master
|
|
Join Date: Jan 2003
Location: SLC
Posts: 727
|
|
50dh & HOST QuickBuys you guys realize this is a 5 yr old thread
you brought it back from the dead
just install cloud Linux & be done with it
|

01-05-2013, 09:58 PM
|
|
Newbie
|
|
Join Date: Oct 2012
Posts: 12
|
|
Uh, i am so sorry @HostingBig, i did not notice the that date.. i only read the last post and the top of this thread, if what is the OP issiues...
Sorry....
|

01-06-2013, 08:07 AM
|
|
Web Hosting Master
|
|
Join Date: Nov 2004
Location: Australia
Posts: 1,439
|
|
This is exactly what CloudLinux does, I'm surprised nobody seems to have commented on it.
We don't use it, so I can't comment other than to say what I seem to be hearing is all good.
|

01-06-2013, 08:41 AM
|
|
Mr. Awesome
|
|
Join Date: Jul 2002
Posts: 5,602
|
|
Quote:
Originally Posted by brianoz
This is exactly what CloudLinux does, I'm surprised nobody seems to have commented on it.
We don't use it, so I can't comment other than to say what I seem to be hearing is all good.
|
Probably nobody commented on it, because I started this topic in 2007...
Mods, you can close this thread. Time has fixed this problem. 
__________________
Want to sell domain names? Sign up today for an eNom.com reseller account from a trusted eNom ETP provider.
* We provide support and service to over 3245 happy eNom domain name and SSL certificate resellers!
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
| Postbit Selector |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
| Login: |
|
|
| Advertisement: |
|
|
| Web Hosting News: |
|
|
|