by devhwrng · 6y ago · 0 comments
https://cloud.google.com/blog/products/compute/understanding...
Rather than a guaranteed core and RAM as with N1/N2, resources for the underlying host can be dynamically balanced through live migrations, which GCP has already been using for years. Cool solution, and should work to save money for most workloads.
That would be so cool, just adding cores if the load goes up!
You would have to make sure your code has enough threads ready to fill those cores though! (if you use non-blocking async. stuff)
Or is this what they mean it already has?
Edit: thinking more about this it must be really hard and require kernel fixes?
I mean how would linux behave when you add/remove cores and RAM f.ex.?
1) Some things can't scale on more hosts, like say an action MMO with no sharding.
2) Scaling dynamically does not necessarily mean you have to do it unpredictably.
Are you running them as unlimited or standard?
We moved off of T2’s and back to C’s because of the unpredictable behavior under load. IIUC, T3s by default just bill you more instead of CPU throttling, which is a bit better for our use cases, but we haven’t tried them yet.
Yes, but most workloads are fairly unprepared for this sadly. And they're really not ready for memory unplug. (I also miss the days of my multi socket boxes and plugging in CPUs and memory).
What do VM-guest memory-ballon drivers do right now when the host suddenly attempts to reserve more memory than the guest has free? I'd presume the kernel would just consider itself to be in an OOM condition, and start killing processes to free up the memory until it can return OK to the balloon driver, no?
Because, from what I understand, that's closer to the scenario we're talking about here: you're not abruptly yanking DIMMs (like physical memory hotplug); rather, you (the hypervisor) are gracefully letting the guest know that some memory is about to go away, and since you (the hypervisor) have your own virtual TLB, you can let the guest OS decide which "physical" memory (from its perspective) is going away, before it happens.
It used to be a corner stone of power management on mobile devices. The Nexus 5, for example, would regularly run with just a single core online, hotplugging the other 3 off until hit with a load and then brought cores back online 1 by 1 as needed.
That behavior still is in some corners of the mobile world, but increasingly less so.
So the CPU hotplug path is as a result actually a lot more battle hardened than you'd expect, and a lot more consumer software than you'd think ran just fine in that setup without noticing.
This is already possible on ESXi with Linux guests for years now, so it’s certainly a solved problem in some capacity.
And has been possible on KVM (e.g. VirtManager, RHV/RHEV/Ovirt) for years too.
Xen 3 also supported online memory increases (but I don't think CPU).
"Compute Engine can also live migrate instances with local SSDs attached, moving the VMs along with their local SSD to a new machine in advance of any planned maintenance." [1]
[1] https://cloud.google.com/compute/docs/instances/live-migrati...