hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : How to limit cpanel hosting accounts by cpu/memory?
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

How to limit cpanel hosting accounts by cpu/memory?

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 08-31-2007, 05:11 AM
mrzippy mrzippy is offline
Mr. Awesome
 
Join Date: Jul 2002
Posts: 5,607
Question

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!

Reply With Quote


Sponsored Links
  #2  
Old 08-31-2007, 05:26 AM
david510 david510 is offline
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

Reply With Quote
  #3  
Old 08-31-2007, 05:29 AM
Cristi4n Cristi4n is offline
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

Reply With Quote
Sponsored Links
  #4  
Old 08-31-2007, 05:32 AM
Cristi4n Cristi4n is offline
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

Reply With Quote
  #5  
Old 08-31-2007, 05:52 AM
mrzippy mrzippy is offline
Mr. Awesome
 
Join Date: Jul 2002
Posts: 5,607
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!

Reply With Quote
  #6  
Old 08-31-2007, 05:58 AM
Cristi4n Cristi4n is offline
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

Reply With Quote
  #7  
Old 01-05-2013, 09:15 PM
50dh 50dh is offline
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 .

Reply With Quote
  #8  
Old 01-05-2013, 09:41 PM
HQB-Vincent HQB-Vincent is offline
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

Reply With Quote
  #9  
Old 01-05-2013, 09:49 PM
HostingBig HostingBig is online now
Web Hosting Master
 
Join Date: Jan 2003
Location: SLC
Posts: 729
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

__________________
Lowest Host/Empire Technology LLC
Offering Quality Shared, Reseller, VPS servers, and Dedicated Servers
24x7 Tech Support http://empire-hosting.net
cPanel Licenses http://empire-hosting.net/buy-cpanel.html - Dedicated VPS /

Reply With Quote
  #10  
Old 01-05-2013, 09:58 PM
HQB-Vincent HQB-Vincent is offline
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....

Reply With Quote
  #11  
Old 01-06-2013, 08:07 AM
brianoz brianoz is offline
Web Hosting Master
 
Join Date: Nov 2004
Location: Australia
Posts: 1,440
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.

Reply With Quote
  #12  
Old 01-06-2013, 08:41 AM
mrzippy mrzippy is offline
Mr. Awesome
 
Join Date: Jul 2002
Posts: 5,607
Quote:
Originally Posted by brianoz View Post
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!

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
VIDEO: CloudLinux CEO Igor Seletskiy on Hosting Platform Software Whir Tv 2012-11-09 09:36:01
Video: cPanel and Attracta Talk About Integrating SEO Tools into the Hosting Control Panel Whir Tv 2012-08-31 14:10:47
Web Hosting Control Panel cPanel and WHM Version 11.32 Adds Features, Fixes Web Hosting News 2012-04-08 11:51:35
cPanel Launches Version 11.32 of Control Panel and Web Host Manager Web Hosting News 2012-02-15 12:46:33
Control Panel cPanel Launches New Apache Configuration Script Web Hosting News 2011-12-28 19:41:39


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?