About CPU

Ask any Prometeus related question !
Admin
Site Admin
Posts: 490
Joined: Wed Jul 25, 2012 10:54 pm

Re: About CPU

Post by Admin » Tue Aug 21, 2012 8:52 pm

You are excused :)
Give out stock on all plans and we will pretend this incident never existed :P

Admin

NanoG6
Posts: 28
Joined: Thu Aug 02, 2012 1:25 pm
Contact:

Re: About CPU

Post by NanoG6 » Wed Aug 22, 2012 1:27 am

Yes $1 XEN would be nice! :d

jcaleb
Posts: 92
Joined: Fri Aug 03, 2012 8:56 am

Re: About CPU

Post by jcaleb » Wed Aug 22, 2012 9:49 am

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?

unclesal
Posts: 44
Joined: Thu Aug 02, 2012 3:31 pm

Re: About CPU

Post by unclesal » Wed Aug 22, 2012 10:06 am

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:

Admin
Site Admin
Posts: 490
Joined: Wed Jul 25, 2012 10:54 pm

Re: About CPU

Post by Admin » Wed Aug 22, 2012 11:41 am

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

jcaleb
Posts: 92
Joined: Fri Aug 03, 2012 8:56 am

Re: About CPU

Post by jcaleb » Wed Aug 22, 2012 11:46 am

thank you uncle sal and admin.

NanoG6
Posts: 28
Joined: Thu Aug 02, 2012 1:25 pm
Contact:

Re: About CPU

Post by NanoG6 » Thu Aug 30, 2012 9:50 am

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

Admin
Site Admin
Posts: 490
Joined: Wed Jul 25, 2012 10:54 pm

Re: About CPU

Post by Admin » Thu Aug 30, 2012 6:56 pm

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

jcaleb
Posts: 92
Joined: Fri Aug 03, 2012 8:56 am

Re: About CPU

Post by jcaleb » Fri Aug 31, 2012 6:03 am

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.

NanoG6
Posts: 28
Joined: Thu Aug 02, 2012 1:25 pm
Contact:

Re: About CPU

Post by NanoG6 » Fri Aug 31, 2012 8:32 am

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.
Last edited by NanoG6 on Fri Aug 31, 2012 8:35 am, edited 1 time in total.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest