0

I offered VPS and with virgin Debian it often hangs: simple ssh command responds too long. It is bad :(

I made benchmark for it: every 2 minutes it starts ffmpeg to convert 30 seconds low quality video. Normally it takes 3 seconds, but in hang time about 20 seconds.

Benchmark ffmpeg

Also i pinged VPS every 2 minutes. Graph is same.

Duration of good performance intervals is about 15 minutes, and bad about 25 minutes Ping time

You can play with data https://docs.google.com/spreadsheets/d/1XYQV-5mompcFidOHL7XzbvvrVnjn_ZHnvBaND6RrrVY/edit?usp=sharing

Another server from this hoster

Same situation, but don't critical

enter image description here

enter image description here

How to avoid this situation?

Seems, that neigbour VPS, hosted on same dedicated server periodically starts high CPU loading task. Maybe it is system backup or same task. As i know memory is guaranteed, but not CPU.

Also i have another VPS from this hoster, and it seems ok(it also have same peaks but far less)

Dedicated server is too expensive to this project.

This is hoster independed situation, changing provides is bad idea

  • The hosting company's support should be able to help. Sounds like you're not getting the iops you should be getting. Maybe they can move you to a different host. – David Birks Oct 20 '17 at 18:47
  • @DavidBirks seems, that it isn't hoster-related problem. When i offer VPS, CPU looks like 1x1,1GHz, and seems that it isn't CPU per VPS. It is CPU of dedicated server – Евгений Новиков Oct 20 '17 at 19:07
  • > This is hoster independed situation. Why do you think so? – ffeast Oct 20 '17 at 21:22
  • @ffeast because VPS is shared server, and if i move to another hoster it can repeat. To solve this case i asked my hoster. But nothing stops CPU time to decrease in case of overload – Евгений Новиков Oct 21 '17 at 5:39
  • What type of VPS do you use? – ffeast Oct 21 '17 at 8:30
5

Typically you get what you pay for and relatively cheap hosting providers can only offer their services at a competitive price by overcommitting CPU several times i.e. on a server with 48 cores and 128 GB of memory they can then try to host potentially 100+ 1-core/1GB-memory VPS instances. As long as most VPS's are mostly idle, that works well enough, when too many are running a CPU intensive load that starts to fall apart.

The Linux kernel actually has a dedicated counter that shows if that is happening and how frequently, the "CPU steal time" counter, displayed as %st in top. You should probably start to monitor that from your VPS.

CPU steal time is an involuntary wait where your VPS is trying to run something but the hypervisor doesn't allocate the requested CPU cycles to your VPS but instead to one of the neighbouring VPS's that are also competing for CPU time.

What you can do to mitigate that is:

  • spend more money and go to a provider that won't overcommit and which will offer you guaranteed resources.
  • when you detect a high steal time, terminate your VPS and when you restart/redeploy it odds are that then it will start again on a different server that is much less overloaded.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.