@nateberkopec@mastodon.social
@nateberkopec@mastodon.social avatar

nateberkopec

@nateberkopec@mastodon.social

Author, The Complete Guide to Rails Performance. Co-maintainer of Puma. http://speedshop.co (he/him)

This profile is from a federated server and may be incomplete. Browse more on the original instance.

nateberkopec, to random
@nateberkopec@mastodon.social avatar

Almost everyone uses an exception tracker (e.g. Sentry) to track errors in production. These become bug tickets, sometimes even automatically. Bugs get fixed.

Do you have something like this for performance? If you don't, are you wondering why your engineers never fix perf?

tenderlove, to random
@tenderlove@mastodon.social avatar

First time driving on the left! 😵😵😵

nateberkopec,
@nateberkopec@mastodon.social avatar

@tenderlove checks JP ruby conference schedule what am I missing here

nateberkopec,
@nateberkopec@mastodon.social avatar

@tenderlove whoops yup of course, it's november! I did miss this 😆 enjoy!

nateberkopec, to random
@nateberkopec@mastodon.social avatar

Most of the time, you don't want "performance" testing. These setups are brittle and bad at predicting production usage.

Far better to feature flag, roll out to small groups (1%, then 5%, etc) and see what happens.

nateberkopec,
@nateberkopec@mastodon.social avatar

@camertron Seems fine to me. Allocations are deterministic, latency is not, which was more of what I was getting at in the OP

nateberkopec, to random
@nateberkopec@mastodon.social avatar

Aaron Patterson and John Hawthorn have created a new profiler for Ruby:

  1. It can profile multiple threads
  2. It has "markers" for when events happen, independent of the callstack/timeline

https://github.com/jhawthorn/vernier

nateberkopec, to random
@nateberkopec@mastodon.social avatar

Redis is not faster than your SQL database, it's just different.

It's usually under less load. It's key-value, not relational, so looking up simple things can feel faster (but would sometimes also be fast if you just used a hash index on your SQL database).

It's not magical performance dust, just different.

nateberkopec, to random
@nateberkopec@mastodon.social avatar

@tenderlove “sampling profiling is vibes based profiling” legendary cool stuff livestream quote

nateberkopec,
@nateberkopec@mastodon.social avatar

@tenderlove the marker chart tho 😍😍

nateberkopec,
@nateberkopec@mastodon.social avatar

@tenderlove when you showed how one thread was working while the other was waiting on IO

Meme Reaction GIF

nateberkopec,
@nateberkopec@mastodon.social avatar

@tenderlove is this stable enough for us to build into rack mini profiler?

nateberkopec,
@nateberkopec@mastodon.social avatar

@tenderlove Yeah, but we can probably ship both for a while if necessary, that's not a huge blocker. I don't think it's that much code in RMP.

nateberkopec, to random
@nateberkopec@mastodon.social avatar

I find that Rails apps that use serializers have more problems than apps that use templates (jbuilder, or just no JSON, HTML templates only).

Serializers cause a little too much abstraction between dev and data, leading to careless mistakes about data access and N+1s galore

nateberkopec, to random
@nateberkopec@mastodon.social avatar

The first step to a scalable web service is automatic autoscaling.

Without autoscaling, you're just waiting for a flash sale, social media post, or other "white swan" event to take down your site at just the wrong moment.

nateberkopec,
@nateberkopec@mastodon.social avatar

@renchap Sure, I'd love to help. email is "me@<myusernamegoeshere>.com"

nateberkopec, to random
@nateberkopec@mastodon.social avatar

I would be skeptical about advice on how to run a company from someone that caused a third of their company to voluntarily quit en-masse.

nateberkopec, to random
@nateberkopec@mastodon.social avatar

100% not interested in a new Zuck social network, thanks.

nateberkopec,
@nateberkopec@mastodon.social avatar

We tried this already folks, we all know where this goes.

nateberkopec, to random
@nateberkopec@mastodon.social avatar

Everyone should be using Spot instances for all web and background job workloads.

Your requests should be timing out after 60 seconds tops, and your background jobs should be resumable (or at least idempotent). Spot is not a problem. Take the 70% savings off your AWS bill.

nateberkopec, to random
@nateberkopec@mastodon.social avatar

ActiveRecord::QueryCache is no longer of unbounded size!

https://github.com/rails/rails/pull/48110

I predict a lot of "my memory usage went way down!" posts after the next Rails release...

nateberkopec, to random
@nateberkopec@mastodon.social avatar

What is the logical equivalent of !(predicate? && predicate2?) without parentheses?

A: https://simple.wikipedia.org/wiki/De_Morgan's_laws?wprov=sfti1

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • provamag3
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • JUstTest
  • All magazines