# orderedItems[].object.content
Puma 6.5.0 is out!

https://github.com/puma/puma/releases/tag/v6.5.0

# orderedItems[].object.contentMap.en
Puma 6.5.0 is out!

https://github.com/puma/puma/releases/tag/v6.5.0

# orderedItems[].object.content
If you've got *1 million* concurrent users, saving $2 million/year in infra is hopefully not the most important thing for that business.

# orderedItems[].object.contentMap.en
If you've got *1 million* concurrent users, saving $2 million/year in infra is hopefully not the most important thing for that business.

# orderedItems[].object.content
Had a little “lost my yubikey” scare. Now I’ve done what I should have done in the first place: made it hard to misplace and have two to begin with!

# orderedItems[].object.contentMap.en
Had a little “lost my yubikey” scare. Now I’ve done what I should have done in the first place: made it hard to misplace and have two to begin with!

# orderedItems[].object.content
@pointlessone @getajobmike no, but they haven't accepted jemalloc as default for largely the same reason

# orderedItems[].object.contentMap.en
@pointlessone @getajobmike no, but they haven't accepted jemalloc as default for largely the same reason

# orderedItems[].object.content
The easiest way to spout bullshit about performance is to talk in relative terms only (this is 3x faster than before!) without reference to the absolute.

Great, your new code is 3x faster. But it runs 3 million iter/sec and we only call it once.

# orderedItems[].object.contentMap.en
The easiest way to spout bullshit about performance is to talk in relative terms only (this is 3x faster than before!) without reference to the absolute.

Great, your new code is 3x faster. But it runs 3 million iter/sec and we only call it once.

# orderedItems[].object.content
@getajobmike I'm thinking it would be useful (maybe I'll write a gem?) for a Rails app to blow up in dev if yjit is not on. Simply fail to start and say "yjit isn't enabled because a) you didnt call yjit.enable or b) ruby wasn't compiled w/yjit support.

# orderedItems[].object.contentMap.en
@getajobmike I'm thinking it would be useful (maybe I'll write a gem?) for a Rails app to blow up in dev if yjit is not on. Simply fail to start and say "yjit isn't enabled because a) you didnt call yjit.enable or b) ruby wasn't compiled w/yjit support.

# orderedItems[].object.content
@getajobmike No. It will never be a default because core will never accept a dependency on Rust.

I'm thinking in dev, all of the build tools aren't compiling w/yjit on by default.

# orderedItems[].object.contentMap.en
@getajobmike No. It will never be a default because core will never accept a dependency on Rust.

I'm thinking in dev, all of the build tools aren't compiling w/yjit on by default.

# orderedItems[].object.content
Is there a compelling argument for _not_ always using YJIT locally/in development?

I think most people aren't.

# orderedItems[].object.contentMap.en
Is there a compelling argument for _not_ always using YJIT locally/in development?

I think most people aren't.

# orderedItems[].object.content
Imagine that one of the DBs for your app suddenly had 100ms added to every call. You need to access this DB currently 1 to 30 times per transaction.

What would you do to compensate for this added latency?

# orderedItems[].object.contentMap.en
Imagine that one of the DBs for your app suddenly had 100ms added to every call. You need to access this DB currently 1 to 30 times per transaction.

What would you do to compensate for this added latency?

# orderedItems[].object.content
I've written a ~500 line web application load simulator in Ruby. You give it the number of servers, processes, threads, p50 and p95 response times, # of db VCPU, and I/O wait %, and it Monte Carlo simulates your maximum possible req/sec.

Deploying as a tool for retainer clients soon.

# orderedItems[].object.contentMap.en
I've written a ~500 line web application load simulator in Ruby. You give it the number of servers, processes, threads, p50 and p95 response times, # of db VCPU, and I/O wait %, and it Monte Carlo simulates your maximum possible req/sec.

Deploying as a tool for retainer clients soon.

# orderedItems[].object.content
@irvingreid definitely, but you can control this with an actual db pooler (i.e. pgbouncer) and throttling concurrency (reducing puma threadpool). Controlling it via ActiveRecord pool just increases latency.

