News for hackers. Stuff that matters.

dist1ll

Re:Unikernels were hard. key word: were on Monday October 12, 2026 @04:55AM (#50053410)
> such the submodules of a program cannot corrupt parts of memory that belong to others

IME you can eliminate tons of issues using language-based safety. That just wasn't possible before Rust without taking a perf hit. And you can still use vm in a unikernel for e.g. guard pages, read-only segments, demand paging etc.

I'd say the main advantage of the unikernel approach is the ability to be very intentional about where/how you introduce complexity. For a certain class of high-performance systems software, that has direct implications on reliability and performance.

Re:Unikernels were hard. key word: were on Saturday October 10, 2026 @03:06PM (#50036066)
Unikernels simply redraw abstraction boundaries. You can still use libraries and third-party code to implement common primitives. In fact, that's exactly what many unikernel frameworks give you (unikraft, hermit, mirage)
Re:AI is now capable of developing its own inference hardware on Tuesday October 06, 2026 @02:26PM (#49982204)
> with about the same efficiency and just a little more code.

It depends. For some things, CPUs don't even come close. An XCVU13P FPGA can handle 1.2Tbps of full-duplex Ethernet @ 1 billion pps. And that part costs less than a grand at moderate qty, and with significantly less power consumption than a CPU that'd be capable of operating a dataplane at these speeds.

There's more to building a successful CDN business than running workloads in a testing environment.
For content delivery you can simulate the load one PoP would get. You don't need to be at Cloudflare scale to build a testbench with 800G+ of traffic at different pps.
Re:Principles for Fast Tokio Applications on Monday September 14, 2026 @06:55PM (#49705385)
Fwiw with ef_vi you have full control over the event queue - you don't need to busy-spin it, you can choose whatever strategy you prefer.

> tokio is appropriate for general userspace apps

Yep, and for those I wouldn't recommend it. But tokio is also widely used in performance-critical infrastructure and web services. For those I'd say it can definitely be worth taking a second look at kernel bypass.

Re:Principles for Fast Tokio Applications on Monday September 14, 2026 @02:31PM (#49701674)
When you're at a point of tuning Tokio, consider taking a look at ef_vi/DPDK + SPDK
Re:Building a 25 Gbit/s workstation for the SCION Association on Tuesday January 13, 2026 @03:59AM (#46598708)
Your MS-01 routes line-rate 25Gbps in software with VyOS w/o kernel bypass? That's very surprising to me. At what packet sizes?
Re:Logging Sucks on Monday December 22, 2025 @10:04PM (#46361969)
Sorry for the OT response, I was curious about this comment[0] you made a while back. How did you measure memory transfer speed?

[0] https://news.ycombinator.com/item?id=38820893

Re:What Does a Database for SSDs Look Like? on Saturday December 20, 2025 @08:58AM (#46336238)
The Aurora paper [0] goes into detail of correlated failures.

> In Aurora, we have chosen a design point of tolerating (a) losing an entire AZ and one additional node (AZ+1) without losing data, and (b) losing an entire AZ without impacting the ability to write data. [..] With such a model, we can (a) lose a single AZ and one additional node (a failure of 3 nodes) without losing read availability, and (b) lose any two nodes, including a single AZ failure and maintain write availability.

As for why this can be considered durable enough, section 2.2 gives an argument based on their MTTR (mean time to repair) of storage segments

> We would need to see two such failures in the same 10 second window plus a failure of an AZ not containing either of these two independent failures to lose quorum. At our observed failure rates, that’s sufficiently unlikely, even for the number of databases we manage for our customers.

[0] https://pages.cs.wisc.edu/~yxy/cs764-f20/papers/aurora-sigmo...

Re:What Does a Database for SSDs Look Like? on Saturday December 20, 2025 @07:41AM (#46335751)
> "surely if I send request to 5 nodes some of that will land on disk in reasonably near future?"

That would be asynchronous replication. But IIUC the author is instead advocating for a distributed log with synchronous quorum writes.

Re:What Does a Database for SSDs Look Like? on Saturday December 20, 2025 @07:37AM (#46335733)
Is there more detail on the design of the distributed multi-AZ journal? That feels like the meat of the architecture.
Re:Revisiting "Let's Build a Compiler" on Wednesday December 10, 2025 @08:04AM (#46217224)
As long as your target language has a strict define-before-use rule and no advanced inference is required you will know the types of expressions, and can perform type-based optimizations. You can also do constant folding and (very rudimentary) inlining. But the best optimizations are done on IRs, which you don't have access to in an old-school single pass design. LICM, CSE, GVN, DCE, and all the countless loop opts are not available to you. You'll also spill to memory a lot, because you can't run a decent regalloc in a single pass.

I'm actually a big fan a function-by-function dual-pass compilation. You generate IR from the parser in one pass, and do codegen right after. Most intermediate state is thrown out (including the AST, for non-polymorphic functions) and you move on to the next function. This give you an extremely fast data-oriented baseline compiler with reasonable codegen (much better than something like tcc).

I would argue that stateful services (databases, message queues, CDNs) all perfectly fit the unikernel model. The question is whether the additional engineering effort and system design is worth the performance gain.
Re:Why xor eax, eax? on Monday December 01, 2025 @09:04AM (#46107549)
Another one is "jalr x0, imm(x0)", which turns an indirect branch into a direct jump to address "imm" in a single instruction w/o clobbering a register. Pretty neat.
Re:Cloudflare outage on November 18, 2025 post mortem on Wednesday November 19, 2025 @11:09AM (#45981272)
I do use a combination of newtyped indices + singleton arenas for data structures that only grow (like the AST). But for the IR, being able to remove nodes from the graph is very important. So phantom typing wouldn't work in that case.
Re:Cloudflare outage on November 18, 2025 post mortem on Tuesday November 18, 2025 @10:06PM (#45975387)
Sure, these days I'm mostly working on a few compilers. Let's say I want to make a fixed-size SSA IR. Each instruction has an opcode and two operands (which are essentially pointers to other instructions). The IR is populated in one phase, and then lowered in the next. During lowering I run a few peephole and code motion optimizations on the IR, and then do regalloc + asm codegen. During that pass the IR is mutated and indices are invalidated/updated. The important thing is that this phase is extremely performance-critical.
Re:Cloudflare outage on November 18, 2025 post mortem on Tuesday November 18, 2025 @09:04PM (#45975023)
If that's the case then hats off. What you're describing is definitely not what I've seen in practice. In fact, I don't think I've ever seen a crate or production codebase that documents infallibility of every single slice access. Even security-critical cryptography crates that passed audits don't do that. Personally, I found it quite hard to avoid indexing for graph-heavy code, so I'm always on the lookout for interesting ways to enforce access safety. If you have some code to share that would be very interesting.
Re:Cloudflare outage on November 18, 2025 post mortem on Tuesday November 18, 2025 @08:41PM (#45974872)
For iteration, yes. But there's other cases, like any time you have to deal with lots of linked data structures. If you need high performance, chances are that you'll have to use an index+arena strategy. They're also common in mathematical codebases.
Re:Cloudflare outage on November 18, 2025 post mortem on Tuesday November 18, 2025 @08:11PM (#45974627)
> every unwrap in production code needs an INFALLIBILITY comment. clippy::unwrap_used can enforce this.

How about indexing into a slice/map/vec? Should every `foo[i]` have an infallibility comment? Because they're essentially `get(i).unwrap()`.

Some investors do. Usually these kinds of startups are called "deep tech", which means many years of R&D, long time to market and a lot more uncertainty around the tech.

On the flip side, because the problem is often incredibly hard to solve, you usually don't have much competition.

Re:WASM 3.0 Completed on Wednesday September 17, 2025 @11:32PM (#45284990)
WASM traps on out-of-bounds accesses (including overflow). Masking addresses would hide that.
Re:How is Ultrassembler so fast? on Sunday August 31, 2025 @05:32PM (#45087306)
Ditto. Perfect hashing strings smaller than 8 bytes has been the fastest lookup method in my experience.
> because that is what it means in mathematics

Personally, I think this argument only holds water for languages that are rooted in mathematics (e.g. Haskell, Lean, Rocq, F*, ...). If your computational model comes from a place of physical hardware, instructions, registers, memory etc. you're going to end up with something very different than an abstract machine based on lambda calculus. Both valid ways to design a PL.

Intel still does it. As far as I can see they're the only player in town that provide open, detailed documentation for their high-speed NICs [0]. You can actually write a driver for their 100Gb cards from scratch using their datasheet. Most other vendors would either (1) ignore you, (2) make you sign an NDA or (3) refer you to their poorly documented Linux/BSD driver.

Not sure what the situation is for other hardware like NVMe SSDs.

[0] 2750 page datasheet for the e810 Ethernet controller https://www.intel.com/content/www/us/en/content-details/6138...

Re:Cloudflare Is Not a CDN on Monday August 11, 2025 @02:11PM (#44867457)
> While latency from a conventional CDN is usually < 80ms, with Cloudflare, I have frequently seen it to be in 150-300ms

So since magecdn is built on top of Cloudflare, how do they guarantee low latency?

Re:Fast on Thursday July 31, 2025 @05:38AM (#44743946)
It's fascinating to me how the values and priorities of a project's leaders affect the community and its dominant narrative. I always wondered how it was possible for so many people in the Rust community to share such a strong view on soundness, undefined behavior, thread safety etc. I think it's because people driving the project were actively shaping the culture.

Meanwhile, compiler performance just didn't have a strong advocate with the right vision of what could be done. At least that's my read on the situation.

Re:Strategies for Fast Lexers on Monday July 14, 2025 @01:23PM (#44562796)
You can get pretty far with a branch per byte, as long as the bulk of the work is done w/ SIMD (like character classification). But yeah, LUT lookup per byte is not recommended.
Re:Bought an Ampere Altra System on Monday June 30, 2025 @06:36AM (#44421603)
OP works for Red Hat, and some of the tests require booting systems with 64k pages.

What surprises me more is why Red Hat doesn't provide them with the proper hardware..

Re:Why doesn't Rust care more about compiler performance? on Thursday June 12, 2025 @01:43PM (#44260495)
Language design can have massive impact on compiler architecture. A language with strict define-before-use and DAG modules has the potential to blow every major compiler out of the water in terms of compile times. ASTs, type checking, code generation, optimization passes, IR design, linking can all be significantly impacted by this language design choice.

Older »