Top all-time · #13364
Trisha's Ramblings
Personal blog · mechanitis.blogspot.comprogramming
Trisha's Ramblings is a personal blog at mechanitis.blogspot.com about programming. Since 2012, 6 different Hacker News readers have linked it 6 times. The last post was in 2021, but the archive is still widely read.
Too few sampled comments (5) to say how often HN recommends it.?
Why HN links it
Trisha's blog posts explain the LMAX Disruptor, including its ring buffer design and object pooling. HN commenters cite them as sources in threads on lock-free queues, ring buffers and concurrency.
Summarised by Claude from a sample of 5 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Most-linked posts?
- /2011/06/dissecting-disruptor-whats-so-special.html3 people · 3 mentions · first linked 2014-09-24
What Hacker News says?
Using ring buffers is how networking has worked for a while now. They're nice because they're extremely fast, due to being in mechanical sympathy with hardware. http://mechanitis.blogspot.com/2011/06/dissecting-disruptor-... So I can't really speak to the API details, but the general concept seems like a good idea to me.
Comment linking /2011/06/dissecting-disruptor-whats-so-special.html
on “Efficient IO with io_uring [pdf]”Submitted Why the customer isn't always right as a story · 1 points
HN discussionThe OS IPC mechanism quite likely does not use a lock free queue -- or at least, not in quite the same way as I think the grandparent post refers to. Using a well implemented ring buffer [+] can get enqueue operations down to a few instructions and something like two memory fences. The overhead of IPC, which wakes up the kernel scheduler, switches the processor back and forth between privilege modes a few times on t…
Comment linking /2011/06/dissecting-disruptor-whats-so-special.html
on “Logging can be tricky”Yeah for sure, at any rate I went over the LMAX Disruptor link you provided and while it doesn't use "locks", it is not a lock-free data structure. The confusion is that their use of the work "lock" means yielding to the operating system, which they don't do, but if a thread is performing a write, then all other threads will spin in a tight loop (which is basically a spin lock) until the write is committed. This is…
Comment linking /2011/07/dissecting-disruptor-why-its-so-fast.html
on “Correctly implementing a spinlock in Modern C++”There are multiple ways to make a lock-free ringbuffer; most use some sort of similar trick with per-consumer atomic counters, though I hadn't heard of something as simple as the minimum-modulo trick described in the gp! Some implementations: http://mechanitis.blogspot.com/2011/07/dissecting-disruptor-... http://www.boost.org/doc/libs/1_59_0/doc/html/boost/lockfree... - hard to find implementation details though htt…
Comment linking /2011/07/dissecting-disruptor-writing-to-ring.html
on “Multithreaded toolkits: A failed dream? (2004)”Yep, that's what Disruptor is for. Here's a blog post by one of the devs giving more details about the ring buffer where she specifically mentions that objects are pooled to avoid the GC http://mechanitis.blogspot.com/2011/06/dissecting-disruptor-...
Comment linking /2011/06/dissecting-disruptor-whats-so-special.html
on “A Well Known but Forgotten Trick: Object Pooling”