We don’t run an APM so I don’t have a pretty chart with a line moving drastically. Cobbling together shell hackery from StackOverflow answers for an unrigorous (traffic characteristics are different between the US workday and evening) stats, we seem to be spending significantly less time in ruby:
# if you want to hack on this, a log line looks like:
# I, [2023-09-10T20:08:15.849202 #868167] INFO -- : Completed 200 OK in 318ms (Views: 84.1ms | ActiveRecord: 62.8ms | Allocations: 138143)
# before deploy at 01:45 utc:
~/log$ cat production.log | sed '/2023-09-15T01:45/Q' | grep -oP "OK in \K[\d\.]+ms.*" | awk 'match($0, /^([[:digit:]\.]+)/, a) { tot+=a[1];cnt++ } END { print tot/cnt }'
91.1488
# after
~/log$ cat production.log | sed -ne '/2023-09-15T01:46/,$ p' | grep -oP "OK in \K[\d\.]+ms.*" | awk 'match($0, /^([[:digit:]\.]+)/, a) { tot+=a[1];cnt++ } END { print tot/cnt }'
72.0779
# allocations are also lower, which is either a source of perf win or error (because traffic changed by time of day)
~/log$ cat production.log | sed '/2023-09-15T01:45/Q' | grep -oP "OK in \K[\d\.]+ms.*" | awk 'match($0, /Allocations: ([[:digit:]\.]+)/, a) { tot+=a[1];cnt++ } END { print tot/cnt }'
16197
~/log$ cat production.log | sed -ne '/2023-09-15T01:46/,$ p' | grep -oP "OK in \K[\d\.]+ms.*" | awk 'match($0, /Allocations: ([[:digit:]\.]+)/, a) { tot+=a[1];cnt++ } END { print tot/cnt }'
15276.5
# These are not a "useless use of cat".
# Building a command like this makes it easy to swap cat for head/tail as I tinker.
I’m going to go ahead and call that a (91.1488−72.0779)/72.0779 = 1.26x speedup for a trivial commit. In the time-honored tradition of ad-hoc invalid one-off benchmarks, this is now the popular understanding of the precise speedup yjit gives every Rails app for the next decade. Thanks yjit authors!
This is the second time I’m aware of the codebase has been used for perf testing.
Does anyone know what happened to Noria? 5k commits in their github repo, but nothing since 2021. Did it get forked? Is there a rewrite? Did the funding run out and no one cared?
Could TrufflyRuby run it, or does it have many incompatible extensions for that? I find that project extremely impressive and would be interested in how it fares.
I learned about this while scrolling mastodon. This is the second time I’m aware of the codebase has been used for perf testing.
Shame for them that they did this before I did all the cleanup to our ansible playbook. That can’t have been too much fun to stand up.
https://github.com/lobsters/lobsters-ansible/commit/bb3aec298106c1a7af8488787a132ea6d2a83da0
We don’t run an APM so I don’t have a pretty chart with a line moving drastically. Cobbling together shell hackery from StackOverflow answers for an unrigorous (traffic characteristics are different between the US workday and evening) stats, we seem to be spending significantly less time in ruby:
I’m going to go ahead and call that a (91.1488−72.0779)/72.0779 = 1.26x speedup for a trivial commit. In the time-honored tradition of ad-hoc invalid one-off benchmarks, this is now the popular understanding of the precise speedup yjit gives every Rails app for the next decade. Thanks yjit authors!
Does anyone know what happened to Noria? 5k commits in their github repo, but nothing since 2021. Did it get forked? Is there a rewrite? Did the funding run out and no one cared?
PlanetScale picked up the concept but I don’t know what happened to Noria itself.
It is now a fully fledged company called ReadySet. The code for self hosting is open source: https://github.com/readysettech/readyset.
However Jon is not working for that company. Never found out why though.
Could TrufflyRuby run it, or does it have many incompatible extensions for that? I find that project extremely impressive and would be interested in how it fares.
I’ve never considered it and have no idea.