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

Faster, Greener and Happier − Why Quarkus Should Be Your Next Tech Stack

Faster, Greener and Happier − Why Quarkus Should Be Your Next Tech Stack

Java never went away, but it’s having a renaissance. After some initial teething pains on the cloud (too big, too slow, too hard to configure) a new breed of Java frameworks are changing everything. In this talk, Holly will introduce Quarkus and then delve into some of the advanced features you might not know about. She’ll cover native binaries, what makes Quarkus super-fast running on the JVM, TDD with Quarkus, and Quarkus’s carbon footprint. The talk includes some theory (what underpins Quarkus’s surprising speed?) and also live demos (does Quarkus really start faster than a light bulb? What does an integration testing flow with Quarkus look like?)

Holly Cummins

June 27, 2023
Tweet

More Decks by Holly Cummins

Other Decks in Programming

Transcript

  1. View Slide

  2. View Slide

  3. Holly Cummins


    Senior Principal Software Engineer, Quarkus


    GOTO Amsterdam


    June 27, 2023


    @[email protected]
    faster


    greener


    happier


    why quarkus should be your next
    tech stack


    View Slide

  4. @holly_cummins
    #RedHat
    let’s remember how
    computers used to be

    View Slide

  5. @holly_cummins
    #RedHat
    let’s remember how
    computers used to be
    1832

    View Slide

  6. @holly_cummins
    #RedHat
    on-prem


    dedicated hardware


    long-lived processes
    2005

    View Slide

  7. @holly_cummins
    #RedHat
    2015
    “please do not make unfavourable
    tea analogies in your writing.”

    View Slide

  8. @holly_cummins
    #RedHat
    2022

    View Slide

  9. @holly_cummins
    #RedHat #GOTOams
    2011


    microservices

    View Slide

  10. @holly_cummins
    #RedHat #GOTOams
    2013


    containers
    (almost) change
    everything

    View Slide

  11. @holly_cummins
    #RedHat #GOTOams
    2013


    containers
    (almost) change
    everything

    View Slide

  12. @holly_cummins
    #RedHat #GOTOams
    java apps run on the
    cloud, but have they
    really adapted to cloud?

    View Slide

  13. @holly_cummins #RedHat
    Container platform
    um … no
    machine
    Go Go
    Go Go
    Go Go
    Go Go
    Go Go
    Go Go
    Go Go

    View Slide

  14. @holly_cummins #RedHat
    Container platform
    um … no
    machine
    NodeJS
    NodeJS
    NodeJS
    NodeJS
    NodeJS
    NodeJS
    NodeJS
    machine
    Go Go
    Go Go
    Go Go
    Go Go
    Go Go
    Go Go
    Go Go

    View Slide

  15. @holly_cummins #RedHat
    Container platform
    um … no
    machine
    HotSpot Heap
    HotSpot Heap
    HotSpot Heap
    HotSpot Heap
    machine
    NodeJS
    NodeJS
    NodeJS
    NodeJS
    NodeJS
    NodeJS
    NodeJS
    machine
    Go Go
    Go Go
    Go Go
    Go Go
    Go Go
    Go Go
    Go Go

    View Slide

  16. @holly_cummins #RedHat

    View Slide

  17. @holly_cummins #RedHat
    “I can’t bring up the microservices
    in my Java dev stack

    View Slide

  18. @holly_cummins #RedHat
    “I can’t bring up the microservices
    in my Java dev stack
    … on my brand new Apple laptop
    with a M1 chip and 64GB of RAM.”
    - fintech developer

    View Slide

  19. @holly_cummins
    #RedHat #GOTOams
    in the cloud, apps get
    started and stopped often

    View Slide

  20. @holly_cummins
    #RedHat #GOTOams
    in the cloud, apps get
    started and stopped often

    View Slide

  21. @holly_cummins
    #RedHat #GOTOams
    java servers are not very
    much like light switches

    View Slide

  22. @holly_cummins
    #RedHat #GOTOams
    java servers are not very
    much like light switches

    View Slide

  23. @holly_cummins
    #RedHat #GOTOams
    java servers are not very
    much like light switches
    (historically)

    View Slide

  24. uh, can we do better than that?

    View Slide

  25. View Slide

  26. enter … quarkus

    View Slide

  27. @holly_cummins #RedHat
    spoiler: we did better :)
    CONTAINER ORCHESTRATION
    Machine
    Machine
    Traditional Cloud-Native
    Java Stack
    Traditional Cloud-Native
    Java Stack
    Traditional Cloud-Native
    Java Stack
    Traditional Cloud-Native
    Java Stack
    Machine
    NodeJS
    NodeJS
    NodeJS
    NodeJS
    NodeJS
    NodeJS
    NodeJS
    Go Go Go
    Go Go Go
    Go Go Go
    Go Go Go
    Go Go Go
    Go Go Go
    Go Go Go
    Machine
    Quarkus
    Quarkus
    Quarkus
    Quarkus
    Quarkus
    Quarkus
    Quarkus
    Quarkus
    Quarkus
    Quarkus
    Quarkus
    Quarkus
    Quarkus
    Quarkus
    https:/
    /developers.redhat.com/blog/2017/03/14/java-inside-docker/

    View Slide

  28. @holly_cummins #RedHat
    Container orchestration
    Node
    Quarkus
    Quarkus
    Quarkus
    Quarkus
    Quarkus
    Quarkus
    Quarkus
    Quarkus
    Quarkus
    Quarkus
    Quarkus
    Quarkus
    Quarkus
    Quarkus
    Node
    Traditional Cloud-Native Java Stack
    Traditional Cloud-Native Java Stack
    Traditional Cloud-Native Java Stack
    Traditional Cloud-Native Java Stack
    … a lot better quarkus native

    View Slide

  29. an open source


    stack to write java apps
    quarkus

    View Slide

  30. an open source


    stack to write java apps
    quarkus

    View Slide

  31. @holly_cummins
    #RedHat #GOTOams
    so, did we adapt to
    the cloud?

    View Slide

  32. do quarkus applications start faster?
    Quarkus + GraalVM 0.014 Seconds
    REST
    Quarkus + OpenJDK 0.75 Seconds
    Traditional Cloud-Native Stack 4.3 Seconds
    https://quarkus.io/blog/runtime-performance/

    View Slide

  33. @holly_cummins
    to the code!
    demo!

    View Slide

  34. @holly_cummins #RedHat
    mvn quarkus:build -Pnative -DskipTests
    target/code-with-quarkus-1.0.0-SNAPSHOT-runner

    View Slide

  35. do quarkus applications start faster than lightbulbs?

    View Slide

  36. do quarkus applications start faster than lightbulbs?
    ridiculously, yes

    View Slide

  37. ok but does startup time matter?

    View Slide

  38. ok but does startup time matter?
    fast boot time means auto-scaling works better


    more resilience to load spikes

    View Slide

  39. Quarkus + GraalVM


    13 MB
    Quarkus + OpenJDK


    74 MB
    Traditional Cloud-Native Stack


    140 MB
    rest application
    https://quarkus.io/blog/runtime-performance/
    does quarkus improve memory utilization?

    View Slide

  40. #Quarkus @holly_cummins

    View Slide

  41. #Quarkus @holly_cummins
    hey, wanna see
    quarkus?
    hey, wanna see
    quarkus?
    hey, wanna see
    quarkus?
    hey, wanna see
    quarkus?
    hey, wanna see
    quarkus?

    View Slide

  42. #Quarkus @holly_cummins
    hey, wanna see
    quarkus?
    hey, wanna see
    quarkus?
    hey, wanna see
    quarkus?
    hey, wanna see
    quarkus?
    hey, wanna see
    quarkus?
    uhh … are you supposed
    to shut down applications
    after using them?

    View Slide

  43. #Quarkus @holly_cummins
    hey, wanna see
    quarkus?
    hey, wanna see
    quarkus?
    hey, wanna see
    quarkus?
    hey, wanna see
    quarkus?
    hey, wanna see
    quarkus?
    uhh … are you supposed
    to shut down applications
    after using them? 120 instances (!)

    View Slide

  44. in the cloud,


    memory footprint matters

    View Slide

  45. in the cloud,


    memory footprint matters

    View Slide

  46. do quarkus applications have higher throughput?
    https://www.redhat.com/en/resources/mi-quarkus-lab-validation-idc-analyst-paper

    View Slide

  47. do quarkus applications have higher throughput?
    48 concurrent connections
    https://www.redhat.com/en/resources/mi-quarkus-lab-validation-idc-analyst-paper

    View Slide

  48. do quarkus applications have higher throughput?
    48 concurrent connections
    quarkus native 3212 req/s
    https://www.redhat.com/en/resources/mi-quarkus-lab-validation-idc-analyst-paper

    View Slide

  49. do quarkus applications have higher throughput?
    48 concurrent connections
    traditional cloud native stack 3555 req/s
    quarkus native 3212 req/s
    https://www.redhat.com/en/resources/mi-quarkus-lab-validation-idc-analyst-paper

    View Slide

  50. do quarkus applications have higher throughput?
    48 concurrent connections
    traditional cloud native stack 3555 req/s
    quarkus on jvm 6389 req/s
    quarkus native 3212 req/s
    https://www.redhat.com/en/resources/mi-quarkus-lab-validation-idc-analyst-paper

    View Slide

  51. @holly_cummins #RedHat
    https://medium.com/arconsis/spring-boot-vs-quarkus-part-2-jvm-runtime-performance-af45d0db116e

    View Slide

  52. @holly_cummins #RedHat
    https://medium.com/arconsis/spring-boot-vs-quarkus-part-2-jvm-runtime-performance-af45d0db116e
    spring boot quarkus
    response
    time
    1901 ms 294 ms
    throughput 523 req/s 3374 req/s

    View Slide

  53. #Quarkus @holly_cummins
    users care (a lot)
    about response time

    View Slide

  54. better startup


    better footprint


    better throughput


    wait, isn’t that


    something for nothing?

    View Slide

  55. @holly_cummins #RedHat
    the two ways of improving performance
    •trade off one thing against another


    •eliminate waste

    View Slide

  56. traditional cloud native stack 3555 req/s
    quarkus on jvm 6389 req/s
    quarkus native 3212 req/s
    https://www.redhat.com/en/resources/mi-quarkus-lab-validation-idc-analyst-paper

    View Slide

  57. traditional cloud native stack 3555 req/s
    quarkus on jvm 6389 req/s
    quarkus native 3212 req/s
    https://www.redhat.com/en/resources/mi-quarkus-lab-validation-idc-analyst-paper
    a trade-off of throughput
    against footprint

    View Slide

  58. traditional cloud native stack 3555 req/s
    quarkus on jvm 6389 req/s
    quarkus native 3212 req/s
    https://www.redhat.com/en/resources/mi-quarkus-lab-validation-idc-analyst-paper
    no trade-off, just better :)
    a trade-off of throughput
    against footprint

    View Slide

  59. @holly_cummins
    #RedHat
    where the win
    comes from
    1832

    View Slide

  60. @holly_cummins
    #RedHat
    2010
    multiple applications share a single
    application server instance


    application re-deployed many times
    between server restarts


    application dependencies changed
    while it is running

    View Slide

  61. @holly_cummins
    #RedHat
    application frameworks
    optimised for dynamism

    View Slide

  62. @holly_cummins
    #RedHat
    application frameworks
    optimised for dynamism
    dynamism has a cost

    View Slide

  63. @holly_cummins #RedHat
    cloud apps
    are immutable
    now

    View Slide

  64. @holly_cummins #RedHat
    cloud apps
    are immutable
    now

    View Slide

  65. @holly_cummins #RedHat
    cloud apps
    are immutable
    now

    View Slide

  66. @holly_cummins #RedHat
    cloud apps
    are immutable
    now

    View Slide

  67. @holly_cummins #RedHat
    cloud apps
    are immutable
    now

    View Slide

  68. @holly_cummins #RedHat
    cloud apps
    are immutable
    now

    View Slide

  69. @holly_cummins
    #RedHat
    a highly dynamic
    runtime in a container


    is pointless

    View Slide

  70. @holly_cummins
    #RedHat
    a highly dynamic
    runtime in a container


    is pointless
    loading classes that aren’t needed

    View Slide

  71. @holly_cummins
    #RedHat
    a highly dynamic
    runtime in a container


    is pointless
    loading classes that aren’t needed
    expensive, slow, reflection

    View Slide

  72. @holly_cummins
    #RedHat
    a highly dynamic
    runtime in a container


    is pointless
    loading classes that aren’t needed
    expensive, slow, reflection
    the same initialisation on every startup

    View Slide

  73. @holly_cummins #RedHat
    how does a framework start?
    @

    @
    >
    packaging

    (maven, gradle…)
    build time
    runtime

    View Slide

  74. @holly_cummins #RedHat
    @

    @
    >
    load and parse config files,
    properties, yaml, xml, etc.
    Build Time
    Runtime
    how does a framework start?

    View Slide

  75. @holly_cummins #RedHat
    @

    @
    >
    • classpath scanning and
    annotation discovery


    • attempt to load class to
    enable/disable features
    Build Time
    Runtime
    how does a framework start?

    View Slide

  76. @holly_cummins #RedHat
    @

    @
    >
    build a metamodel
    of the world
    Build Time
    Runtime
    How does a framework start?
    how does a framework start?

    View Slide

  77. @holly_cummins #RedHat
    @

    @
    >
    start thread pools,
    I/O, etc.
    Build Time
    Runtime
    how does a framework start?

    View Slide

  78. @holly_cummins #RedHat
    what if we initialize at build time?

    View Slide

  79. @holly_cummins #RedHat
    @

    @
    >
    build time
    what if we initialize at build time?

    View Slide

  80. @holly_cummins #RedHat
    @

    @
    >
    runtime
    build time
    what if we initialize at build time?

    View Slide

  81. @holly_cummins #RedHat
    quarkus makes a


    “closed-world” assumption

    View Slide

  82. @holly_cummins #RedHat
    the quarkus way enables native compilation
    native
    (graalvm)
    @

    @
    >
    jvm
    build time

    View Slide

  83. ok but is performance all there is?

    View Slide

  84. ok but is performance all there is?
    developer joy

    View Slide

  85. @holly_cummins #RedHat

    View Slide

  86. doing more up-front enables better devex
    @

    @
    >
    build time
    runtime

    View Slide

  87. @

    @
    >
    doing more up-front enables better devex
    @

    @
    >
    build time
    runtime
    build time

    View Slide

  88. @

    @
    >
    doing more up-front enables better devex
    @

    @
    >
    build time
    runtime
    runtime
    build time

    View Slide

  89. to the code!
    @holly_cummins #RedHat

    View Slide

  90. @holly_cummins
    #RedHat #GOTOams
    zero-config live coding

    View Slide

  91. @holly_cummins
    #RedHat #GOTOams
    tests are run on every code change


    “reverse code coverage” means only relevant tests run
    continuous testing

    View Slide

  92. @holly_cummins
    #RedHat #GOTOams
    developer UI

    View Slide

  93. @holly_cummins
    #RedHat #GOTOams
    zero-config testcontainers

    View Slide

  94. @holly_cummins #RedHat
    testcontainers integration … without quarkus
    @TestConfiguration(proxyBeanMethods = false)
    public class ContainersConfig {
    @Bean
    @ServiceConnection
    public PostgreSQLContainer> postgres() {
    return new PostgreSQLContainer<>(DockerImageName.parse("postgres:14"));
    }
    }
    public class TestApplication {
    public static void main(String[] args) {
    SpringApplication
    .from(MySpringDataApplication::main)
    .with(ContainersConfig.class)
    .run(args);
    }
    }
    @Import(ContainersConfig.class)

    View Slide

  95. @holly_cummins #RedHat
    testcontainers integration … without quarkus
    @TestConfiguration(proxyBeanMethods = false)
    public class ContainersConfig {
    @Bean
    @ServiceConnection
    public PostgreSQLContainer> postgres() {
    return new PostgreSQLContainer<>(DockerImageName.parse("postgres:14"));
    }
    }
    public class TestApplication {
    public static void main(String[] args) {
    SpringApplication
    .from(MySpringDataApplication::main)
    .with(ContainersConfig.class)
    .run(args);
    }
    }

    View Slide

  96. @holly_cummins #RedHat
    testcontainers integration … without quarkus

    View Slide

  97. @holly_cummins #RedHat
    zero-config testcontainers integration
    the only thing you need to do to make
    testcontainers work is not configure anything
    # configure your datasource
    quarkus.datasource.db-kind = postgresql
    quarkus.datasource.username = sarah
    quarkus.datasource.password = connor
    quarkus.datasource.jdbc.url = jdbc:postgresql://localhost:5432/mydatabase
    # drop and create the database at startup
    quarkus.hibernate-orm.database.generation = drop-and-create

    View Slide

  98. @holly_cummins #RedHat
    zero-config testcontainers integration
    the only thing you need to do to make
    testcontainers work is not configure anything
    # drop and create the database at startup
    quarkus.hibernate-orm.database.generation = drop-and-create

    View Slide

  99. @holly_cummins #RedHat
    zero-config testcontainers integration
    the only thing you need to do to make
    testcontainers work is not configure anything

    View Slide

  100. @holly_cummins #RedHat
    zero-config testcontainers integration
    the only thing you need to do to make
    testcontainers work is not configure anything
    quarkus also auto-invokes flyway and liquibase

    View Slide

  101. @holly_cummins #RedHat
    zero-config testcontainers integration
    realistically, use profiles so things work in
    production :)
    # configure your datasource
    %prod.quarkus.datasource.db-kind = postgresql
    %prod.quarkus.datasource.username = sarah
    %prod.quarkus.datasource.password = connor
    %prod.quarkus.datasource.jdbc.url = jdbc:postgresql://localhost:5432/mydatabase
    # on real databases, defaults to ‘none’, but let’s validate
    %prod.quarkus.hibernate-orm.database.generation = validate

    View Slide

  102. @holly_cummins
    #RedHat #GOTOams
    • databases


    • redis


    • keycloak


    • kafka


    • elasticsearch


    • kubernetes


    • … or add your own
    auto-provision services


    “dev services”


    using testcontainers under the hood

    View Slide

  103. @holly_cummins
    #RedHat #GOTOams
    more opinions, less boilerplate

    View Slide

  104. @holly_cummins
    #RedHat #GOTOams
    package org.acme;
    import org.springframework.boot.SpringApplication;
    import org.springframework.boot.autoconfigure.SpringBootApplication;
    @SpringBootApplication
    public class SpringDemo {
    public static void main(String[] args) {
    SpringApplication.run(SpringDemo.class, args);
    }
    }
    example: declaring an application

    View Slide

  105. @holly_cummins
    #RedHat #GOTOams
    example: declaring an application

    View Slide

  106. @holly_cummins
    #RedHat #GOTOams
    @ApplicationScoped
    public class GreetingRepository {
    public Entity findByName(int name) {
    return find("name", name).firstResult();
    }
    void persist(Entity entity) {}
    void delete(Entity entity) {}
    Entity findById(Id id) {}
    List list(String query, Sort sort, Object... params) {
    return null;
    }
    Stream stream(String query, Object... params) {
    return null;
    }
    long count() {
    return 0;
    }
    long count(String query, Object... params) {
    return 0;
    }
    }
    example: panache + hibernate

    View Slide

  107. @holly_cummins
    #RedHat #GOTOams
    example: panache + hibernate
    @ApplicationScoped
    public class GreetingRepository implements PanacheRepository {
    public Entity findByName(int name) {
    return find("name", name).firstResult();
    }
    }

    View Slide

  108. @holly_cummins
    #RedHat #GOTOams
    DAO
    example: panache + hibernate
    @ApplicationScoped
    public class GreetingRepository implements PanacheRepository {
    public Entity findByName(int name) {
    return find("name", name).firstResult();
    }
    }
    repository pattern

    View Slide

  109. @holly_cummins
    #RedHat #GOTOams
    example: panache + hibernate

    View Slide

  110. @holly_cummins
    #RedHat #GOTOams
    example: panache + hibernate
    active record pattern
    @Entity
    public class Greeting extends PanacheEntity {
    public String name;
    public LocalDate issued;
    @Version
    public int version;
    public static List getTodaysGreetings() {
    return list("date", LocalDate.now());
    }
    }

    View Slide

  111. @holly_cummins
    #RedHat #GOTOams

    io.quarkus
    quarkus-spring-web


    io.quarkus
    quarkus-spring-data-jpa

    ok but we use spring
    option 1: compatibility libraries
    option 2: migration tooling
    • migration toolkit for applications (mta)


    • windup


    • open rewrite

    View Slide

  112. @holly_cummins #RedHat
    “After a week of development with
    Quarkus, I was able to regain the
    same level of productivity as when
    I was developing with Spring Boot.”


    – Fawaz Paraïso, Decathlon

    View Slide

  113. @holly_cummins #RedHat
    open source community of contributors

    View Slide

  114. @holly_cummins #RedHat
    Emiliia Nesterovych

    Emmanuel Bernard

    Emre Kaplan

    Enrique González Martínez

    Enrique Mingorance Cano

    Eoin Gallinagh

    Eric Deandrea

    Eric Wittmann

    Erik Åsén

    Erik Mattheis

    Erin Schnabel

    Eugene Berman

    Evan Shortiss

    Fabricio Gregorio

    faculbsz

    Falko Modler

    Fedor Dudinskiy

    Felipe Carvalho dos Anjos Formentin

    Felipe Henrique Gross Windmoller

    Fernando Comunello

    Fernando Henrique

    fhavel

    Fikru Mengesha

    Filippe Spolti

    Florian Beutel

    Florian Bütler

    Florian Heubeck

    Florin Botis

    Foivos Zakkak

    Foobartender

    Fouad Almalki

    Francesco Nigro

    Francisco Javier Tirado Sarti

    Francois Steyn

    Frank Eichfelder

    franz1981

    freakse-sa

    Fred Bricon

    Frédérc Blanc

    Freeman Fang

    Fu Cheng

    Gabriele Cardosi

    Galder Zamarreño

    galiacheng

    Gavin King

    Gavin Ray

    Geert Schuring

    Geoffrey De Smet

    Geoffrey GREBERT

    Georg Leber

    George Gastaldi

    manofthepeace

    Manyanda Chitimbo

    Marat Gubaidullin

    Marc Nuri

    Marc Schlegel

    Marc Wrobel

    Marcel Hanser

    Marcel Lohmann

    Marcell Cruz

    Marcelo Pereira

    Marcin Czeczko

    Marcin Kłopotek

    Marco Bungart

    Marco Schaub

    Marco Yeung

    Marco Zanghì

    Marcus Paulo

    Marek Goldmann

    Marek Skacelik

    Marián Macik

    Mario Fusco

    MarioHNogueira

    Mark Lambert

    Mark Little

    Mark McLaughlin

    Mark Sailes

    marko-bekhta

    Markus Heberling

    Markus Himmel

    Markus Schwer

    Martin C. Richards

    Martin Grammelspacher

    Martin Kouba

    Martin Muzikar

    Martin Panzer

    Martin Weiler

    martin-kofoed-jyskebank-dk

    MartinWitt

    Marvin B. Lillehaug

    masini

    Matej Novotny

    Matej Vasek

    Matheus Cruz

    Mathias Holzer

    Matteo Mortari

    Matthias Andreas Benkard

    Matthias Cullmann

    mauroal

    Max Andersen

    Max Gabrielsson

    Max Rydahl Andersen

    Victor Hugo de Oliveira Molinar

    Vincent Sevel

    Vincent van Dam

    Vinícius Ferraz Campos Florentino

    Viswa Teja Nariboina

    Vladimir Konkov

    Vojtech Juranek

    Vratislav Hais

    w.glanzer

    Walter Medvedeo

    Wayne Ellis

    Werner Glanzer

    Willem Jan Glerum

    William Antônio Siqueira

    Wim Goeman

    Wippermueller, Frank

    wojciech.stryjewski

    Xavier

    Xieshen

    xstefank

    Y. Luis

    Yann-Thomas LE MOIGNE

    Yannick Reifschneider

    YassinHajaj

    Yelzhas Suleimenov

    yesunch9

    Yoann Rodière

    Yoshikazu Nojima

    Youngmin Koo

    Yubao Liu

    yugoccp

    Yukihiro Okada

    Zaheed Beita

    zanmagerl

    zedbeit

    Zheng Feng

    Žiga Deisinger

    Zineb Bendhiba

    zohar

    Zoran Regvart

    Шумов Игорь Юрьевич

    出⻔三不惹


    open source community of contributors

    View Slide

  115. @holly_cummins #RedHat
    one last thing …

    View Slide

  116. @holly_cummins #RedHat
    does being faster
    and lighter mean
    quarkus is greener?

    View Slide

  117. digression:


    how do you measure carbon?

    View Slide

  118. @holly_cummins #RedHat
    step 1: measure power usage

    View Slide

  119. @holly_cummins #RedHat
    step 1: measure power usage
    wall power measurement

    View Slide

  120. @holly_cummins #RedHat
    step 1: measure power usage
    wall power measurement
    more complete

    View Slide

  121. @holly_cummins #RedHat
    step 1: measure power usage
    wall power measurement
    more complete
    needs access to the wall

    View Slide

  122. @holly_cummins #RedHat
    step 1: measure power usage
    wall power measurement
    more complete
    needs access to the wall
    and equipment

    View Slide

  123. @holly_cummins #RedHat
    step 1: measure power usage
    wall power measurement
    more complete
    needs access to the wall
    and equipment
    RAPL

    View Slide

  124. @holly_cummins #RedHat
    step 1: measure power usage
    wall power measurement
    more complete
    needs access to the wall
    and equipment
    RAPL
    programmatically accessible

    View Slide

  125. @holly_cummins #RedHat
    step 1: measure power usage
    wall power measurement
    more complete
    needs access to the wall
    and equipment
    RAPL
    programmatically accessible
    misses some components

    View Slide

  126. @holly_cummins #RedHat
    step 1: measure power usage
    wall power measurement
    more complete
    needs access to the wall
    and equipment
    data costs carbon
    RAPL
    programmatically accessible
    misses some components

    View Slide

  127. @holly_cummins #RedHat

    View Slide

  128. @holly_cummins #RedHat

    View Slide

  129. @holly_cummins #RedHat

    View Slide

  130. @holly_cummins #RedHat
    load

    View Slide

  131. @holly_cummins #RedHat
    Source: Teads EC2 instances carbon dataset

    View Slide

  132. @holly_cummins #RedHat
    density
    Source: Clement Escoffier
    experiment 1: cloud
    Setup:


    • 800 requests/second, over 20 days


    • SLA > 99%


    • AWS instances


    Assumptions:


    • Costs are for us-east-1 data centre

    View Slide

  133. @holly_cummins #RedHat
    Setup:
    • 800 requests/second, over 20
    days
    • SLA > 99%
    Assumptions:
    Source: Clement Escoffier x Teads
    cloud carbon impact of framework choice
    interpolated carbon metrics

    View Slide

  134. @holly_cummins #RedHat
    Setup:
    • 800 requests/second, over 20
    days
    • SLA > 99%
    Assumptions:
    Source: Clement Escoffier x Teads
    cloud carbon impact of framework choice
    the carbon is lower because
    the cost is lower
    interpolated carbon metrics

    View Slide

  135. @holly_cummins #RedHat
    Setup:
    • REST + CRUD
    • large heap
    • RAPL energy measurement
    • multiple instances to
    support high load

    Assumptions:
    • US energy mix
    Source: John O’Hara
    experiment 2: RAPL measurements

    View Slide

  136. @holly_cummins #RedHat
    Setup:
    • REST + CRUD
    • large heap
    • RAPL energy measurement
    • multiple instances to
    support high load

    Assumptions:
    • US energy mix
    Source: John O’Hara
    experiment 2: RAPL measurements
    quarkus on JVM has the lowest carbon …
    because it has the highest throughput

    View Slide

  137. • quarkus cuts carbon by ~2-3x*


    • native consumes more carbon
    than JVM


    carbon measurements:
    conclusions

    View Slide

  138. @holly_cummins #RedHat
    ok but is it being
    used in production?

    View Slide

  139. @holly_cummins #RedHat
    “We can run 3 times denser deployments without
    sacrificing availability and response times of services.


    Quarkus live coding is a really good thing: Making changes
    and reloading pages instantaneously is a great feature.”


    – Fawaz Thorsten Pohl, Lufthansa AVIATAR

    View Slide

  140. @holly_cummins #RedHat
    2019: Moved digital experience to Quarkus
    (from Spring Boot)


    • Startup times 40s ➡ 12s


    • RAM 800 MB ➡ 360 MB


    • Developer productivity ⬆ 30-40%


    – Christos Sotiriou, Vodafone Greece

    View Slide

  141. @holly_cummins #RedHat
    tl;dpa


    (too long didn’t pay attention)
    deployment density
    lower cloud bill
    frictionless development experience
    Medium Nano
    auto-provision services


    zero-config live coding


    continuous testing


    developer UI
    greener

    View Slide

  142. slides

    View Slide