CPU / Memory / Swap usage.
I've currently got a Linode 360 that I'm using as a game server. Currently SRCDS (Left 4 Dead). I just had a few questions about some things.
CPU:
In the dashboard cpu usage graph, I'm seeing cpu peaks of only 50%. Is this 50% of my 'allotment' of the host cpu(s)? If so, I assume I'm 'playing fair' as long as I'm not exceeding 100%? I understand the cpu is burstable, I just want to make sure I'm not constantly needing / using the burstability. Off on the right, the host summary for cpu says it's averaged 4% of one host cpu for the month. The server's only been up for about 3 days, so I don't know if that number is accurate. Is this number the percentage of cpu that should be always available to a linode, or a percentage of total host cpu time? Host machines have 4 cpu's right?
Memory and swap:
At some point, I will be upgrading to a larger VM, but in the meantime.. It does seem to be using a fair bit of swap, but I haven't noticed any slow downs. Is there a way to tell if it's swapping something out and leaving it, or if it's hammering the swap? Here's free -m: (I know the swap is fairly large, but I had a feeling it might need to swap something out, and leave it swapped out.)
total used free shared buffers cached
Mem: 360 349 11 0 0 68
-/+ buffers/cache: 279 80
Swap: 511 91 420
I with I could trade in some disk space for more memory. I'm using less than 4gig currently, but could definately use more ram.
Ohh, and DiskIO. I'm not sure what's 'normal'. I'm at an average of 270. Normal peaks are around 1,000. I assume this is acceptable for a 360?
Thanks..
8 Replies
I was under the impression that recent host machines have 8 cores (dual quad), only 4 of which get exposed to any given virtual machine. That way, no single virtual machine can monopolize the host's CPU. I might be wrong, though.
If you still have 80M of RAM left, and disk IO averages 270, and you aren't experiencing any obvious slowdowns, then you're not thrashing (or "hammering") swap. Your kernel is probably just swapping stuff out and leaving it there. If you were actively thrashing, your disk IO would probably be in the ten thousands. A little more RAM might help reduce your IO, but if the machine feels responsive enough, don't bother.
In other words, if there's 8 cores total, 800% would be max for the entire node? And if I'm using 1/16 of that, isn't that more than the 1/40th a 360 linode should be entitled to? That would mean I am 'dipping' into the cpu burst then I guess. (800% / 40 '360's is 20% average?). I realize the node might not have all 40 vm's active. But worst case senario, each 360 linode would get 20% of one core?
Sorry for all the numbers, I just thought that 100% on the CPU graph would be 100% of MY nodes entitlement.
The graph graphs your usage of CPU. So if you see 50% for an hour, that means that your Linode was taking about 50% of one CPU's attention. If you saw 375% for an hour, your Linode is taking 3 and 3/4 CPU's attention.
As for "entitled use", with 40 nodes per host, 8 cores, and 4 available to each guest, the minimum CPU utilization would be 1/20th of the host's CPU time. Xen (at least in Linode's setup) doesn't pin guests to individual CPUs, so it will try its best to share the load among the CPUs.
Strictly speaking, yes, you're dipping into your "burst". You get it only because not all VM's are active at the same time. But then, it is very rarely the case that all VM's go hyper at the same time anyway. (The host load graph on the right side of your dashboard usually says "low" and only occasionally "medium", right?)
Enjoy your burst when you need to; just mind your averages over time
@mwalling:
As for "entitled use", with 40 nodes per host, 8 cores, and 4 available to each guest, the minimum CPU utilization would be 1/20th of the host's CPU time. Xen (at least in Linode's setup) doesn't pin guests to individual CPUs, so it will try its best to share the load among the CPUs.
Understanding that Xen does not cap me into a CPU hard limit… then in the spirit of good neighbor practices… on a 360 plan people should try to level the persistent load at about 5%, with obvious bursts during heavy activity?
If you're always averaging much higher over long periods of time, should one be concerned about getting a notice from linode?
@Noice:
@mwalling:As for "entitled use", with 40 nodes per host, 8 cores, and 4 available to each guest, the minimum CPU utilization would be 1/20th of the host's CPU time. Xen (at least in Linode's setup) doesn't pin guests to individual CPUs, so it will try its best to share the load among the CPUs.
Understanding that Xen does not cap me into a CPU hard limit… then in the spirit of good neighbor practices… on a 360 plan people should try to level the persistent load at about 5%, with obvious bursts during heavy activity?
If you're always averaging much higher over long periods of time, should one be concerned about getting a notice from linode?
If I understand the numbers right, it's not 5%, it's 20%. Your node has access to 4 cores, so 400% max cpu usage. The host has 8 cores total, so 20 nodes on the first 4, 20 on the other 4. 1/20th of 400% is 20% worst case senario.
The last 24 hours for me was 18.5% average. Bursts to 50% though. CPU bursting is a very good thing.
I imagine averaging way more than 20% (on a 360) over a long time might not be the best thing, but Xen is only going to give you more than 20% IF IT CAN. If other nodes are really busy, you're only really guaranteed 20% (of one core). If this would happen, getting a bigger VM would get you a larger guaranteed cpu share.
Host Summary, Host Load has always said idle for me, whether I'm using 50% cpu, or 0%. I'm not sure why.
It's always nice to have a target in mind, makes planning out scalability much nicer. I'm looking down the path of a 720 and a 360 in one DC and another 360 in another DC… so this helps me know some more quantifiable targets to work around (albeit hearsay-ish).
Thanks for letting me drop into the useful and timely discussion.
@titan_rw:
Host Summary, Host Load has always said idle for me, whether I'm using 50% cpu, or 0%. I'm not sure why.
AIUI, the host load information is useless in Xen, since it shows the dom0's load, which isn't affected by the domUs. Or something like that, anyway.