# orderedItems[].object.contentMap.en
@irvingreid definitely, but you can control this with an actual db pooler (i.e. pgbouncer) and throttling concurrency (reducing puma threadpool). Controlling it via ActiveRecord pool just increases latency.

# orderedItems[].object.content
Underrated/missed change from Dima Fatko to basecamp/marginalia:

https://github.com/basecamp/marginalia/commit/226f93234b0ca58f548c5af23e229bdf3bf15ad5

I've profiled the previous version using caller and felt that capturing line numbers were too expensive as a result. caller_locations is a new-ish API and this change would make a big difference!

# orderedItems[].object.contentMap.en
Underrated/missed change from Dima Fatko to basecamp/marginalia:

https://github.com/basecamp/marginalia/commit/226f93234b0ca58f548c5af23e229bdf3bf15ad5

I've profiled the previous version using caller and felt that capturing line numbers were too expensive as a result. caller_locations is a new-ish API and this change would make a big difference!

# orderedItems[].object.content
The costs of setting pools too low is obvious - high latency caused by concurrent threads blocking on checking out a connection.

Pool "too high" cost is you don't catch leaks. But leaks have been far less of an issue in recent years, and there's probably better ways to detect.

# orderedItems[].object.contentMap.en
The costs of setting pools too low is obvious - high latency caused by concurrent threads blocking on checking out a connection.

Pool "too high" cost is you don't catch leaks. But leaks have been far less of an issue in recent years, and there's probably better ways to detect.

# orderedItems[].object.content
sorry, RMT = RAILS_MAX_THREADS or whatever you use to set your puma/sidekiq concurrency

# orderedItems[].object.contentMap.en
sorry, RMT = RAILS_MAX_THREADS or whatever you use to set your puma/sidekiq concurrency

# orderedItems[].object.content
I'm wondering if database pools should always be set to 25 conns.

Puma/Sidekiq is not the only source of concurrency. load_async, Parallel, Thread.new, fibers, etc. So RMT + 5 doesn't make sense.

25 is low enough to catch leaks, high enough to allow concurrency

# orderedItems[].object.contentMap.en
I'm wondering if database pools should always be set to 25 conns.

Puma/Sidekiq is not the only source of concurrency. load_async, Parallel, Thread.new, fibers, etc. So RMT + 5 doesn't make sense.

25 is low enough to catch leaks, high enough to allow concurrency

# orderedItems[].object.content
Check out this before/after shot of our retainer client deploying a bunch of missing foreign key indexes identified by ids_must_be_indexed.

https://github.com/speedshop/ids_must_ be_indexed

# orderedItems[].object.contentMap.en
Check out this before/after shot of our retainer client deploying a bunch of missing foreign key indexes identified by ids_must_be_indexed.

https://github.com/speedshop/ids_must_ be_indexed

# orderedItems[].object.content
@spectral sleep until timeout is up is dangerous as it greatly increases the concurrency of the system when the lock is hit. better to just fail fast and re-enqueue

# orderedItems[].object.contentMap.en
@spectral sleep until timeout is up is dangerous as it greatly increases the concurrency of the system when the lock is hit. better to just fail fast and re-enqueue

# orderedItems[].object.content
mosh --predict=experimental is CRAZY good for removing latency on SSH connections. I will probably never use ssh again.

# orderedItems[].object.contentMap.en
mosh --predict=experimental is CRAZY good for removing latency on SSH connections. I will probably never use ssh again.

# orderedItems[].object.content
If you want to limit concurrency to an external HTTP API, create a remote gateway class and put the limiter THERE, not on background jobs that access the API.

It's really common for teams to end up with a spaghetti of locks on jobs that end up over or under throttling the API calls. Have one lock, in one place, not on the job.

# orderedItems[].object.contentMap.en
If you want to limit concurrency to an external HTTP API, create a remote gateway class and put the limiter THERE, not on background jobs that access the API.

It's really common for teams to end up with a spaghetti of locks on jobs that end up over or under throttling the API calls. Have one lock, in one place, not on the job.

# orderedItems[].object.content
You should know about hyperfine:

https://github.com/sharkdp/hyperfine

# orderedItems[].object.contentMap.en
You should know about hyperfine:

https://github.com/sharkdp/hyperfine