4 ms·
Just write efficient software, then you won’t need that many servers.
by aaaaaaaaaaab 4y ago
Just write efficient software, then you won’t need that many servers.
- michaelmior 4y agoWhile this is true to a degree, development costs also come into play here. Let's simplify the problem a lot for a moment. Suppose the only thing you care about is cost and the only things you can control are the hardware you're running on and the code it runs. You can optimize your code to use less hardware, which would lower operational costs. But you also have to pay developers to optimize the code. In some cases, it may be more cost effective to run less efficient code rather than pay for the development time to optimize.
- nerdponx 4y agoI do sometimes wonder about the global cost to run Python and Ruby versus equivalent but literally-more-efficient programs that otherwise do the same thing in e.g. Go or Nim.
- aaaaaaaaaaab 4y agoYou can pay lots of mediocre engineers mediocre salaries to ship tons of inefficient mediocre code. Or you can pay a few rockstar engineers high salaries to ship small and efficient software. Basically the WhatsApp model.
- tgv 4y agoWell, let's play that game. 0.22€/kWh. So a 1kW server costs almost €2000/year. If you write Python vs. Go, the performance increase can be 10 fold, so you'd save €1800/yr. So when you're running 55 Python servers, you could earn 1 dev by rewriting (assuming €100k/yr, all in). Not to upset anyone: there are a lot of assumptions. It's just ballpark numbers. There's a large difference between Python v. Go for tensorflow and as a Django backend.
- michaelmior 4y agoSwitching languages is highly impractical for most teams. It is possible in some scenarios code written by an experienced Go developer is 10x faster than code written by an experienced Python developer. However, I think it's unlikely that a team writing Python is going to be able to write Go code which is as efficient as an expert Go developer. Even if they could, I think the productivity (in terms of being able to quickly implement features) of writing Python is significantly higher than Go. If only for the massive amounts of existing packages available, not including the language itself. I don't think this loss would be made up by a single additional developer. I'm certainly not saying that's not possible to have a highly productive team of Go developers. But I think expecting a team of Python developers to become Go experts is not likely to work well. (Dropbox potentially being a notable exception, although I don't know how they navigated this change organizationally.)
- mikedelago 4y agoEvery algorithm I write ends up being O(2^n)
- yread 4y agoThat could just be because your inputs are very small
- rozenmd 4y agoSame vibes as "I would simply write bug-free software"
- cbg0 4y agoIf you're operating at a small scale of a few servers (like most people using Hetzner), re-engineering the code that you already have to be more efficient will cost considerably more than paying your server bills for a year.