{"id":647,"date":"2011-04-21T19:45:13","date_gmt":"2011-04-21T17:45:13","guid":{"rendered":"http:\/\/cerezo.name\/blog\/?p=647"},"modified":"2024-10-14T14:19:44","modified_gmt":"2024-10-14T12:19:44","slug":"lmax-going-slow-to-go-fast","status":"publish","type":"post","link":"http:\/\/cerezo.name\/blog\/2011\/04\/21\/lmax-going-slow-to-go-fast\/","title":{"rendered":"<span class=\"caps\">LMAX<\/span>: Going Slow to Go&nbsp;Fast"},"content":{"rendered":"\n<div class=\"gde-error\"><span class=\"caps\">GDE<\/span> Error: Error retrieving file \u2014 if necessary turn off error checking (404:Not Found)<\/div>\n\n<p style=\"text-align: justify;\">Scalable web architects must learn from the transactional world, stock exchanges and other financial creatures of mass data processing. For example, <span class=\"caps\">LMAX<\/span> attaining <span class=\"caps\">100K<\/span>+ <span class=\"caps\">TPS<\/span> at less than 1 ms latency is a remarkable technical feat. Sure, other exchanges like <span class=\"caps\">NYSE<\/span> and <span class=\"caps\">LSE<\/span> manage to achieve higher <span class=\"caps\">TPS<\/span> at lower latencies, however it\u2019s the history behind <span class=\"caps\">LMAX<\/span> what makes it a fascinating object of study: I\u2019ve estimated from public sources that 20 people worked fully committed for three years to develop the initially released version of <span class=\"caps\">LMAX<\/span>. At first, a simple proof of concept reaching <span class=\"caps\">10K<\/span> <span class=\"caps\">TPS<\/span> was produced, followed by a long number recode-measure-debug cycles that felt more like squeezing and juicing the <span class=\"caps\">JVM<\/span> to achieve significant speed-ups than real programming, because writing cache-friendly code for an adaptive-optimizing <span class=\"caps\">JIT<\/span> virtual machine with no control of how data structures are mapped to memory is really hard, as nonlinearities appear everywhere in the typical code optimization process.<\/p>\n<p style=\"text-align: justify;\">It\u2019s the same kind of technical debt <a href=\"http:\/\/www.quora.com\/What-was-the-code-quality-of-the-initial-version-of-Google\" target=\"_blank\" rel=\"noopener\" class=\"broken_link\">Google experienced<\/a> when it started with a Java codebase, then migrated to a slower Python one to finally settle for C\/C++; or the current technical debt at Twitter, a pure Ruby on Rails product that moved to <a href=\"https:\/\/blog.twitter.com\/2011\/twitter-search-now-3x-faster\" target=\"_blank\" rel=\"noopener\" class=\"broken_link\">Java <\/a> and <a href=\"http:\/\/www.artima.com\/scalazine\/articles\/twitter_on_scala.html\" target=\"_blank\" rel=\"noopener\">Scala<\/a> with phenomenal results.<\/p>\n<p style=\"text-align: justify;\">When frameworks and virtual machines get in the way, it\u2019s the good old wisdom from people like Ken Thompson that illuminates the path to success: \u201cOne of my most productive days was throwing away 1000 lines of&nbsp;code.\u201d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Scalable web architects must learn from the transactional world, stock exchanges and other financial creatures of mass data processing. For example, <span class=\"caps\">LMAX<\/span> attaining <span class=\"caps\">100K<\/span>+ <span class=\"caps\">TPS<\/span> at less than 1 ms latency is a remarkable technical feat. Sure, other exchanges like <span class=\"caps\">NYSE<\/span> and <span class=\"caps\">LSE<\/span> manage to achieve higher <span class=\"caps\">TPS<\/span> at lower latencies, however it\u2019s the history&nbsp;[\u2026]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"wp_typography_post_enhancements_disabled":false,"ngg_post_thumbnail":0},"categories":[14,15],"tags":[],"_links":{"self":[{"href":"http:\/\/cerezo.name\/blog\/wp-json\/wp\/v2\/posts\/647"}],"collection":[{"href":"http:\/\/cerezo.name\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/cerezo.name\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/cerezo.name\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/cerezo.name\/blog\/wp-json\/wp\/v2\/comments?post=647"}],"version-history":[{"count":5,"href":"http:\/\/cerezo.name\/blog\/wp-json\/wp\/v2\/posts\/647\/revisions"}],"predecessor-version":[{"id":1646,"href":"http:\/\/cerezo.name\/blog\/wp-json\/wp\/v2\/posts\/647\/revisions\/1646"}],"wp:attachment":[{"href":"http:\/\/cerezo.name\/blog\/wp-json\/wp\/v2\/media?parent=647"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/cerezo.name\/blog\/wp-json\/wp\/v2\/categories?post=647"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/cerezo.name\/blog\/wp-json\/wp\/v2\/tags?post=647"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}