RSS Amplifier

Blog

Speedshop - Ruby on Rails performance consulting

Speedshop is a Ruby on Rails performance consultancy that optimizes the full stack - frontend, backend and environment - to generate revenue and cut scaling costs for businesses on Rails. Fast sites are profitable sites. Speed is a feature.

speedshop.coSource feed ↗10 posts

Live Last read · last published · next check

Latest posts

Organization for Transformative Works Performance Audit

What follows is the complete text of an audit report I produced for the Organization for Transformative Works, a non-profit which was for many years run one of the largest fan-fiction archives on the Internet. This was produced as part of my Ruby on Rails performance retainer service . Since the app is open source, OTW has kindly agreed to let me publish the report online for all to see. The…

Announcing the Rails Performance Apocrypha

Hello Rubyists! Today, I’m launching a new product: The Ruby on Rails Performance Apocrypha. Over the last four years, I’ve written a lot of stuff to this newsletter. Until now, none of that stuff has been publicly accessible if you wanted to go back and read it again. If something useful was posted to the newsletter before you subscribed, you were just sort of screwed. So, I’ve compiled 4 years…

We Made Puma Faster With Sleep Sort

Puma 5 (codename Spoony Bard 1 (When Puma gets a new ‘supercontributor’ that submits lots of important work to the project, we let them name the next release. This release features a lot of code from Will Jordan, who named this release ‘Spoony Bard’. Will said: ‘Final Fantasy IV is especially nostalgic for me, the first big open-source project I ever worked on was a fan re-translation of the game…

The Practical Effects of the GVL on Scaling in Ruby

The Global Virtual Machine Lock confuses many Rubyists. Most Rubyists I’ve met have a vague sense that the GVL is somehow bad, and has something to do concurrency or parallelism. (‘CRuby’ refers to the mainline Ruby implementation, written in C. Sometimes people call this ‘MRI’.) The GVL (formerly known as GIL, as you’re about to learn) is a unique feature to CRuby, and doesn’t exist in JRuby or…

The World Follows Power Laws: Why Premature Optimization is Bad

(This post is a sample of the content available in the Complete Guide to Rails Performance . It’s actually the first lesson - there are 30+ more lessons and 18 hours of video in the course itself.) I want to tell you about a physicist from Schenectady, a Harvard linguist, and an Italian economist. Pareto’s poltiical views are bit suspect, unfortunately, because he chose to see the way things are…

Why Your Rails App is Slow: Lessons Learned from 3000+ Hours of Teaching

“What I do have is a particular set of skills, a set of skills which makes me a nightmare for slow Rails applications like you.” For the last 4 years, I’ve been working on making Rails applications faster and more scalable. I teach workshops, I sell a course , and I consult . If you do anything for a long period of time, you start to see patterns. I’ve noticed four different factors that prevent…

3 ActiveRecord Mistakes That Slow Down Rails Apps: Count, Where and Present

“When does ActiveRecord execute queries? No one knows!” ActiveRecord is great. Really, it is. But it’s an abstraction, intended to insulate you from the actual SQL queries being run on your database. And, if you don’t understand how ActiveRecord works, you may be causing SQL queries to run that you didn’t intend to. Unfortunately, the performance costs of many features of ActiveRecord means we…

The Complete Guide to Rails Performance, Version 2

Today, the Complete Guide to Rails Performance has been updated to version 2.0. You can purchase it here . All existing purchasers have had their copies updated on Gumroad. When I started this project, I always believed that a digital course should be better than a typical paperback programming book. That’s why I don’t include any DRM or proprietary video codecs. That’s why I think, like most…

A New Ruby Application Server: NGINX Unit

There’s a new application server on the block for Rubyists - NGINX Unit. As you could probably guess by the name, it’s a project of NGINX Inc. , the for-profit open-source company that owns the NGINX web server. In fall of 2017, they announced the NGINX Unit project. It’s essentially an application server designed to replace all of the various application servers used with NGINX. In Ruby’s case,…

Malloc Can Double Multi-threaded Ruby Program Memory Usage

Sometimes, it really is that simple. It’s not every day that a simple configuration change can completely solve a problem. I had a client whose Sidekiq processes were using a lot of memory - about a gigabyte each. They would start at about 300MB each, then slowly grow over the course of several hours to almost a gigabyte, where they would start to level off. I asked him to change a single…