Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

QCon London: Low latency Java in the real world - LMAX Exchange and the Zing JVM

3,683 views

Published on

LMAX Exchange and Azul are both known for low latency and high performance Java technologies. LMAX Exchange has been using Azul's Zing JVM to power the world's best FX execution venue for a while now. In this session, Mark Price (Senior Developer, LMAX Exchange) and Gil Tene (CTO, Azul Systems) describe some of the core parts of their respective technology stacks, and discuss experiences and lessons learned from a long-term real-world deployment of the their combination.

Published in: Software
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

QCon London: Low latency Java in the real world - LMAX Exchange and the Zing JVM

  1. 1. ©2015 Azul Systems, Inc. ©2015 LMAX Exchange Ltd. LMAX Exchange and the Zing JVM Mark Price, Senior Developer, LMAX Exchange Gil Tene, CTO & co-Founder, Azul Systems Low Latency Java in the Real World
  2. 2. ©2015 Azul Systems, Inc. ©2015 LMAX Exchange Ltd. LMAX Exchange and the Zing JVM Mark Price, Senior Developer, LMAX Exchange Gil Tene, CTO & co-Founder, Azul Systems Low Latency Java in the Real World
  3. 3. ©2015 Azul Systems, Inc. ©2015 LMAX Exchange Ltd. About me: Gil Tene co-founder, CTO @Azul Systems Have been working on “think different” GC approaches since 2002 A Long history building Virtual & Physical Machines, Operating Systems, Enterprise apps, etc... I also depress people by demonstrating how terribly wrong their latency measurements are… * working on real-world trash compaction issues, circa 2004
  4. 4. ©2015 Azul Systems, Inc. ©2015 LMAX Exchange Ltd. About me: Mark Price Senior Developer at LMAX Exchange Performance enthusiast Touched pretty much everything at LMAX over a period of 8 years… Currently focusing on performance and monitoring I’m the guy that everyone used to come to with their GC logs… Then it said “Concurrent Mode Failure”
  5. 5. ©2015 Azul Systems, Inc. ©2015 LMAX Exchange Ltd. Background LMAX Exchange is a venue for low-latency FX trading World’s first regulated MTF for transparent, order-driven FX trading 1st place in Tech Track 100 2014 We aim to be the world’s fastest retail FX exchange Open culture. A lot of open source
  6. 6. ©2015 Azul Systems, Inc. ©2015 LMAX Exchange Ltd. Zing: what is it good for? Not just fast. Always fast. Eliminates GC as a problem/concern Addresses all forms of GC pauses, large & small Low latency or Human-scale latency Small or Large heaps, Low or High throughput GC is simply a solved problem. Move on… Idiomatic Java code “just works” Even when blips and pauses are not an option
  7. 7. ©2015 Azul Systems, Inc. ©2015 LMAX Exchange Ltd. Stay Responsive Even when traffic patterns change
  8. 8. ©2015 Azul Systems, Inc. ©2015 LMAX Exchange Ltd. Real world traffic patterns Not constant. Not Stochastic.
  9. 9. ©2015 Azul Systems, Inc. ©2015 LMAX Exchange Ltd.
  10. 10. ©2015 Azul Systems, Inc. ©2015 LMAX Exchange Ltd. Java for low latency Seriously? Yes... Time to Stability Time to Market Time to Performance Overall productivity and delivery benefits trump the various downsides
  11. 11. ©2015 Azul Systems, Inc. ©2015 LMAX Exchange Ltd. All Java
  12. 12. ©2015 Azul Systems, Inc. ©2015 LMAX Exchange Ltd. The good, the bad, and the ugly Java is fast. Java is productive. Good developers will produce good, fast code Bad developers will produce bad, slow code More Java devs than C/C++ devs (good & bad) But JVMs are [normally] not consistently fast GC pauses & Deoptimization & Deflation, oh my. Low latency “Java” usually: Written in the Java syntax. Avoids idiomatic Java. Avoid using anyone else’s code...
  13. 13. ©2015 Azul Systems, Inc. ©2015 LMAX Exchange Ltd. Zing’s impact on low latency Java Zing is a JVM that values consistent speed GC (and JVM) “noise” reduced to below OS “noise” Keeps the good Removes the bad and the ugly Eliminates GC-related engineering efforts All the associated bad and ugly choices Idiomatic Java, not just “Java”
  14. 14. ©2015 Azul Systems, Inc. ©2015 LMAX Exchange Ltd. Zing at LMAX Exchange Started 2 years ago Incremented from most critical to less critical Next cover all latency-sensitive system Also cover throughput critical systems Throughput Critical Latency Critical Back pressure Outliers
  15. 15. ©2015 Azul Systems, Inc. ©2015 LMAX Exchange Ltd.
  16. 16. ©2015 Azul Systems, Inc. ©2015 LMAX Exchange Ltd.
  17. 17. ©2015 Azul Systems, Inc. ©2015 LMAX Exchange Ltd. Development at LMAX Exchange Heavy focus on TDD and CI 9000+ acceptance tests Performance is treated as just another part of CI Regression in performance same as a functional failure Confidence to make large changes
  18. 18. ©2015 Azul Systems, Inc. ©2015 LMAX Exchange Ltd. Zing at LMAX Exchange: Benefits Improved latency behaviors Reduced engineering effort No more battling GC in code Performance tuning cycles shorter Idiomatic Java is a big deal can avoid converting to “special practices” java can “ease up” on no-allocation coding styles… keep using/leveraging 3rd party code more productive overall...
  19. 19. ©2015 Azul Systems, Inc. ©2015 LMAX Exchange Ltd. Lessons Learnt Attacking critical parts first: may delay things... critical parts have had engineering effort applied smaller initial gains longer time to gain confidence With hindsight: Could have started from “outside in” instead Larger initial gains, shorter time-to-confidence May have gotten to wider deployment faster
  20. 20. ©2015 Azul Systems, Inc. ©2015 LMAX Exchange Ltd. Lessons Learnt: GC is not the only problem GC does tend to dominate outliers (pre-Zing) it is natural to assume all big bad stuff is GC with GC outliers gone, remaining problems surface Some harder things: page cache (kernel) lock contention power management tuning in BIOS & OS mapped file access faults & safepoints
  21. 21. ©2015 Azul Systems, Inc. ©2015 LMAX Exchange Ltd. Lessons Learnt: Proactively override Linux defaults Out-of-the box Linux has some bad defaults Bad for things that care about latency... E.g. all these should be changed upfront: Page cache: vm.min_free_kbytes [needs >1GB] Transparent Huge Pages (THP) [should be turned off] Swappiness [should be set to 0] zone_reclaim_info [should be set to 0] Each can cause multi-100s-of-msec outliers
  22. 22. ©2015 Azul Systems, Inc. ©2015 LMAX Exchange Ltd. Lessons Learnt: Measure, Measure, Measure We were already measuring & collecting a lot But jitter/hiccup/outlier measurement is tough Especially across multiple hops Detailed latency distribution measurements Helped triage outlier issues and focus efforts Full percentile spectrum histograms Record system-level “hiccups” everywhere
  23. 23. ©2015 Azul Systems, Inc. ©2015 LMAX Exchange Ltd. Observation points
  24. 24. ©2015 Azul Systems, Inc. ©2015 LMAX Exchange Ltd. Time-stamping points
  25. 25. ©2015 Azul Systems, Inc. ©2015 LMAX Exchange Ltd. Summary Java is both viable and profitable for low latency With “regular JVMs” you have to jump through some hoops to get there Zing helps low latency in Java be as easy as low latency in other languages Once you stop dealing with JVM-related issues, you can get on with the interesting stuff
  26. 26. ©2015 Azul Systems, Inc. ©2015 LMAX Exchange Ltd. Q & A

×