Howdy, Stranger!

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


Shutting down VPS for load spikes. Is that acceptable?
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.

Shutting down VPS for load spikes. Is that acceptable?

karjakinkarjakin Member
edited September 2011 in Help

Hello fellow LowEndTalkers,

I manage a 1Gb RAM OpenVZ container that host a few Joomla domains for a friend. A few weeks ago the VPS started to be shutted down inexplicably (ie no clues in syslog) until after several tickets the provider recognised that they were powering it down because of having load spikes over 3. I analysed munin and SolusVM and load is pretty much 0 and rarely over 1. The provider argues that the spikes are not registered in the graphs before the VPS is shutted down before, doh!

Getting the VPS turned off is really a pain as I have to manually power it on every time . I'm also ashamed for recommending this provider to several friends and colleagues. I've racked my brains trying to find the cause of the CPU spikes, but only with marginal success.

I had the ( maybe false) assumption that, unlike in a shared hosting, a VPS is an isolated environment and I could make use of my allocated CPU slices, and the possibility of exceeding it should not exist. So my questions are:

1) Is acceptable that a provider shuts a VPS down for exceeding CPU usage limits?

2) Do all virtualization technologies (Virtuozzo, Xen, KVM) enforce CPU limits, or is there any kind that I just can use my CPU juice?

3) Do all providers enforce similar policies? My current provider is one of the highest evaluated in lowendbox.com, so I don't really want to migrate the VPS to other provider if the new one will enforce more draconian constraints.

I hope any of the sysadmins here can clarify my doubts.

