Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jun 2010
    Posts
    1

    Default CPU / MySQL queries limitations per user

    Hello,
    We were recently hit by a new problem which we didnt see coming. We have a couple of cPanel/WHM instances running, one of which is hosting only two client accounts. Right until the last client was hosted there, the CPU load as at about 10%. After this guy hosted his website, due to the massive traffic he receives is keeping the CPU at 80-100% constantly. It's a decent machine, with a Q9850 CPU, 4GB of RAM etc.
    Since all our plans have unlimited traffic, we can't do anything about this abuse other that trying to limit his resource usage. So, is there any way to limit the CPU cycles that this user is generating through Apache and MySQL?

    We have optimized my.conf, recompiled Apache with MPM worker and a few other optimizations that don't come out of the box with a freshly installed WHM instance.

    Please let me know if there are any tricks to limit this massive resource usage.

    Thank you.

  2. #2
    Member
    Join Date
    Jun 2006
    Posts
    70

    Default Re: CPU / MySQL queries limitations per user

    Quote Originally Posted by mihai.aldea View Post
    Hello,
    We were recently hit by a new problem which we didnt see coming. We have a couple of cPanel/WHM instances running, one of which is hosting only two client accounts. Right until the last client was hosted there, the CPU load as at about 10%. After this guy hosted his website, due to the massive traffic he receives is keeping the CPU at 80-100% constantly. It's a decent machine, with a Q9850 CPU, 4GB of RAM etc.
    Since all our plans have unlimited traffic, we can't do anything about this abuse other that trying to limit his resource usage. So, is there any way to limit the CPU cycles that this user is generating through Apache and MySQL?

    We have optimized my.conf, recompiled Apache with MPM worker and a few other optimizations that don't come out of the box with a freshly installed WHM instance.

    Please let me know if there are any tricks to limit this massive resource usage.

    Thank you.

    Use CloudLinux, it'll help resolve that problem.

  3. #3
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jun 2004
    Posts
    313
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default Re: CPU / MySQL queries limitations per user

    Quote Originally Posted by xanubi View Post
    Use CloudLinux, it'll help resolve that problem.
    I'm not really certain how that would help in any tangible way, but since you've bumped an old unanswered thread, I'll offer some suggestions.

    Before over-tweaking all of your daemons, first you should figure out what the load is. Is it all userspace CPU load? Or is it disk-bound I/O load? Are you swapping heavily (and thus generating excessive disk I/O load as well)?

    These stats can be gathered from a simple 'top' reading the values for %us (userspace CPU usage), %wa (percentage of the CPU time spent waiting on I/O, typically disk), and xxxkb used under the Swap: row.

    Once you get a better idea of where your resource bottleneck is, you can then formulate a plan of attack.
    NDCHost (ProVPS): Xen VPS / Dedicated / Co-Location
    Contact us for your cPanel Licensing needs! We price match, provide better support, and take care of our customers!

  4. #4
    Member InterServed's Avatar
    Join Date
    Jul 2007
    Posts
    172
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: CPU / MySQL queries limitations per user

    In MySQL 5.1, you can limit use of the following server resources for individual accounts:
    The number of queries that an account can issue per hour
    The number of updates that an account can issue per hour
    The number of times an account can connect to the server per hour
    The number of simultaneous connections to the server by an account

    Check the following link in regard to mysql limitation:
    MySQL :: MySQL 5.1 Reference Manual :: 5.5.4 Setting Account Resource Limits

Similar Threads & Tags
Similar threads

  1. Installing Percona MySQL to track queries per user and table access volumes
    By wizzy420 in forum cPanel and WHM Discussions
    Replies: 14
    Last Post: 07-29-2011, 07:58 AM
  2. How to Suspend user Mysql database Auto if use high cpu & memory
    By onel0ve in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 05-30-2011, 02:31 AM
  3. MySQL queries
    By paszczak000 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 12-23-2008, 10:18 AM
  4. Monitoring User CPU/Mysql Usage on Shared Server
    By hostingmetro in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 08-08-2006, 12:00 AM
  5. CPU/Memory/MySQL Usage user nobody use hig cpu
    By stphosting in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 01-13-2006, 01:22 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube