├── LICENSE └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Julian Pokrovsky 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Awesome Ruby Performance 2 | A curated list of awesome Ruby Performance books, courses, trainings, conference talks, blogs and most inspiring open source contributors. To get even more insights about performance you can take a look at [wiki pages](https://github.com/raventid/awesome-ruby-performance/wiki), they are work in progress now, but expect them to have more info. 3 | 4 | - [Awesome Ruby Performance](#awesome-ruby-performance) 5 | - [Contributions](#contributions) 6 | - [Books](#books) 7 | - [Video Courses](#video-courses) 8 | - [On-Site Trainings](#on-site-trainings) 9 | - [Upcoming conferences](#upcoming-conferences) 10 | - [Conference Talks](#conference-talks) 11 | - [Blogs](#blogs) 12 | - [Inspiring Open Source Contributors](#inspiring-open-source-contributors) 13 | - [Performance tools](#performance-tools) 14 | - [High Performance Libraries](#high-performance-libraries) 15 | - [Benchmarks](#benchmarks) 16 | - Article series 17 | - [Benchmarking](#benchmarking) 18 | - [Monitoring](#monitoring) 19 | - [Investigations](#investigations) 20 | - [JIT Optimizations](#jit-optimizations) 21 | - [Threading](#threading) 22 | - [Memory](#memory) 23 | - [RubyVM Internals](#rubyvm-internals) 24 | - Official Ruby bugtracker notes 25 | - [CPU Improvements](#cpu-improvements) 26 | - [Memory Improvements](#memory-improvements) 27 | - [Interesting performance talks not about Ruby](#interesting-performance-talks-not-about-ruby) 28 | 29 | ## Contributions 30 | Have you ever seen an interesting talk about Ruby performance and it's not listed here? Send a pull request. Have you ever read an interesting article about Ruby performance and it's not listed here? Send a pull request. Did you write an article? Send a pull request. Know interesting blogger, who writes about Ruby performance? You know what to do! 31 | 32 | Do not forget to include a language remark: 🇯🇵 🇰🇷 🇩🇪 🇨🇳 🇺🇸 🇫🇷 🇪🇸 🇮🇹 🇷🇺 🇬🇧 33 | 34 | ## Books 35 | 36 | * [Ruby Performance Optimization](https://pragprog.com/book/adrpo/ruby-performance-optimization) by Alexander Dymo 🇺🇸 37 | * [Ruby Under a Microscope](http://patshaughnessy.net/ruby-under-a-microscope) by Pat Shaughnessy 🇺🇸 38 | 39 | ## Video Courses 40 | 41 | * TODO 42 | 43 | 44 | ## On-Site Trainings 45 | 46 | * TODO 47 | 48 | 49 | ## Upcoming conferences 50 | 51 | * TODO 52 | 53 | ## Conference talks 54 | 55 | Sorted from newest to oldest: 56 | * 2019 57 | * [Ruby CPU and Memory - Pareto principle](https://www.youtube.com/watch?v=eYhJWoxgoKA) by Юлиан Покровский (Oct 27, 2019, RubyRussia) 🇷🇺 58 | * 2015 59 | * [On Memory](https://www.youtube.com/watch?v=yxhrYiqatdA) by John Crepezzi (Mar 30, 2015, MountainWest RubyConf) 🇺🇸 60 | * Older 61 | * TODO 62 | 63 | ## Blogs 64 | 65 | * [SpeedShop](https://www.speedshop.co/) 🇺🇸 66 | 67 | ## Inspiring Open Source Contributors 68 | 69 | * [Nate Berkopec](https://github.com/nateberkopec) 🇺🇸 70 | * [Sam Saffron](https://github.com/SamSaffron) 71 | * [Peter Ohler](https://github.com/ohler55) 72 | 73 | ## Performance tools 74 | * Benchmarking 75 | * [benchmark-ips](https://github.com/evanphx/benchmark-ips) - Provides iteration per second benchmarking for Ruby. 76 | * Profiling 77 | * Rack 78 | * [Derailed Benchmarks](https://github.com/schneems/derailed_benchmarks) - A series of things you can use to benchmark a Rails or Ruby app. 79 | * [rack-mini-profiler](https://github.com/MiniProfiler/rack-mini-profiler) - Profiler for your development and production Ruby rack apps. 80 | * Pure Ruby 81 | * [batch-loader](https://github.com/exaspark/batch-loader) – A generic lazy batching mechanism to avoid N+1 DB queries, HTTP queries, etc. 82 | * [bullet](https://github.com/flyerhzm/bullet) - Help to kill N+1 queries and unused eager loading. 83 | * [Peek](https://github.com/peek/peek) - Visual status bar showing Rails performance. 84 | * [stackprof](https://github.com/tmm1/stackprof) - a sampling call-stack profiler for ruby 2.1+ 85 | * [Rbkit](https://github.com/code-mancers/rbkit) - profiler for Ruby. With a GUI. 86 | * [rbspy](https://github.com/rbspy/rbspy) - Sampling profiler for any Ruby process. 87 | * [ruby-prof](https://github.com/ruby-prof/ruby-prof) - A code profiler for MRI rubies. 88 | * [speedscope](https://github.com/jlfwong/speedscope) - A fast, interactive web-based viewer for performance profiles. An alternative viewer for FlameGraphs. Will happily display multi-megabyte profiles without crashing your browser. 89 | * Linters, recommendation tools (possibly runnable on CI) 90 | * [fasterer](https://github.com/DamirSvrtan/fasterer) - Don't make your Rubies go fast. Make them go fasterer 91 | ### Application Insights 92 | * New_Relic 93 | * SkyLight - smart profiler for Ruby and Rails applications 94 | 95 | ## High Performance Libraries 96 | * Booting code 97 | * [bootsnap](https://github.com/Shopify/bootsnap) - Boot large Ruby/Rails apps faster. 98 | * C/Rust extensions 99 | * [fast_blank](https://github.com/SamSaffron/fast_blank) - Provides a C-optimized method for determining if a string is blank. 100 | * [yajl-ruby](https://github.com/brianmario/yajl-ruby) - A streaming JSON parsing and encoding library for Ruby (C bindings to yajl). 101 | * [oj](https://github.com/ohler55/oj) - A fast JSON parser and Object marshaller as a Ruby gem. 102 | * Memory 103 | * [nakayoshi_fork](https://github.com/ko1/nakayoshi_fork) - solves CoW friendly problem on MRI 2.2 and later 104 | 105 | ## Benchmarks 106 | * Ruby in Web 107 | * [Concurrent HTTP requests in Ruby](https://github.com/exAspArk/concurrent_http_requests) 108 | * [Benchmark some Ruby web microframeworks, just for fun](https://github.com/luislavena/bench-micro) 109 | ## Article series 110 | 111 | ### Benchmarking 112 | * [The Art of Benchmarking](http://mattwarren.org/2014/09/19/the-art-of-benchmarking/) by Matt Warren 113 | 114 | ### Monitoring 115 | * TODO 116 | 117 | ### Investigations 118 | * [Как я провёл две недели в поисках утечки памяти](http://be9.ru/2015/09/12/memory-leak.html) by Олег Дашевский. "Это история о поисках утечки памяти. Она довольно длинная, потому что я привожу массу подробностей. Почему я решил описать свои приключения? Дело не только в практическом стремлении сохранить все мелкие скрипты и куски кода. Мне на минуточку показалось, что это и есть UNIX way – то, что меня вело. Каждый шаг был связан с очередной небольшой утилитой или библиотекой, которая хорошо решает свою задачу. И я в итоге достиг успеха." 🇷🇺 119 | * [How I spent two weeks hunting a memory leak in Ruby](http://www.be9.io/2015/09/21/memory-leak/) by Oleg Dashevskii. "This is a story about hunting a memory leak. A long story, because I go into much detail. Why describe my adventures? Not that I wanted to save all those tiny code pieces and scripts only. It rather occurred to me that it was UNIX way which I had pursued. Every step was related to yet another small utility, or a library, which solves its task well. And finally I succeeded." 🇺🇸 120 | 121 | ### JIT Optimizations 122 | * TODO 123 | 124 | ### Threading 125 | * TODO 126 | 127 | ### Memory 128 | * [Debugging hidden memory leaks in Ruby](https://samsaffron.com/archive/2019/10/08/debugging-unmanaged-and-hidden-memory-leaks-in-ruby) - "This article covers tools and tricks you can use to attack leaks that you can not easily introspect in Ruby. In particular I will discuss mwrap, heaptrack, iseq_collector and chap." by Sam Saffron (2019-10-15) 🇺🇸 129 | * [What causes Ruby memory to bloat](https://www.joyfulbikeshedding.com/blog/2019-03-14-what-causes-ruby-memory-bloat.html) - How memory allocation works in Ruby and how to improve it with malloc_trim API. 🇺🇸 130 | * [The Definitive Guide to Ruby Heap Dumps, Part I](https://blog.codeship.com/the-definitive-guide-to-ruby-heap-dumps-part-i/) - “When you can’t reproduce memory bloat, here’s how to work with a heap dump.” by Richard Schneeman (Last updated: 2017-06-19) 🇺🇸 131 | * [The Definitive Guide to Ruby Heap Dumps, Part II](https://blog.codeship.com/the-definitive-guide-to-ruby-heap-dumps-part-ii/)- “When you can’t reproduce memory bloat, here’s how to work with a heap dump.” by Richard Schneeman (Last updated: 2017-06-19) 🇺🇸 132 | 133 | ### RubyVM Internals 134 | * TODO 135 | 136 | ## Official Ruby bugtracker notes 137 | 138 | ### CPU Improvements 139 | * TODO 140 | 141 | ### Memory Improvements 142 | * 2019 143 | * [Introduce malloc_trim(0) in full gc cycles](https://bugs.ruby-lang.org/issues/15667) - Per Hongli's excellent article it looks like malloc_trim can help tremendously with memory bloat issues. 🇺🇸 144 | * 2018 145 | * [set M_ARENA_MAX for glibc malloc](https://bugs.ruby-lang.org/issues/14759) - Not everybody benefits from jemalloc and the extra download+install time is not always worth it. Lets make the user experience for glibc malloc users better, too. 🇺🇸 146 | * [Use jemalloc by default?](https://bugs.ruby-lang.org/issues/14718) 🇺🇸 147 | 148 | ## Interesting performance talks not about Ruby 149 | * [Emery Berger](https://www.youtube.com/watch?v=r-TLSBdHe1A) 🇺🇸 150 | * [Carl Cook](https://www.youtube.com/watch?v=NH1Tta7purM) 🇺🇸 151 | * [Brendan Gregg blog](http://www.brendangregg.com/) 🇺🇸 152 | --------------------------------------------------------------------------------