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 » Fri Aug 31, 2012 8:34 am

10-30% cpu is not a disaster, you need to worry when the VPS is sluggish and has full cpu most of the time when we talk KVM.
In OVZ it is much easier to put strain on the node because of poorer isolation, while KVM has some ways to warn you before load is too high on the node. You will notice full cpu, big io latency and the VPS will be more sitting there waiting than doing anything. In that case you need to stop what you are doing, but if it runs and moves smoothly, you should probably not have to worry, unless it may go out of control when you are not looking because of poorly written apps or sudden increase in visitors/hits.

Admin

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

Re: About CPU

Post by Admin » Fri Aug 31, 2012 8:42 am

NanoG6 wrote:
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.
Well, it depends on how it is testing. If it keeps requesting pages every second, will kill the VPS. Regular visitors will not because they are reading the pages and that takes time. Some simulators are doing better than others in simulating real visitors.
Tweaking is an art, it is not about tweaking in general, but for the specific purpose you will use the VPS. This is why the software does not come tweaked out of the box, because each person will have a different need.
Admin

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

Re: About CPU

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

Admin wrote:
NanoG6 wrote:
Admin wrote: Well, it depends on how it is testing. If it keeps requesting pages every second, will kill the VPS. Regular visitors will not because they are reading the pages and that takes time. Some simulators are doing better than others in simulating real visitors.
Tweaking is an art, it is not about tweaking in general, but for the specific purpose you will use the VPS. This is why the software does not come tweaked out of the box, because each person will have a different need.
Admin
Indeed, I agree with you. It's more like preparing for the worst case.
FYI at that time I wasn't using any cache thingy.
I/O is still nice, no latency and still snappy :)

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

Re: About CPU

Post by Admin » Fri Aug 31, 2012 6:19 pm

If you are using cache with simulators it will alter the results as they are usually requesting the same pages and thus almost always having cache hits. It may last thousands of visitors reading from ram the same pages, but it won't be a real test as visitors don't request the same page unless they follow some reddit link or something.

Admin

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

Re: About CPU

Post by jcaleb » Sat Sep 01, 2012 3:37 pm

how would i know if im doing too much on my vps in terms of cpu and io? just to prevent affecting others.

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

Re: About CPU

Post by Admin » Sat Sep 01, 2012 5:36 pm

A simple top will tell you.
If you see high iowait, high cpu (100% more than just a spike and consistently over 80%), if your vps is sluggish, then you are in the red area.
This is for KVM, of course :)

Admin

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests