Howdy, Stranger!

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


VPS CPU limits (vps gets shutdown by host).
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.

VPS CPU limits (vps gets shutdown by host).

Hi guys,

I recently moved to an OpenVZ host listed on LowEndBox, moving a vps which we had running on a similarly spec Xen host for the last year with no problems at all. Both vps's are advertised as 512mb/1v-cpu. The reason we moved to the new host was for extra bandwidth.

The vps is used to run php/mysql based script which runs once a day and:

  • reads our supplier websites for data (~2gb bandwidth)
  • sorts the data into categories
  • ftps the zipped up data to our live server.

Which takes anywhere from 3 - 5 hours to run. This was all set up fine, but after running for 1 week on our new host, we were shut down for excessive cpu use. Quoting the host:

"Keep in mind that you were using 10 E3-1240v2 cores with your VPS by itself."

Can anyone shed some light on how/why this is happening? I think it is because we switched to a OpenVZ container, which does not have the same resource limiting functionality. I admit our script does use a lot of CPU/Memory (1 mill records are being sorted), but if it takes 5 minutes or 5 hours, it doesn't matter, it just needs to happen once a day, as it was on our old host. My understanding is it shouldn't matter to our host what cpu/mem scripts we are running, as they should be limited to our VPS container.

Comments

  • RadiRadi Host Rep, Veteran

    Who is the OVZ host?

  • budi1413budi1413 Member
    edited November 2013

    Wait, what? E3 have 10 cores? What the maximum load you produce during the process?

  • maybe you can use cpulimit to limit cpu usage by yourself?

  • He probably meant your CPU load was 10. Is it possible that your last provider just ignored/didn't care about your high CPU use?

  • From my experience xen have better cpu isolation.

  • perennateperennate Member, Host Rep

    My understanding is it shouldn't matter to our host what cpu/mem scripts we are running, as they should be limited to our VPS container.

    It does, since the VPS shares a core and won't be automatically rate limited if the system detects that it is using more than it's fair share for a long duration. What do you mean "shut down"? Did they just reboot your VM or also delete your data?

    Also a few hours every day not a short duration.

  • It is possible because your last host was using Xen you were only provided access to 1-2 cores or limited to 1 dedicated core which prevented your load from effecting the node as much overall. Have you noticed your script finishing more quickly than it was on the other host? I would hope if your using 10x the cpu time it is at least completing that much faster? If you provider can't limit you to less cores, you may consider using cpulimit like @JerryHou suggested. You can then set it to use less of the CPU and would hopefully prevent the abuse situation.

    Cheers!

  • @snowblind data parsing like that takes a lot of resources. If I may suggest, get a cheap dedibox. :)

  • MaouniqueMaounique Host Rep, Veteran

    If time is not an issue, can go with the vps solution but lower the cpu usage by limiting it or asking the host to do it (alternatively, give only one core, but that will lock it solid for the duration).

  • said: it takes 5 minutes or 5 hours, it doesn't matter

    Maybe you can try to use the "nice" command to schedule your script with the lowest priority.

  • MaouniqueMaounique Host Rep, Veteran

    nice will probably not work as it will still hog all available cycles and depending on the number of allocated cores and content switching will still wreck havoc.
    Should be throttled some other way, but indeed, Xen has a much better scheduler.

  • @snowblind is the data in form of delimited text or it is curled directly from life page? If it is delimited, you can make a script to slice the data into smaller chunks and use cron to process it in sequence, so bursting should not take longer than 60 seconds with a 3-5 minutes interval to process each chunk.

  • i think the main problem wasnt what virtualization do you use but who is your host.
    there are some good OVZ provider like futurehosting and knownhost, BUT, if your vps has server load 10. I doubt any provider want to host your vps.
    bytheway, did your first host use ssd or ssd cache? i just think the problem is on disk i/o that made high cpu load

  • drserverdrserver Member, Host Rep
    edited November 2013

    @snowblind
    If you are using lot of cpu, please look at our new XEN offer with dedicated H/T core

    http://lowendtalk.com/discussion/16908/drserver-xen-hvm-1gb-ram-dedicated-h-t-core-30gb-drive-1tb-1gbps-6-5-usd-m

  • AnthonySmithAnthonySmith Member, Patron Provider

    I would suggest that you simply go back to your old host and pay for some extra bandwidth. Xen cpu isolation and scheduler is its best feature imo. Most hosts will not allow you to run a high load for hours and rightly so if it impacts other people.

    Thanked by 1Maounique
  • I had the same issue with LEB providers previously. After migrated to Linode, no more such warning.

Sign In or Register to comment.