Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Efficiency Paradox and How to Save Yourself...

The Efficiency Paradox and How to Save Yourself and the World

Inefficiency is ruining our planet and our lives. Efficiency is ruining our happiness, and weirdly, it’s also ruining our efficiency. Heeeeelppp!? What’s a techie to do? In this talk, Holly walks through a range of techniques that can be used to find and eliminate software waste and reduce climate impacts. For example, zombie servers and slow code are a big climate problem, but the vrrrooom model gives us double-win hope.

But machine efficiency isn’t much use without human efficiency. The good news is that there isn’t as much of a tradeoff as you might think between these two types of efficiency. Sorting out machine efficiency often helps humans, too. For example, the Quarkus Java framework uses many interesting waste-reduction techniques. These optimisations have the dual benefit of speeding up computers, and also speeding up people.

So far, so good, but we need to be careful we don’t end up accidentally optimising the wrong things, and making stuff worse. 100% utilisation is not sustainable for either humans, or people. It’s not even very efficient (remember the paradox part?). It turns out, thinking about efficiency needs systems thinking. Holly will draw lessons from performance engineering, mathematics,economics, and psychology to give guidance on how to achieve more by doing less.

Holly Cummins

April 07, 2025
Tweet

More Decks by Holly Cummins

Other Decks in Programming

