4 ms·
Turns out to be a somewhat annoying problem at the VM level. Not impossible but complex enough that maybe higher-level solutions like functions are better. Co
by soamv 6y ago
Turns out to be a somewhat annoying problem at the VM level. Not impossible but complex enough that maybe higher-level solutions like functions are better.
Consider memory usage -- but operating systems (and some applications) are designed to grab all the memory they can, and use it for caching etc. So it's hard for the VM host to known when it can grab memory and stop billing the user for it.
But there is this idea called memory ballooning -- you have a little process running on the VM guest OS that grabs lots of memory, but is actually in cahoots with the host, and just tells the host -- "hey I got all this memory, you can take it back and use it somewhere else".
Okay, so doesn't ballooning solve the problem? There are a few problems with it -- you can't balloon when you need the memory, because it's not fast enough. So you have to balloon pro-actively. And you don't know how much to balloon, so you have to guess: do it wrong and the guest OS will start swapping, or it might activate its OOM killer and start killing processes.
So making memory usage follow the application is kinda sorta possible but comes with hairy problems. What about CPU? CPUs usage already follows the application so you could just measure and bill accordingly -- except that nothing is gained if memory doesn't also follow usage.
All in all it's way simpler to get towards this goal with clearly-defined higher level services like Lambda.
- k__ 6y agoAnd even with Lambda you have to decide before. At least powertuning helps here a bit.
- Mandatum 6y agoAnd keep in mind the premium price that follows cloud Functions as a Service. Unless you're running a very intermittent batch job with strict control and security policies, most traditional organisations really shouldn't need to build stuff out on this type of architecture model. If you ops and dev team is less than 5 people, maybe consider this to save on ops costs.. But I think it's fair to say for some orgs, this premium just isn't worth it. And they don't know it until they've been billed millions of dollars over years and finally a CFO/CTO is running cost-cutting programs.
- k__ 6y agoThe idea is that the Ops for a coparable architecture without FaaS is more expensive than just running FaaS and not having to pay or to talk to as many people.
- p17 6y agoI'm interested in CPU core ballooning. I am willing to manually configure my code to ask to increase CPU cores.