Questions about CPU and ram/swap usage
The 5 minutes CPU average used to be around 10% but recently its been going around 30-40%. Once it hit 160% for a few hours. My question: (1) Do I have to worry about CPU usage? I don't want to be contacted by Linode for using too much CPU. So yea, how much CPU can I use? I know that one response is "if its idle, I can use all of it". But is it ok if I keep using 160%, in a hypothetical situation? I just want to know my limits so I can take action when I need to.
I come from a Shared server where I was asked to leave because of the CPU (our site had grown and we could not use a shared server any longer)
The description for a 512 Linode says "8 CPU (1x priority)". Looks like if there's a 1024 Linode on the same server, they'll get twice the priority and if there's other 512 Linodes, they all share the CPU equally.
Also, (2) that CPU in the graphs is only my own usage, correct? Or is that how much CPU the server is having for all the accounts on it? I mean it would drop down to 0% if I disabled my account.
I'm trying 'top' and its the php5-fpm that takes most of the CPU (web requests for PHP files).
Also, (3) how can I see the live reporting for web access that shows all the current requests with the IP addresses? I want to see what pages are being requested. I might have to check if a spam bot is requesting too many pages and trying to enter data into the wiki. In the past I've downloaded the access logs and ran them through a log analyzer. I might try that again but I'm wondering if there's any 'live' reporting too.
(4) Last question about ram/swap: Out of the 512MB memory or ram, 50-150MB is free. Is that fine? I wonder what I can do over there. mysql takes up 25% of that. Out of 256MB swap, about 90MB is being. When should be I worried for these numbers?
In terms of what is the maximum acceptable CPU usage that you can sustain without Linode complaining, I believe it is currently 800% (as in, they will never complain about your CPU usage)
Optimizing mysql will help with ram usage. I have a config here you could tweak:
40% CPU out of 800% isn't so much of an issue. Worst case senario, we just open a ticket and ask you to optimize your services. The graphs in the Linode Manager show your own CPU usage, not a total for the whole server.
for website access monitoring you could use awstats -
You'll want to try and reduce swap usage as this can slow down your running processes. Reducing your Ram use or upgrading your Linode plan should help with this.
Thanks Mesk, that link isnt working. Another link?
I'll bookmark this thread as a reference for future.