Transcript

  1. @holly_cummins #RedHat now senior principal software engineer helping to build

    Quarkus 2007 let’s make garbage collection more efficient!
  2. @holly_cummins #RedHat now senior principal software engineer helping to build

    Quarkus 2007 let’s make garbage collection more efficient! 2015 lean and xp makes your team more efficient!
  3. @holly_cummins #RedHat now senior principal software engineer helping to build

    Quarkus 2007 let’s make garbage collection more efficient! 2015 lean and xp makes your team more efficient! 2022 quarkus is wonderfully efficient!
  4. @holly_cummins #RedHat what we sold “this provisioning software is broken”

    10 minute provision-time 3 month provision- time what the client thought they’d got
  5. @holly_cummins #RedHat what we sold “this provisioning software is broken”

    10 minute provision-time 3 month provision- time what the client thought they’d got the reason 84-step pre-approval process
  6. @hollycummins.com https://blog.linkedin.com/2017/august/3/making-linkedin-more-accessible-via-linkedin-lite modern web is so inefficient it is useless

    for part of its audience “my heart sank … our new feature failed to load because of poor internet connectivity” Nashik
  7. #RedHat @[email protected] 25% of 16,000 servers doing no useful work

    https://www.anthesisgroup.com/wp-content/uploads/2019/11/Comatose-Servers-Redux-2017.pdf zombie servers
  8. #RedHat @[email protected] the average server: 12 - 18% of capacity

    https://www.nrdc.org/sites/default/files/data-center-efficiency-assessment-IB.pdf
  9. #RedHat @[email protected] 68% of data is stored and never used

    https://www.nrdc.org/sites/default/files/data-center-efficiency-assessment-IB.pdf https://www.seagate.com/gb/en/news/news-archive/seagates-rethink-data-report-reveals-that-68-percent-of-data-available-to-businesses-goes-unleveraged-pr-master/
  10. @holly_cummins #RedHat making turning servers off as safe and easy

    as turning lights off. and then automate it.
  11. @holly_cummins #RedHat solution: LightSwitchOps making turning servers off as safe

    and easy as turning lights off. and then automate it.
  12. @holly_cummins #RedHat absurdly simple scripts my shell script to power

    down machines overnight saved my school €12,000
  13. @holly_cummins #RedHat simple automation we used to leave our applications

    running all the time @darkandnerdy, Chicago DevOpsDays
  14. @holly_cummins #RedHat simple automation we used to leave our applications

    running all the time when we scripted turning them off at night, we reduced our cloud bill by 30% @darkandnerdy, Chicago DevOpsDays
  15. @holly_cummins #RedHat Energy 1 10 100 Time 1 10 100

    energy efficiency across programming languages Python Rust Java Go
  16. @holly_cummins #RedHat Energy 1 10 100 Time 1 10 100

    the trend line is more or less straight energy efficiency across programming languages Python Rust Java Go
  17. @holly_cummins Java dynamism </> build time runtime load and parse

    • config files • properties • yaml • xml • etc.
  18. @holly_cummins Java dynamism @ @ </> build time runtime •

    classpath scanning and annotation discovery • attempt to load class to enable/disable features
  19. @holly_cummins what if we start the application more than once?

    @ @ </> @ @ </> @ @ </> @ @ </> so much work gets redone every time
  20. @holly_cummins unused implementation the one we want interface unused implementation

    unused implementation the true cost of loaded classes isn’t just memory + start time method dispatching:
  21. @holly_cummins unused implementation the one we want interface unused implementation

    unused implementation the true cost of loaded classes isn’t just memory + start time method dispatching:
  22. @holly_cummins unused implementation the one we want interface megamorphic call

    slow dispatching unused implementation unused implementation the true cost of loaded classes isn’t just memory + start time method dispatching:
  23. @holly_cummins the true cost of loaded classes isn’t just memory

    + start time the one we want monomorphic call fast dispatching interface
  24. @holly_cummins @ @ </> build time runtime ready to do

    work! what if we initialize at build time?
  25. @holly_cummins @ @ </> build time runtime ready to do

    work! start • thread pools • I/O • etc. what if we initialize at build time?
  26. @holly_cummins #RedHat capacity Source: John O’Hara Setup: • REST +

    CRUD • large heap • RAPL energy measurement Assumptions: • US energy mix climate impact of framework choice
  27. @holly_cummins #RedHat capacity Source: John O’Hara Setup: • REST +

    CRUD • large heap • RAPL energy measurement Assumptions: • US energy mix climate impact of framework choice shorter line means lower max throughput
  28. @holly_cummins #RedHat capacity Source: John O’Hara Setup: • REST +

    CRUD • large heap • RAPL energy measurement Assumptions: • US energy mix climate impact of framework choice shorter line means lower max throughput higher line means worse carbon footprint
  29. @holly_cummins #RedHat capacity Source: John O’Hara Setup: • REST +

    CRUD • large heap • RAPL energy measurement Assumptions: • US energy mix climate impact of framework choice vrrrooom model in action: quarkus on JVM has the smallest footprint … because it has the highest throughput shorter line means lower max throughput higher line means worse carbon footprint
  30. @hollycummins.com live coding -less energy wasted running full build +

    launch cycles -less dev time wasted waiting for full build + launch cycles
  31. @hollycummins.com targeted continuous testing -less energy wasted running full test

    suites -less dev time wasted waiting for full test runs
  32. @holly_cummins we don’t need to have a nice programming model;

    people can just use AI to write the bad code!
  33. @holly_cummins we don’t need to have a nice programming model;

    people can just use AI to write the bad code! 3 problems.
  34. @holly_cummins #RedHat disclaimer: this isn’t a thing. researchers did not

    use kangaroos on trampolines for electricity generation.
  35. @hollycummins.com 70% more code than we need hurts us we

    spend far more time reading code than writing it
  36. @holly_cummins #RedHat even for machines, there is a limit to

    efficiency …and it’s lower than you think limit 2: physics
  37. @holly_cummins #RedHat if we want the engine to not wear

    out ~20% typical efficiency of a combustion engine
  38. @hollycummins.com highly efficient (optimum number of legs) no resiliency less

    efficient (more legs than needed) resilient #RedHat
  39. @hollycummins.com highly efficient (optimum number of legs) no resiliency less

    efficient (more legs than needed) resilient #RedHat resiliency lowers efficiency
  40. @hollycummins.com queueing theory says systems need to run under-capacity to

    function psychology says we need idle time; maths agrees
  41. @hollycummins.com if arrival rates are low, servers will be idle

    queue arrival process servers completed work
  42. @hollycummins.com utilisation http://brodzinski.com/2015/01/slack-time-value.html cost delay cost cost of idle capacity

    assuming Poisson distribution of arrivals 80% utilisation → 90% utilisation: wait times double
  43. @holly_cummins #RedHat most efficient land animal cool and bouncy uncool

    and floppy efficiency may not look how we expect
  44. @holly_cummins #RedHat most efficient land animal cool and bouncy uncool

    and floppy whole body is basically slack efficiency may not look how we expect
  45. @holly_cummins #RedHat most efficient land animal cool and bouncy uncool

    and floppy whole body is basically slack most efficient animal efficiency may not look how we expect
  46. @hollycummins.com tl;dpa ⁃ don’t accept waste; our world deserves better

    ⁃ work less; achieve more (too long; didn’t pay attention)
  47. @hollycummins.com tl;dpa ⁃ don’t accept waste; our world deserves better

    ⁃ work less; achieve more ⁃ happiness is not waste (too long; didn’t pay attention)
  48. @hollycummins.com tl;dpa ⁃ don’t accept waste; our world deserves better

    ⁃ work less; achieve more ⁃ happiness is not waste ⁃ idleness is not waste (too long; didn’t pay attention)
  49. @hollycummins.com tl;dpa ⁃ don’t accept waste; our world deserves better

    ⁃ work less; achieve more ⁃ happiness is not waste ⁃ idleness is not waste ⁃ look for double-wins everywhere (too long; didn’t pay attention)