Saving Hundreds of Hours with Google Compute Engine Per-Minute Billing
Wow, I never realized that Google offers per-minute billing.  We have a video decoding, encoding workload, and it has been a major pain point handling it on AWS.  Decoding&#x2F;Encoding 4K video requires quite a bit of beef, with a hefty minimum memory requirement on the order of 3+ GB for h264 encoding.  Less if you use ultrafast preset, but then you pay for larger files and larger egress.<p>So, we can spin up a beefy EC2 (c4.8xlarge or larger) for each video, and get them handled quickly, but we get charged for the full hour which is quite expensive.  All the machines we would target for spot instances have had very rocky pricing lately, so that often doesn&#x27;t save much.  We could spin up less beefy instances, trying to encode&#x2F;decode in ~1 hour so as to maximize economy, but then, obviously, each video takes much longer to process.<p>Lambda would be an okay solution, approximately double the price of equivalent EC2 solutions, while providing two very big wins: granularity and 5 minute encoding&#x2F;decoding time regardless of video size&#x2F;length.  That second point is pretty insane; we could process an entire 4K movie in 5 minutes by unleashing a swarm of Lambdas on it.  The problem is that Lambdas have a max memory of 1.5GB which isn&#x27;t enough for 4K encoding (h264).  Also they have limited disk space, so it&#x27;s challenging to get frames and video in-out (and no FUSE module in the kernel :&#x2F;).  We&#x27;re still experimenting, but even if we do get it to work it will probably be with the ultrafast preset, which is non-ideal.<p>Elastic Transcoder doesn&#x27;t handle decoding&#x2F;encoding, only transcoding, so its a no-go.  We thought to use it in a larger pipeline, like have lambdas sew frames up into a lossless codec, then hand that to Elastic Transcoder to be compressed.  But ET won&#x27;t encode 444 formats, and it incurs the cost of both a lambda swarm and ET, so that&#x27;s not great.<p>Per-minute billing would be ideal.  Now I have to consider whether it&#x27;s worth it to port everything over to Google.  Oh how I wish these companies didn&#x27;t use ludicrous egress pricing to enforce vendor lock-in.