<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: anarazel</title><link>https://news.ycombinator.com/user?id=anarazel</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Sun, 12 Apr 2026 16:45:43 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=anarazel" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by anarazel in "Cirrus Labs to join OpenAI"]]></title><description><![CDATA[
<p>Ability to trivially use custom VM images was quite nice. The amount of CI time spent installing dependencies or copying a cache of installed stuff is nontrivial. Particularly for Windows the time difference is often very substantial. But even for plain Linux, there's no point in apt-get update && apt-get install the same set of things in every run (when using containers, cirrus could build them in-demand too, with little notational overhead).<p>Defaulting to throw-away-VMs for everything is also the right choice for something where the threat model includes attackers submitting patches/PRs. I'll never understand why folks were ok with just container separation for that (and often have <i>no</i> separation in runners).</p>
]]></description><pubDate>Sun, 12 Apr 2026 11:48:46 +0000</pubDate><link>https://news.ycombinator.com/item?id=47738588</link><dc:creator>anarazel</dc:creator><comments>https://news.ycombinator.com/item?id=47738588</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47738588</guid></item><item><title><![CDATA[New comment by anarazel in "The effects of caffeine consumption do not decay with a ~5 hour half-life"]]></title><description><![CDATA[
<p>Weirdly enough, I loved coffee from the first time I tried it, at maybe 13. Even though, looking back, it must have been terrible coffee, it was at something vaguely model UN like thing our entire class went to in an overnight trip. Obviously not enough sleep was had. A vending machine (in the late 90s) provided coffee...</p>
]]></description><pubDate>Fri, 10 Apr 2026 14:37:06 +0000</pubDate><link>https://news.ycombinator.com/item?id=47718826</link><dc:creator>anarazel</dc:creator><comments>https://news.ycombinator.com/item?id=47718826</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47718826</guid></item><item><title><![CDATA[New comment by anarazel in "AWS engineer reports PostgreSQL perf halved by Linux 7.0, fix may not be easy"]]></title><description><![CDATA[
<p>> ... so that leaves me confused. My understanding is that the regression is triggered with the 7.0+ kernel and can be mitigated with huge pages turned on.<p>It gets a bit worse with preempt_lazy - for me just 15% percent or so - because the lock holder is scheduled out a bit more often. But it was bad before.<p>> My question therefore was how come this regression hasn't been visible with huge pages turned off with older kernel versions? You say that it was but I can't find this data point.<p>I mean it wasn't a regression before, because this is how it has behaved for a long time.<p>This workload is not a realistic thing that anybody would encounter in this form in the real world. Even without the contention - which only happens the first time the buffer pool is filled - you lose so much by not using huge pages with a 100gb buffer pool that you will have many other issues.<p>We (postgres and me personally) were concerned enough about potential contention in this path that we did get rid of that lock half a year ago (buffer replacement selection has been lock free for close to a decade, just unused buffers were found via a list protected by this lock).<p>But the performance gains we saw were relatively small, we didn't measure large buffer pools without huge pages though.<p>And at least I didn't test with this many connections doing small random reads into a cold buffer pool, just because it doesn't seem that interesting.</p>
]]></description><pubDate>Mon, 06 Apr 2026 14:59:50 +0000</pubDate><link>https://news.ycombinator.com/item?id=47661809</link><dc:creator>anarazel</dc:creator><comments>https://news.ycombinator.com/item?id=47661809</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47661809</guid></item><item><title><![CDATA[New comment by anarazel in "AWS engineer reports PostgreSQL perf halved by Linux 7.0, fix may not be easy"]]></title><description><![CDATA[
<p>The contention <i>does</i> exist in older kernels and is quite substantial.</p>
]]></description><pubDate>Mon, 06 Apr 2026 12:22:12 +0000</pubDate><link>https://news.ycombinator.com/item?id=47659984</link><dc:creator>anarazel</dc:creator><comments>https://news.ycombinator.com/item?id=47659984</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47659984</guid></item><item><title><![CDATA[New comment by anarazel in "AWS engineer reports PostgreSQL perf halved by Linux 7.0, fix may not be easy"]]></title><description><![CDATA[
<p>> That 64-bit atomic in the buffer head with flags, a spinlock, and refcounts all jammed into it is nasty.<p>Turns out to be pretty crucial for performance though... Not manipulating them with a single atomic leads to way way worse performance.<p>For quite a while it was a 32bit atomic, but I recently made it a 64bit one, to allow the content lock (i.e. protecting the buffer contents, rather than the buffer header) to be in the same atomic var.   That's for one nice for performance, it's e.g. very common to release a pin and a lock at the same time and there are more fun perf things we can do in the future.  But the real motivation was work on adding support for async writes - an exclusive locker might need to consume an IO completion for a write that's in flight that is prevent it from acquiring the lock.  And that was hard to do with a separate content lock and buffer state...<p>> And there are like ten open coded spin waits around the uses... you certainly have my empathy :)<p>Well, nearly all of those are all to avoid needing to hold a spinlock, which, as lamented a lot around this issue, don't perform that well when really contended :)<p>We're on our way to barely ever need the spinlock for the buffer header, which then should allow us to get rid of many of those loops.<p>> This got me thinking about 64-bit futexes again. Obviously that can't work with PI... but for just FUTEX_WAIT/FUTEX_WAKE, why not?<p>It'd be pretty nice to have.  There are lot of cases where one needs more lock state than one can really encode into a 32bit lock state.<p>I'm quite keen to experiment with the rseq time slice extension stuff. Think it'll help with some important locks (which are not spinlocks...).</p>
]]></description><pubDate>Sun, 05 Apr 2026 18:38:51 +0000</pubDate><link>https://news.ycombinator.com/item?id=47652504</link><dc:creator>anarazel</dc:creator><comments>https://news.ycombinator.com/item?id=47652504</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47652504</guid></item><item><title><![CDATA[New comment by anarazel in "AWS engineer reports PostgreSQL perf halved by Linux 7.0, fix may not be easy"]]></title><description><![CDATA[
<p>> > On x86 a spinlock release doesn't need a memory barrier (unless you do insane things) / lock prefix, but a futex based lock does (because you otherwise may not realize you need to futex wake).<p>> Now you've gotten me wondering. This issue is, in some sense, artificial: the actual conceptual futex unlock operation does not require sequential consistency. What's needed is (roughly, anyway) an release operation that synchronizes with whoever subsequently acquires the lock (on x86, any non-WC store is sufficient) along with a promise that the kernel will get notified eventually (and preferably fairly quickly) if there was a non-spinning sleeper. But there is no requirement that the notification occur in any particular order wrt anything else except that the unlock must be visible by the time the notification occurs [0]; there isn't even a requirement that the notification not occur if there is no futex waiter.<p>Hah.<p>> ...
> But maybe there are sneaky tricks. I'm wondering whether CMPXCHG (no lock) is secretly good enough for this. Imagine a lock word where bit 0 set means locked and bit 1 set means that there is a waiter. The wait operation observes (via plain MOV?) that bit 0 is set and then sets bit 1 (let's say this is done with LOCK CMPXCHG for simplicity) and then calls futex_wait(), so it thinks the lock word has the value 3. The unlock operation does plain CMPXCHG to release the lock. The failure case would be that it reports success while changing the value from 1 to 0. I don't know whether this can happen on Intel or AMD architectures.<p>I suspect the problem isn't so much the lock prefix, but that the non-futex spinlock release just is a store, whereas a futex release has to be a RMW operation.<p>I'm talking out of my ass here, but my guess is that the reason for the performance gain of the plain-store-is-a-spinlock-release on x86 comes from being able to do the release via the store buffer, without having to wait for exclusive ownership of the cache line.  Due to being a somewhat contended simple spinlock, often embedded on the same line as the to-be-protected data, it's common for the line not not be in modified ownership anymore at release.</p>
]]></description><pubDate>Sun, 05 Apr 2026 16:57:13 +0000</pubDate><link>https://news.ycombinator.com/item?id=47651340</link><dc:creator>anarazel</dc:creator><comments>https://news.ycombinator.com/item?id=47651340</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47651340</guid></item><item><title><![CDATA[New comment by anarazel in "AWS engineer reports PostgreSQL perf halved by Linux 7.0, fix may not be easy"]]></title><description><![CDATA[
<p>Addendum big enough to warrant a separate post: The fact the contention is a spinlock, rather than a futex is unrelated to the "regression".<p>A quick hack shows the contended performance to be nearly indistinguishable with a futex based lock. Which makes sense, non-PI futexes don't transfer the scheduler slice the lock owner, because they don't know who the lock owner is. Postgres' spinlock use randomized exponential backoff, so they don't prevent the lock owner from getting scheduled.<p>Thus the contention is worse with PREEMPT_LAZY, even with non-PI futexes (which is what typical lock implementations are based on), because the lock holder gets scheduled out more often.<p>Probably worth repeating: This contention is due to an absurd configuration that should never be used in practice.</p>
]]></description><pubDate>Sun, 05 Apr 2026 14:29:38 +0000</pubDate><link>https://news.ycombinator.com/item?id=47649826</link><dc:creator>anarazel</dc:creator><comments>https://news.ycombinator.com/item?id=47649826</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47649826</guid></item><item><title><![CDATA[New comment by anarazel in "AWS engineer reports PostgreSQL perf halved by Linux 7.0, fix may not be easy"]]></title><description><![CDATA[
<p>I really dislike the use of spinlocks in postgres (and have been replacing a lot of uses over time), but it's not always easy to replace them from a performance angle.<p>On x86 a spinlock release doesn't need a memory barrier (unless you do insane things) / lock prefix, but a futex based lock does (because you otherwise may not realize you need to futex wake). Turns out that that increase in memory barriers causes regressions that are nontrivial to avoid.<p>Another difficulty is that most of the remaining spinlocks are just a single bit in a 8 larger byte atomic. Futexes still don't support anything but 4 bytes (we could probably get away with using it on a part of the 8 byte atomic with some reordering) and unfortunately postgres still supports platforms with no 8 byte atomics (which I think is supremely silly), and the support for a fallback implementation makes it harder to use futexes.<p>The spinlock triggering the contention in the report was just stupid and we only recently got around to removing it, because it isn't used during normal operation.<p>Edit: forgot to add that the spinlock contention is not measurable on much more extreme workloads when using huge pages. A 100GB buffer pool with 4KB pages doesn't make much sense.</p>
]]></description><pubDate>Sun, 05 Apr 2026 13:22:44 +0000</pubDate><link>https://news.ycombinator.com/item?id=47649201</link><dc:creator>anarazel</dc:creator><comments>https://news.ycombinator.com/item?id=47649201</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47649201</guid></item><item><title><![CDATA[New comment by anarazel in "AWS engineer reports PostgreSQL perf halved by Linux 7.0, fix may not be easy"]]></title><description><![CDATA[
<p>I don't fully know, but I suspect it's just that due to the minor faults and tlb misses there is terrible contention with the spinlock, regardless of the PREEMPT_LAZY when using 4k pages (that easily reproducible). Which is then made worse by preempting more with the lock held.</p>
]]></description><pubDate>Sun, 05 Apr 2026 13:00:05 +0000</pubDate><link>https://news.ycombinator.com/item?id=47648973</link><dc:creator>anarazel</dc:creator><comments>https://news.ycombinator.com/item?id=47648973</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47648973</guid></item><item><title><![CDATA[New comment by anarazel in "AWS engineer reports PostgreSQL perf halved by Linux 7.0, fix may not be easy"]]></title><description><![CDATA[
<p>Yes, I did reproduce it (to a much smaller degree, but it's just a 48c/96t machine). But it's an absurd workload in an insane configuration. Not using huge pages hurts way more than the regression due to PREEMPT_LAZY does.<p>With what we know so far, I expect that there are just about no real world workloads that aren't already completely falling over that will be affected.</p>
]]></description><pubDate>Sun, 05 Apr 2026 05:20:43 +0000</pubDate><link>https://news.ycombinator.com/item?id=47646332</link><dc:creator>anarazel</dc:creator><comments>https://news.ycombinator.com/item?id=47646332</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47646332</guid></item><item><title><![CDATA[New comment by anarazel in "RISC-V Is Sloooow"]]></title><description><![CDATA[
<p>Cross building of possible, but it's rather useful to be able to test the software you just built... And often enough, tests take more resources than the build.</p>
]]></description><pubDate>Wed, 11 Mar 2026 01:35:53 +0000</pubDate><link>https://news.ycombinator.com/item?id=47330886</link><dc:creator>anarazel</dc:creator><comments>https://news.ycombinator.com/item?id=47330886</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47330886</guid></item><item><title><![CDATA[New comment by anarazel in "Story of XZ Backdoor [video]"]]></title><description><![CDATA[
<p>Just German, not European, but still a start: 
<a href="https://en.wikipedia.org/wiki/Sovereign_Tech_Agency" rel="nofollow">https://en.wikipedia.org/wiki/Sovereign_Tech_Agency</a></p>
]]></description><pubDate>Thu, 26 Feb 2026 14:57:56 +0000</pubDate><link>https://news.ycombinator.com/item?id=47166974</link><dc:creator>anarazel</dc:creator><comments>https://news.ycombinator.com/item?id=47166974</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47166974</guid></item><item><title><![CDATA[New comment by anarazel in "Why E cores make Apple silicon fast"]]></title><description><![CDATA[
<p>It's very heavily dependent on what your processes are doing. I've seen extreme cases where the gains of pinning were large (well over 2x when cooperative tasks were pinned to the same core), but thats primarily about preventing the CPU from idling long enough to enter deeper idle states.</p>
]]></description><pubDate>Sun, 08 Feb 2026 16:42:42 +0000</pubDate><link>https://news.ycombinator.com/item?id=46935946</link><dc:creator>anarazel</dc:creator><comments>https://news.ycombinator.com/item?id=46935946</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46935946</guid></item><item><title><![CDATA[New comment by anarazel in "Unconventional PostgreSQL Optimizations"]]></title><description><![CDATA[
<p>> PostgreSQL shares other caches between processes so they probably could have a global plan cache if they wanted. I wonder why they don’t though.<p>> One possible reason is that the planner configuration can be different per connection, so the plans might not transfer<p>That's part of it, another big part is that the transactional DDL makes it more complicated, as different sessions might require different plans.</p>
]]></description><pubDate>Wed, 21 Jan 2026 13:14:45 +0000</pubDate><link>https://news.ycombinator.com/item?id=46705280</link><dc:creator>anarazel</dc:creator><comments>https://news.ycombinator.com/item?id=46705280</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46705280</guid></item><item><title><![CDATA[New comment by anarazel in "Generate QR Codes with Pure SQL in PostgreSQL"]]></title><description><![CDATA[
<p>I would hope it's at least 3-4 orders of magnitude slower than a "traditional QR library". It'd be quite the indictment for such libraries, if not.</p>
]]></description><pubDate>Thu, 15 Jan 2026 17:44:45 +0000</pubDate><link>https://news.ycombinator.com/item?id=46636303</link><dc:creator>anarazel</dc:creator><comments>https://news.ycombinator.com/item?id=46636303</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46636303</guid></item><item><title><![CDATA[New comment by anarazel in "LLVM: The bad parts"]]></title><description><![CDATA[
<p>I know, but even if it's not breaking promises, the constant stream of changes still makes it still rather painful to utilize LLVM. Not helped by the fact that unless you embed LLVM you have to deal with a lot of different LLVM versions out there...</p>
]]></description><pubDate>Mon, 12 Jan 2026 19:03:52 +0000</pubDate><link>https://news.ycombinator.com/item?id=46592739</link><dc:creator>anarazel</dc:creator><comments>https://news.ycombinator.com/item?id=46592739</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46592739</guid></item><item><title><![CDATA[New comment by anarazel in "LLVM: The bad parts"]]></title><description><![CDATA[
<p>FWIW, the article says "Frontends are somewhat insulated from this because they can use the largely stable C API." but that's not been my/our experience. There are parts of the API that are somewhat stable, but other parts (e.g. Orc) that change wildly.</p>
]]></description><pubDate>Mon, 12 Jan 2026 18:17:02 +0000</pubDate><link>https://news.ycombinator.com/item?id=46592119</link><dc:creator>anarazel</dc:creator><comments>https://news.ycombinator.com/item?id=46592119</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46592119</guid></item><item><title><![CDATA[New comment by anarazel in "Vacuum Is a Lie: About Your Indexes"]]></title><description><![CDATA[
<p>I'm certainly very biased (having worked on postgres for way too long), so it's entirely plausible that I've over-observed and over-analyzed the criticism, leading to my description.<p>> I (we?) think Postgres is incredibly important, and I think we have properly contextualized our use of it. Moreover, I think it is unfair to simply deny us our significant experience with Postgres because it was not unequivocally positive -- or to dismiss us recounting some really difficult times with the system as "bashing" it. Part of being a consequential system is that people will have experience with it; if one views recounting that experience as showing insufficient "respect" to its developers, it will have the effect of discouraging transparency rather than learning from it.<p>I agree that criticism is important and worthwhile!  It's helpful though if it's at least somewhat actionable. We can't travel back in time to fix the problems you had in the early 2010s...  My experience of the criticism of the last years from the "oxide corner" was that it sometimes felt somewhat unrelated to the context and to today's postgres.<p>> if one views recounting that experience as showing insufficient "respect" to its developers<p>I should really have come up with a better word, but I'm still blanking on choosing a really apt word, even though I know it exists. I could try to blame ESL for it, but I can't come up with a good German word for it either... Maybe "goodwill". Basically believing that the other party is trying to do the right thing.</p>
]]></description><pubDate>Mon, 15 Dec 2025 17:33:47 +0000</pubDate><link>https://news.ycombinator.com/item?id=46277574</link><dc:creator>anarazel</dc:creator><comments>https://news.ycombinator.com/item?id=46277574</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46277574</guid></item><item><title><![CDATA[New comment by anarazel in "Vacuum Is a Lie: About Your Indexes"]]></title><description><![CDATA[
<p>> First, although I work at Oxide, please don't think I speak for Oxide. None of this happened at Oxide. It informed some of the choices we made at Oxide and we've talked about that publicly. I try to remember to include the caveat that this information is very dated (and I made that edit immediately after my initial comment above).<p>I said oxide, because it's come up so frequently and at such length on the oxide podcast...  Without that I probably wouldn't have commented here.  It's one thing to comment on bad experiences, but at this point it feels like more like bashing. And I feel like an open source focused company should treat other folks working on open source with a bit more, idk, respect (not quite the right word, but I can't come up with a better one right now).<p>I probably shouldn't have commented on this here. But I read the message after just having spent a Sunday morning looking into a problem and I guess that made more thin skinned than usual.<p>> For most of that time (and several years earlier), the community members we reached out to were very dismissive, saying either these weren't problems, or they were known problems and we were wrong for not avoiding them, etc.<p>I agree that the wider community sometimes has/had the issue of excusing away postgres problems. While I try to avoid doing that, I certainly have fallen prey to that myself.<p>Leaving fandom like stuff aside, there's an aspect of having been told over and over we're doing xyz wrong and things would never work that way, and succeeding (to some degree) regardless. While ignoring some common wisdom has been advantageous, I think there's also plenty where we just have been high on our own supply.<p>> What remains is me feeling triggered when it feels like users' pain is being casually dismissed.<p>Was that done in this thread?</p>
]]></description><pubDate>Mon, 15 Dec 2025 16:29:46 +0000</pubDate><link>https://news.ycombinator.com/item?id=46276660</link><dc:creator>anarazel</dc:creator><comments>https://news.ycombinator.com/item?id=46276660</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46276660</guid></item><item><title><![CDATA[New comment by anarazel in "Avoid UUID Version 4 Primary Keys in Postgres"]]></title><description><![CDATA[
<p>The issue is more fundamental - if you have purely random keys, there's basically no spatial locality for the index data. Which means that for decent performance your entire index needs to be in memory, rather than just recent data. And it means that you have much bigger write amplification, since it's rare that the same index page is modified multiple times close-enough in time to avoid a second write.</p>
]]></description><pubDate>Mon, 15 Dec 2025 15:15:23 +0000</pubDate><link>https://news.ycombinator.com/item?id=46275555</link><dc:creator>anarazel</dc:creator><comments>https://news.ycombinator.com/item?id=46275555</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46275555</guid></item></channel></rss>