4 ms·
Among the core changes is a switch from true resources-based pricing to instance-based pricing, which means that applications written to be as efficient as poss
by stickfigure 15y ago
Among the core changes is a switch from true resources-based pricing to instance-based pricing, which means that applications written to be as efficient as possible to consume minimal resources are now relatively meaningless
The author is completely clueless here.
The GAE change is that "true resources-based pricing" switched from an overabundant, almost irrelevant resource (CPU time) to the actual resource in short supply - RAM.
For web servers, it doesn't matter how much CPU time you use, it only matters how much RAM you occupy. Linode, Rackspace, and most other VPS providers* charge this way. Most server CPUs are sitting around blocked on I/O - especially ones running single-threaded synchronous web servers (I'm looking at you, Rails).
The new GAE pricing is still based on true resources - the ones that matter, not the ones that are irrelevant.
* AWS is fairly unique with a hybrid billing approach.
- ww520 15y agoIf RAM is the one GAE charging for, then they are massively overcharging the apps. Spawning a new process off a parent process takes very little memory. Most of the memory of the child processes are shared with the parent process. That's how Python/Ruby/Perl/whatnot web apps work. They spawn a new process to handle each request because it's really cheap on CPU and RAM to do so. The first GAE instance process on a server would take up fair amount of RAM. The next one takes very little. Yet Google charges for the second one fully.
- Scaevolus 15y agoEach instance on GAE runs on a different physical server.
- ww520 15y agoYou have source for that? Otherwise those must be really pony physical servers cause people are getting Out-Of-Memory error at around 100 megs.
- stickfigure 15y agoI suspect what he meant is that when GAE spins up a new instance of your app, it will try to locate it on a different server. This is a natural way to prevent hot instances from overwhelming a single box in the cluster.
- stickfigure 15y agoThis hasn't been true for a very long time. Back in the olde days of C programs with large code/data segments and tiny heaps it would be true. But things have changed: * In modern interpreted/JITed languages, the "code" is actually data that gets malloced. These segments are not shared. * Modern interpreted/JITed applications eat VAST quantities of heap. They constantly produce garbage, most of which (hopefully) gets culled by the garbage collector. On GAE, even small Python instances typically grow to 30-40MB. Java instances typically hover around 90MB. The actual per-instance reservation must be significantly larger because boxes can never be allowed to go into swap. Figure that Google allocates ~128MB for every single active instance of every single application. It's a lot.
- buff-a 15y agoThe GAE change is that "true resources-based pricing" switched from an overabundant, almost irrelevant resource (CPU time) to the actual resource in short supply - RAM. Except that thats just not true! We aren't charged by MB-hour. We are charged by instance hour. Do I pay less if my app is using only a small amount of memory? Not at all. You may argue that instances are a proxy for ram. Certainly they are. They just aren't a proxy that has useful, meaningful metrics. The rules for when or why the infamous scheduler decides to spin up a new instance is pretty much fucking voodoo right now. Before, I had a metric, and it was directly related to me writing good code. Now, I might as well read tea leaves. So, specifically, I am not complaining about being billed for RAM. If this is the route they want to go (and I understand why), then I my complaint is precisely that I am not being billed for RAM.
- stickfigure 15y agoI'm going to speculate that all instances reserve a fixed amount of RAM irrespective of actual heap usage. I can't speak authoritatively about GAE, but this is how I would design the system. The problem is that while your instance may only use 30MB now, it could grow to 100MB in an instant without warning. Tipping a box into swap would effectively crash all instances present. Oversubscribing RAM is a dangerous game, and I suspect Google doesn't try to play it - they have enough trouble debugging performance issues as it is. So basically, an instance represents a fixed about of RAM. Instance-hours and RAM-hours are the same.
- buff-a 15y agoI'm going to speculate Primary complaint. We are all speculating. We went from measurement to speculation. I can't write performance applications on speculation.