Page 2 of 3

Re: About CPU

Posted: Tue Aug 21, 2012 8:52 pm
by Admin
You are excused :)
Give out stock on all plans and we will pretend this incident never existed :P

Admin

Re: About CPU

Posted: Wed Aug 22, 2012 1:27 am
by NanoG6
Yes $1 XEN would be nice! :d

Re: About CPU

Posted: Wed Aug 22, 2012 9:49 am
by jcaleb
I have a question on KVM CPU. What if for some reason, I left a process running that eats cpu. E.g. a script that continuously convert a video file from one format to another in an infinite loop for a day. Will it abuse the node? Or is it because of good isolation of KVM, will not affect anyone?

Re: About CPU

Posted: Wed Aug 22, 2012 10:06 am
by unclesal
jcaleb wrote:I have a question on KVM CPU. What if for some reason, I left a process running that eats cpu. E.g. a script that continuously convert a video file from one format to another in an infinite loop for a day. Will it abuse the node? Or is it because of good isolation of KVM, will not affect anyone?
CPU is still a fair shared resource as it is I/O, you should take in consideration your neighbours. Since there are a lot of cores on kvm nodes the scheduler does a good job distributing requests among all cores. But if one or more vps run on cpu all the time we can allow this only if that don't affect other users ;)
We have one user which do video transcoding all day , but he asked before and is paying a premium fee for this :mrgreen:

Re: About CPU

Posted: Wed Aug 22, 2012 11:41 am
by Admin
jcaleb wrote:I have a question on KVM CPU. What if for some reason, I left a process running that eats cpu. E.g. a script that continuously convert a video file from one format to another in an infinite loop for a day. Will it abuse the node? Or is it because of good isolation of KVM, will not affect anyone?
Adding to what Uncle Sal said before in order to explain more extensively, KVM does a much better isolation than OVZ, for example. There must be many abusers to kill CPU in KVM since they only have access to a few cores each (sometimes only one for lower plans) and KVM machines have 12-24 cores with hyperthreading, so, if every user has in average 2 cores, we need at least 6 big time abusers to take the CPU down.
Also, because of the limitation in KVM, meaning that I/O access uses a fair share of CPU, I/O abuse is possible, but needs many users to abuse in the same time and use good drivers like the VirtIO ones to achieve serious storage slowdown before the cores allocated to their VPS are slown down to a crawl.
In OVZ, however, due to much poorer isolation, a single user can impact very hard on the CPU and I/O. In KVM we need a combination of abusive users and even then, the host machine can't be easily killed, there are safeguards in place (besides Uncle Sal watching (ab)usage like a hawk).

Admin

Re: About CPU

Posted: Wed Aug 22, 2012 11:46 am
by jcaleb
thank you uncle sal and admin.

Re: About CPU

Posted: Thu Aug 30, 2012 9:50 am
by NanoG6
This morning I tried blitz.io to stress test my VPS, with concurrent 250 user for 1 minute.
Seems like I misconfigured PHP-FPM, 15 parent server and 100 max children causing my VPS to crawl with 80% wa :mrgreen:
ioping also gives me 0.0mb/s, probably when PHP-FPM start using swap :oops:

Image

Re: About CPU

Posted: Thu Aug 30, 2012 6:56 pm
by Admin
Please keep in mind those are not real visitors, but simulated visitors that are "reading" much faster than normal ones. In practice they will put less load. For example, this forum has visitors that read, so 250 visitors a minute will not request a page every second. It will be almost enough to have 250 visitors in 512 MB RAM, for a forum.
If you plan to have hundreds of visitors a minute, say, more than 1k, you should probably consider shared hosting or use a big ass Biz SSD OVZ VPS. Even those will start having problems with thousands of visitors, especially if they "turn pages" fast.

Admin

Re: About CPU

Posted: Fri Aug 31, 2012 6:03 am
by jcaleb
hello, admin

i tried to install sourcefabric airtime to one of my kvm. it seems to be doing 10-30% cpu when i view on htop. is that allright or should i not run it? (icecat + ices is much lighter) or would it affect others? im planning to move it on one of openvz, also.

Re: About CPU

Posted: Fri Aug 31, 2012 8:32 am
by NanoG6
Admin wrote:Please keep in mind those are not real visitors, but simulated visitors that are "reading" much faster than normal ones. In practice they will put less load. For example, this forum has visitors that read, so 250 visitors a minute will not request a page every second. It will be almost enough to have 250 visitors in 512 MB RAM, for a forum.
If you plan to have hundreds of visitors a minute, say, more than 1k, you should probably consider shared hosting or use a big ass Biz SSD OVZ VPS. Even those will start having problems with thousands of visitors, especially if they "turn pages" fast.

Admin
Actually it can handle it. As I said before, I was misconfigured the php-fpm. I set too many servers & children.
When I lower the value of max_children, max_spare_servers, and max_requests, it can handle the same load nicely without using swap.

Image

Even though CPU usage spiked to ~90%, but no swap space being used.