Also, looking at those numbers, event machine was using more than 3x the processor time:
> (17.97+8.42) / 241.45
=> 0.10929799130254712
> (76.58+5.03) / 243.25
=> 0.3354984583761562
So even if, for example, it was 5% better in wall clock time (unproven), it's costing you ~3x in processor time.
Posts by
Realistically as long as the network is the same for both tests, it's not going to change the outcome, however it might affect the ratio of processor/network which could influence some of the numbers. I tried 10 x 100_000:
I changed the code to do 10 x 10,000 which is 100k. Better to benchmark with a fixed known load.
This is a good talk which will help give you a deeper understanding of how to compare these types of systems: www.youtube.com/watch?v=r-TL...
IOW, since eventmachine and async follow largely the same design strategy (event loop), I'd expect them to be similar in terms of performance.
One thing to confirm would be the use of per-message deflate and how it's negotiated. Since each message may need to be processed by libz/deflate, it could change the performance characteristics. This wouldn't be a comparison of async vs eventmachine, but different connection parameters.
One thing you'll notice is that while the wall clock run-time was about the same (25s) the actual user processor time was greatly reduced, in conclusion, one could say that async was more efficient (less time spent executing CPU instructions). I'm not sure what would specifically cause this though.
This benchmark is hard to draw conclusions from. The network conditions are constantly changing. I got similar results from both systems but I also saw fluctuations one way or another too. To really see the difference, you'd need to run a local "firehose" to remove the network variance.
Hello
Using `Module#set_temporary_name` (added by @ioquatix.bsky.social π€).
I am decorating Active Record with a module. Don't need a constant for it, and an unexpected constant could mess existing lookups up.
You'd typically use an anonymous module, but that is meaningless in ancestor chain listings.
ChatGPT wrote this code:
ruby(47811,0x1fc22c840) malloc: Heap corruption detected, free list is damaged at 0x60000040bc00
*** Incorrect guard value: 585253
ruby(47811,0x1fc22c840) malloc: *** set a breakpoint in malloc_error_break to debug
For example, when I switched @tinyzap.com from Puma to @ioquatix.bsky.social's Falcon server, my entire web application was much more responsive and loads faster in the browser because each image you see in the screenshot below fires a request to Rails to get the image URL.
The Ruby Fiber::Scheduler embraces the GVL while Threads constantly bump up against it. I specifically designed the scheduler to work with the GVL with minimal impact. However, that being said, in the future I want to remove the GVL and experiment with a work stealing multi-threaded scheduler.
Rack has passed 1 billion downloads.
I'll remember this for next time I'm in a meeting and asked a question I don't have an answer for.
You should write an adapter for bake.
Screenshot of a terminal that has a thread unsafe program displayed and a warning emitted when objects are mutated from different threads
Made a patch for Ruby that I think is cool, but probably can't be on by default. It emits a warning when an object is mutated from a thread that didn't create the object (patch is here: github.com/ruby/ruby/co...)
Good job GitHub Actions. Did it pass or fail? Oh, refresh the page. Status is updated to green tick... awesome.
At long last, Scattergun is back in business! Our focus was, and remains, simple and privacy focused mailing lists.
After a period of hibernation, we're also making a commitment to remain online and operation for as long as there are paying users.
Here's all the details:
Time for marshmallows π
Gone fishing.
Iβm having a sugar collapse. Will go swimming to burn off the excess energy.
Innovations in pizza: blueberry and marshmallow π
I will miss your newsletter, wishing you a speedy recovery!
I built a rock sculpture.
Many years ago in Reefton, I took this photo of a man and his pet possum. Possums are considered a pest in New Zealand, but I love the facial expressions in this photo.
Baking focaccia.
Ginger bread mountains.
ποΈ Earlier this year, I joined Ruby Rogues to talk about Async, Falcon, and advancing Rails with concurrency & streaming. π We explored challenges, simplifying deployments, and even gave Futurama a shoutout. πΊπ‘
www.youtube.com/watch?v=fpXB...