Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


CPU limit
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

CPU limit

ChronicChronic Member
edited April 2013 in Help

I'm trying to be a responsible client and I've got a quick question about the CPU limits that I was hoping someone would be able to answer.

If a provider states that I will get 4 CPU cores in a plan, what exactly does that mean? Does that mean I am allowed to bring my server load up to 4.0 and leave it there without repercussions? I'd imagine not since those cores are probably not dedicated to me, but the TOS are usually somewhat vague about this and I wouldn't want to get the service suspended because of a misinterpretation of what the plan offers.

Also, I've looked into the program cpulimit, hoping to be able to limit my own CPU usage to a reasonable amount. Would that do me any good? If so, is there any more appropriate software for the task?

I apologize in advance if I missed an existing thread on this topic. I tried my best at searching through the forums to see if this was answered before.

Comments

  • Generally speaking, it means that you have access to 4 CPU cores however a fair-usage policy still applies.

    Compiling something from source whilst installing something? Fair enough.
    24/7 video encoding? Not so good.

  • @Chronic said: If a provider states that I will get 4 CPU cores in a plan, what exactly does that mean? Does that mean I am allowed to bring my server load up to 4.0 and leave it there without repercussions?

    No. Basically think of it this way.

    You're given access to 4 CPU cores whenever you need them. Use them whenever you need it but don't constantly take up all 4 cores all the time.

    @Chronic said: Also, I've looked into the program cpulimit, hoping to be able to limit my own CPU usage to a reasonable amount.

    Never really looked into it, but maybe possibly worth a try.

  • @Chronic said: cpulimit

    It works great sometimes and other times it doesnt work well at all. I have often seen cpulimit using more than the actual proces

  • @Chronic said: Also, I've looked into the program cpulimit, hoping to be able to limit my own CPU usage to a reasonable amount. Would that do me any good? If so, is there any more appropriate software for the task?

    If you find anything working please let me know. I got some things I would like to run 24/7 (or atleast more than a few hours) but don't want to slow down the node.

  • HalfEatenPieHalfEatenPie Veteran
    edited April 2013

    @taronyu said: If you find anything working please let me know. I got some things I would like to run 24/7 (or atleast more than a few hours) but don't want to slow down the node.

    I like people like you. Being all responsible. Same with @Chronic.

  • In a related question.
    What about using Folding@home or other similar software with

    • Low priority
    • Just 1 or 2 for each 4 cores
    • With cpulimit running

    Is good? Or the provider should kill me xD

  • HalfEatenPieHalfEatenPie Veteran
    edited April 2013

    @yomero said: What about using Folding@home

    Oh geeze. I love the reasoning behind Folding@home, but personally I dislike the effects of it on the server itself.

    To the main server itself, I (personally) feel (therefore this isn't really related to Catalyst's own perspective much) that Folding@home is categorized as "abuse". I love the purpose it represents but its more of a job for a dedicated server and not of a VPS. Even while reducing it to lower priorities I still find it too big of a resource hog and a risk to allow it.

    Its basically like having a neighbor who to find a cure for cancer but has to play loud music the entire time 24/7. You love that he's doing it for a good cause but you also wish you could operate on your own property without an annoying neighbor. Ok... yeah that was a horrible analogy, but basically it's too big of a risk issue (personally) to allow it.

    Now, like I said this is all personal and just my opinion. To those of you who go "but we're helping with research!" that's nice but fair use still applies. I still remember reading a while ago on LET about a client who bad-mouthed a provider just because they didn't allow Folding@home on a VPS (and how that provider wants cancer to win or something).

  • @HalfEatenPie said: and how that provider wants cancer to win or something

    Your comment gave me cancer Pie ¬_¬
    j/K

    Yes I know, and that's why I wonder if is ok to do it with that limits around.
    For example, apparently a lot of people use this kind of software at Linode, so maybe Xen hosts with better cpu scheduling can allow it... dunno

  • ChronicChronic Member
    edited April 2013

    @taronyu said: If you find anything working please let me know.

    Unfortunately cpulimit doesn't seem to work in my particular example where I'm trying to limit the usage of a Java process. I set it to 100% but the usage still reaches twice as much. I'll be looking for alternatives.

    @yomero said: What about using Folding@home

    I always considered Folding@Home something you would do on your home computer when you are not using it, not something you'd actually dedicate a server towards. Thus the "@Home" part.

  • @HalfEatenPie said: I like people like you. Being all responsible. Same with @Chronic.

    Well, I'm currently with Ramnode and Ipxcore and both deserve the respect for their work. I just don't understand how people are so stupid to think they are allowed to use their 4 cores 24/7 :')

  • @chronic what environment are you running Java within such that cpulimit isn't effective? OVZ, Xen, KVM, dedi, other?

  • jarjar Patron Provider, Top Host, Veteran

    Here's how I handle high CPU use. I'm just going to explain my entire philosophy behind it. I'm sure other providers are roughly the same.

    It depends on the process. Everything has to depend on the process. If its MySQL, I'm opening a dialogue after a couple days. If its Firefox at 100% CPU, 24/7, I'm opening a ticket notifying you that it is considered CPU abuse and your options are to cut it out or accept my resolution (which will be to limit your container to somewhere around 10-20% of a CPU core). Sometimes I'll run cpulimit, but I think I'm going to stop that and focus more on working with the client or simply limiting the entire container.

    The reaction has to be tailored to the situation. I'm not new, I know what's necessary and what isn't. I know what the difference is between httpd and transmission-daemon. So as a provider I have to take into account that some things are more deserving of CPU than others. You providing a legitimate service is something I want to help you with, not kick you down for. Playing FarmVille in Firefox over vnc for 14 hours? Only you deserve to feel any negative impact over that. Blanket policies just don't work here. The word "fair" is as relative as you can get.

    @yomero Personally speaking, I'd ask you if you minded a permanent limit of somewhere around 30% of a core. Obviously though I could only do that a few times per node. Whether it be linode, xen, or whoever or whatever, every node only has so much CPU to go around. If you're locked in, that's just that much less for everyone else.

  • @jarland said: Personally speaking, I'd ask you if you minded a permanent limit of somewhere around 30% of a core

    30% of one core in these modern processors is a good amount. Is around the same that I use for my gameservers in peak hours n_n

  • @craigb: I'm running it in OpenVZ.

    @jarland: Thank you for the explanation.

  • I <3 @jarland. He's totally not forcing me to write this.

    Just kidding.

    But yeah Jarland basically summed it up there. That is how we operate.

  • perennateperennate Member, Host Rep
    edited April 2013

    @taronyu said: I just don't understand how people are so stupid to think they are allowed to use their 4 cores 24/7 :')

    If you don't know that you don't have four cores dedicated or other stuff about how VPS works, then it's reasonable to think that you can use the cores fully and all the time. And I don't think it's stupid to not know that information if you just want a server, even if that means you skipped reading some of the AUP. Problem is when they complain after provider explains to them and tells them to stop.

  • @jarland said: It depends on the process. Everything has to depend on the process. If its MySQL, I'm opening a dialogue after a couple days. If its Firefox at 100% CPU, 24/7, I'm opening a ticket notifying you that it is considered CPU abuse and your options are to cut it out or accept my resolution (which will be to limit your container to somewhere around 10-20% of a CPU core). Sometimes I'll run cpulimit, but I think I'm going to stop that and focus more on working with the client or simply limiting the entire container.

    How would you know what is running?

  • FranciscoFrancisco Top Host, Host Rep, Veteran

    @jcaleb said: How would you know what is running?

    OVZ processes show on the hardware node.

    We have an automated system in place that automatically montiors node loads, as well as processes that break our TOS (bitcoin miners, etc). Processes that are being abusive of CPU are rate limited automatically. The system then alerts us when it happens over a private messenger service:

    [06:24:57] lv-node47 says:
    Process ID 43610 (mysqld) from CTID 13963 using 111.29% CPU. Triggered action cpulimit (80%)
    [07:56:08] lv-node60 says:
    Process ID 311764 (mysqld) from CTID 18906 using 112.50% CPU. Triggered action cpulimit (80%)
    [15:00:53] lv-node22 says:
    Process ID 510228 (java) from CTID 16610 using 137.07% CPU. Triggered action cpulimit (80%)

    Stallion 2 will have all of this merged in as an alerts system so users will know what's up as well.

    We felt it was a far more reasonable system to deploy than having to suspend someone because their java/mysql is eating 4 full cores non stop.

    Francisco

  • @Francisco said: Processes that are being abusive of CPU are rate limited automatically.

    Immediately, or do you allow for a short burst in activity?

  • FranciscoFrancisco Top Host, Host Rep, Veteran

    @Chronic said: Immediately, or do you allow for a short burst in activity?

    if you go over a certain thresh it's limited to a set % (in those cases, 80% of a core).

Sign In or Register to comment.