I am using fly.io servers to encode my videos for video processing. a 1 hour video takes up to 1 hour processing on 8x shared cpu.
Can I do some tweaks to my servers to speed up video processing time?
Side note: I am using 4 encoding servers in Paris and one of them takes up15 min to process a 1 hour video. and the others take 45min. I dunno why? (They are in the same region)
Since you mention using a shared one, I would guess your CPU is being throttled:
Fly do offer a range of “performance” machines instead. I would guess you would get more from them and so your video would be processed faster. Could be worth a try. Then balance the cost vs. time.
Out of interest you could open a ssh console into your machine, then add/run a command like htop (if that’s not available, you could install it) to see your CPU usage while your video is being processed.
From CPU Quotas Update fly is using 1/16th the CPU for shared CPU. Fly does appear to have a burst system. That means if you haven’t been encoding video for a little bit, fly will think you’re just bursting to a higher usage temporarily, and allow it before eventually pulling the performance back down.
You’ll have more stable performance by switching to the performance plans. Switching from shared-8x to performance-1x looks to be about a 2x cost, but you should have 2x the performance.
Additionally, while I understand video processing can be multi threaded, I am not sure all encoders/decoders use multiple cores well. With that in mind, a faster single core server (performance-1x) will get better performance for those circumstances than shared-8x will.