> I believe `Rack::Timeout` does trigger a full process shutdown after killing a thread.
You need to opt in by enabling `term_on_timeout` (github.com/zombocom/rac...).
@joshuay03.bsky.social
Software Engineer at Buildkite, Rubyist, and OSS contributor.
> I believe `Rack::Timeout` does trigger a full process shutdown after killing a thread.
You need to opt in by enabling `term_on_timeout` (github.com/zombocom/rac...).
TIL ๐ Thanks!
26.07.2025 08:53 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0Yes, just 3-12 bytes:
- github.com/puma/puma/bl...
- github.com/puma/puma/bl...
Good point, mmap + polling + small messages is probably less efficient than using pipes in this case. I'm still going to give it a go to scratch that itch ๐
Iโm curious how Puma would perform with mmap instead of pipes, which it relies on heavily for IPC in cluster mode: github.com/puma/puma/bl....
26.07.2025 04:24 โ ๐ 1 ๐ 0 ๐ฌ 2 ๐ 0I wrote (or rewrote) some gems to get better at Ruby C extensions and learn about these topics (CAS and mmap):
- github.com/joshuay03/at...
- github.com/joshuay03/mm...
I'm curious about this too. With YJIT in maintenance mode, bug fixes, UX improvements, etc., are probably welcome (a colleague recently found and fixed one). But with ZJIT being greenfield WIP, I'm not so sure. Completely understandable if that's the case though.
13.06.2025 22:08 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0Young* ๐
10.05.2025 11:14 โ ๐ 2 ๐ 0 ๐ฌ 1 ๐ 0Had a blast at #RubyKaigi 2025!
www.linkedin.com/posts/joshua...
Great talk! Though my favorite is still the one you gave at RailsConf 2022.
As a noob OSS contributor and maintainer, Iโve learned a lot from your talks about the "duties" and "responsibilities" of both sides in OSS interactionsโIโm trying to apply those principles in my own work as well.
#RubyKaigi late night with #RubyFriends !
16.04.2025 16:23 โ ๐ 3 ๐ 1 ๐ฌ 0 ๐ 0It's not perfect but it does the job! Please let me know how you go if you give it a whirl.
So far I've tried it on three Rails monoliths of decent scale (including Buildkite's), and it gives me everything I need to profile requests in a multithreaded development environment - both Ruby and IO.
My current focus is production support.
I'm also hoping to add support for a few more useful AS notification events: github.com/jhawthorn/ve...
Then, I'd like to start thinking about adding some custom hooks to integrate with other gems.
With Dial, Vernier does all the heavy lifting, and viewing a request profile is just a click away. The hook into AS notifications is simple yet powerful, giving you a useful timeline of the events that matter.
I've included N+1 detection and VM stat diffs to complement these, open to more ideas.
Announcing Dial, a Rails application profiler: github.com/joshuay03/dial
I've longed for a free tool that provides Datadog-like profiles, with accurate GVL and GC activity. Thanks to @jhawthorn.com's amazing work on Vernier, all I needed to do was integrate it with Rails and let it do its thing.
FYI the year on the post is 2022.
09.04.2025 00:29 โ ๐ 1 ๐ 0 ๐ฌ 1 ๐ 0See you at RubyKaigi!
22.03.2025 01:10 โ ๐ 3 ๐ 0 ๐ฌ 1 ๐ 0Makes sense, thank you for clarifying.
10.03.2025 01:22 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0Sorry, I wasn't clear. If 8/10 threads are ~75% IO bound but with a reasonable spread e.g. query -> serialise, cache -> serialise etc., the CPU bound thread(s) will be interrupted quite often as they interleave. Is that something to be concerned about?
09.03.2025 23:18 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0Interesting. Do you think that could introduce the opposite problem (CPU bound thread starvation in IO heavy workloads)?
09.03.2025 10:18 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0I tried writing a basic Fiber scheduler based on this idea, but I haven't had the time to pick it back up (hit a roadblock with some segfaults with multiple threads). Took a while for it to occur to me that Threads might be able to work this way too...
github.com/joshuay03/fi...
Which would hopefully ease CPU bound thread monopolisation?
Obviously there'd be a bunch of other constraints e.g. need at least one other thread releasing the GVL pre-100ms, need to have a sensible lower bound/reasonable context switch overhead. Probably many more I haven't thought of...
Essentially CPU bound threads would have their priority gradually lowered the more complete slices they're granted:
- slice 1 100ms (priority 0)
- slice 2 100ms (priority 0)
- slice 3 50ms (priority -1) # arbitrary pick
...
Got slice calculation from: github.com/bensheldon/g...
I wonder what it would look like if Thread#priority was automatically set by the scheduler based on number of complete time slices utilised (100ms). I'm thinking Linux CFS-like scheduling using a red-black tree.
en.wikipedia.org/wiki/Complet... en.wikipedia.org/wiki/Red%E2%...
Random thought about Ruby thread scheduling fairness that I don't have sufficient knowledge of the VM to answer myselfโwithout probably banging my head against a wall for a couple of days or weeks ๐งต
09.03.2025 09:48 โ ๐ 0 ๐ 0 ๐ฌ 2 ๐ 0#24 of 564 contributors to Rails last yearโnot too shabby for mostly working on OSS in my free time! Hoping to keep the momentum going in 2025 ๐
contributors.rubyonrails.org/contributors...
Happy Birthday!
17.12.2024 09:59 โ ๐ 1 ๐ 0 ๐ฌ 0 ๐ 0