4 ms·
I wonder what software stack choice brings to the table here. Are the differences between the power draws of services written in (equivalent scope & quality) Py
by crispinb 7y ago
I wonder what software stack choice brings to the table here. Are the differences between the power draws of services written in (equivalent scope & quality) Python/jvm/Rust/node of any measurable significance?
[Edited to emphasise empirical interest]
- zitterbewegung 7y agoIn any language I can write efficient or inefficient code. Practically you could make some kind of synthetic benchmark for each language but then you would have to look at the whole system holistically. AMD epyc vs IBM Power vs RISC V vs ARM is going to be one set of things to test. For instance a server that shows google.com vs a server run by Microsoft’s project Oxford doing image classification as a service and a server that runs Reddit are going to have so many variables it’s probably impossible or would require a dedicated engineer(s) to benchmark it. So basically so many systems are so bespoke it would be really hard.
- dilap 7y agoI mean, you do still have to run the software! Take basically any online service and do implementations in Python and Rust -- I guarantee you there'll be a huge differences in amount of power used. Or just run the same thing written in Python and Rust and your laptop, and see which one drains the battery faster.
- wmf 7y agoGenerally energy is proportional to instructions executed so faster software is also more energy-efficient. So yeah, empirically, C/C++/Rust is going to be 10x more efficient than interpreted languages.
- dodobirdlord 7y agoInterestingly, this has been studied. https://greenlab.di.uminho.pt/wp-content/uploads/2017/10/sleFinal.pdf https://greenlab.di.uminho.pt/wp-content/uploads/2017/10/sle... There's a quicker writeup here if slogging through paper's isn't how you want to spend your time. https://thenewstack.io/which-programming-languages-use-the-least-electricity/ https://thenewstack.io/which-programming-languages-use-the-l...
- crispinb 7y agoNice, thanks. I've just glanced through and will have a proper read later. It would I guess be pretty complex to extend these kind of isolated tests to whole real-world installations.