Comments

  • karjakin said: 1) Is acceptable that a provider shuts a VPS down for exceeding CPU usage limits?

    Absolutely, put the shoe on the other foot, you have a neighbor affecting your service, do you wish to live through their disruption or have their container shut off until they are able to deal with the problem?

    karjakin said: 2) Do all virtualization technologies (Virtuozzo, Xen, KVM) enforce CPU limits, or is there any kind that I just can use my CPU juice?

    Why do you think it is your CPU juice? You share it equally with others on the node, some platforms handle this better then others, but it is a shared resource.

    karjakin said: 3) Do all providers enforce similar policies? My current provider is one of the highest evaluated in lowendbox.com, so I don't really want to migrate the VPS to other provider if the new one will enforce more draconian constraints.

    All providers that are worth using will have similar constraints.

    Thanked by 1karjakin
  • Well, some providers will promise you 16 cores (or some other unreasonably high number) because it sounds good and sells well. Then they will punish you if you actually try to use this. Other providers will offer you much smaller and much more reasonable CPU share and will let you actually use it. But it doesn't sell so well because the customer will usually say "hey provider 1 is giving me 16 CPU cores and for the same price provider 2 is giving me only 1 CPU core".

  • Forgot to add - you should always read the ToS when you order a service and if there is anything which you don't understand - ask the provider for clarification.

  • kylixkylix Member
    edited September 2011

    @rds100: Exactly. Most guys on LEB scream like hell for at least 1 full CPU with a VPS for 15$/year. And offers that clearly state that a VPS in this price range gets 1/2 vCPU quivalent for example to 300-500 MHz are voted down. Sapere aude.

  • If and when you get back up and running, look into turning on whatever caching system Joomla uses. That should help at least some with the load issues.

    Not sure about spikes though.

    Granted I'm in a managed shared hosting environment so if we see this problem, it's something as a provider that I need to deal with and not the client but, yes, I can see where one would get booted for it.

    Thanked by 1karjakin
  • Go59954Go59954 Member
    edited September 2011

    karjakin said: until after several tickets the provider recognised that they were powering it down because of having load spikes over 3

    That may be a little weird. I saw similar complaints but for much higher loads. 3 isn't that high of a load IMHO.

    As it actually goes that way:

    If you have 1 core it means: once you get usage to 1 means 100% CPU usage

    If you have 2 core it means: once you get usage to 2 means 100% CPU usage

    If you have 3 core it means: once you get usage to 3 means 100% CPU usage

    ..etc

    So I wonder how many cores your plan is sold with? SInce 3 isn't that big of a CPU load or spike.

    rds100 said: Well, some providers will promise you 16 cores (or some other unreasonably high number) because it sounds good and sells well. Then they will punish you if you actually try to use this. Other providers will offer you much smaller and much more reasonable CPU share and will let you actually use it. But it doesn't sell so well because the customer will usually say "hey provider 1 is giving me 16 CPU cores and for the same price provider 2 is giving me only 1 CPU core".

    Exactly, and even the more reasonable the number of cores is, the more you can make use of them and more chance to surpass small abuse/spike without provider attention/anger :p since to just one core isn't as effective on other clients compared to a provider giving access to full CPU cores.

    Thanked by 1karjakin
  • Thanks for all the answers, I'm afraid I had several misconceptions about how virtualization works.

    miTgiB said: Absolutely, put the shoe on the other foot, you have a neighbor affecting your service, do you wish to live through their disruption or have their container shut off until they are able to deal with the problem?

    I am more familiar with Amazon EC2 instances (based in Xen), where you are assigned "virtual cores". You can use your virtual cores to their full extent without ever exceeding your allocated CPU and disrupting other users in the node, so I assumed that in VPS the behaivour would be similar and your share of CPU is as "guaranteed" as the RAM.

    drmike said: Granted I'm in a managed shared hosting environment so if we see this problem, it's something as a provider that I need to deal with and not the client but, yes, I can see where one would get booted for it.

    For me it is easier to think in terms RAM usage, so I know how to methodically keep its usage under control, like limit the number of webserver workers or FastCGI processes. Trying to limit the CPU usage is being more difficult. What it pisses me off is that the VPS is shutted down as soon as the CPU exceeds the limit. If there were a "grace period" I could handle it with monit to enable debugging, restarting the services, etc.

    Go59954 said: So I wonder how many cores your plan is sold with? SInce 3 isn't that big of a CPU load or spike.

    "2 x Core Intel processor" , whatever a Core Intel processor means

    You can see the load and memory usage graphs in
    http://imm.io/9f6n (memory, easier to spot the downtime)
    http://imm.io/9f6F (load)

  • You can use your virtual cores to their full extent

    Nothing against the poster but I have to wonder if that's really true. Max out what you're allocated 24/7 and see what happens. :)

  • 24/7 is a different thing :) If it (the CPU) is a burstable resource you should atleast be allowed to burst to it. For atleast 5 or 15 or 30 minutes or whatever.

  • You're most likely running to disk i/o issues that are causing the high load average rather than CPU utilisation. Look at the %wa values in top. You should probably do some more query caching and tweak your my.cnf.

  • Go59954Go59954 Member
    edited September 2011

    karjakin said: "2 x Core Intel processor" , whatever a Core Intel processor means

    You can see the load and memory usage graphs in http://imm.io/9f6n (memory, easier to spot the downtime) http://imm.io/9f6F (load)

    TBH, I don't see something too wrong with it, they might be in reality not very comfortable with your overall CPU usage, not just what they claim as short '3' spikes not appearing in the graph. Since I have seen in WHT someone had their VPS temporairly suspended, for repeatedly hitting around 30 with their CPU! However, it was a managed VPS though.

    If your claimed short-spike is '3' as they say, that wouldn't be too big. It could be your overall usage is what's actually annoying them. Perhaps providers here are able to tell you if that CPU usage for 2 cores is not fair-share?

    And true some providers offers access to a just fraction of a core/s. Like 300 Mhz (in 1 or 2 or 3 cores etc) or 600 Mhz... You may be able to use your 'core' at 100% in such hosts for longer time/whole time (most likely I guess, but better to ask in a ticket).

    Also, are you running a Minecraft server? Since some providers like 123systems offers a VPS plan (not too expensive) customized for just Minecraft users, while it's not alowed in other plans they offer, maybe for the CPU/load issues.

  • Go59954Go59954 Member
    edited September 2011

    Possible way it's being shutdown out of a 3 spike that is not seen in the graph, is if they are having an automated script, so when you go over 3 for an x period of time your VPS gets suspended. If that is the case it could help you:

    • Using a ping service for your VPS, with SMS alerts, there are free like Pingdom.com..etc
    • Optimizing what you are running, perhaps reducing the maximum number of concurrent users etc.
  • kiloservekiloserve Member
    edited September 2011

    karjakin said: 1) Is acceptable that a provider shuts a VPS down for exceeding CPU usage limits?

    It is normal to get shutdown for excessive usage if it is affecting other clients drastically. What isn't normal is that they are not emailing you when they shut you down, that is wrong. You should receive a courtesy email anytime your server is shut down for usage violations.

    Most VPS companies have a "Fair Usage Policy". The definition of what "Fair Usage" is may vary so you may want to review their TOS regarding this.

    2) Do all virtualization technologies (Virtuozzo, Xen, KVM) enforce CPU limits, or is there any kind that I just can use my CPU juice?

    Xen and KVM have better hardware partitioning and are affected less by 1 single user. You are probably on OpenVZ, and if you want better resource granularity, switch to Xen or KVM.

    3) Do all providers enforce similar policies? My current provider is one of the highest evaluated in lowendbox.com, so I don't really want to migrate the VPS to other provider if the new one will enforce more draconian constraints.

    Most providers will notify you if they shut down your VPS. The more overloaded the node is, the quicker you will probably get shutdown. Other VPS providers may be "draconian" in their resource policy but at least they'll send a nice email to you before they whip you.

  • A 3 load spike doesn't warrant a shut down though.

  • Depends on the node, and how long the spike was for. If it was genuinely a spike, and not sustained heavy load, I'd be pissed off if they shut it down.

    Spikes could be caused by something simple and innocent like a backup running in cron. Setup something to monitor the load and log what's doing what.

  • Load average - if thats really what they were using - is a terrible metric to use for this.
    Even allowing for that 3 is not high, especially if it was only briefly.

    I dont know who the provider in question is, but anyone powering down a VPS without letting you know, and failing to disclose this when you raise the first ticket about it doesnt seem like a provider Id choose to be doing business with.

  • drmike said: Nothing against the poster but I have to wonder if that's really true. Max out what you're allocated 24/7 and see what happens

    In this case (Amazon EC2) they actually has pretty bad CPU throttling so I presume that yes, you can max out the process pretty much 100% of the time, but you can't get much CPU juice out from it anyway.

  • Plenty of other ways to detect abuse / high resource usage.

    ps aux | grep, top to name but a few other tools.

  • If the box root does that, will it show the tasks the other roots are doing?

  • kylixkylix Member
    edited September 2011

    The node root can of course see all the processes in his node and the containers.

    Take vzprocps tools from http://download.openvz.org/contrib/utils/. These are usual ps and top utilities (named vztop and vzps to not conflict with the standard ones) with an -E option added. You can use -E CTID option to limit the output to the selected CTID (use 0 for the host system), or just -E without an argument to just add CTID column to output.

Sign In or Register to comment.