4 ms·
Cloudflare's Gen 13 servers: trading cache for cores for 2x performance
- 11thDwarf 7mo ago[flagged]
- gdwatson 7mo agoI will confess to skimming by the end. But I don’t think they explained how they solved the cache issue except to say they rewrote the software in Rust, which is pretty vague. Was all the code they rewrote originally in Lua? So was it just a matter of moving from a dynamic language with pointer-heavy data structures to a static language with value types and more control over memory layout? Or was there something else going on?
- zozbot234 7mo agoThe gains in lower memory footprint and lower demands on memory bandwidth from rewriting stuff to Rust are very real, and they're going to matter a lot with DRAM prices being up 5x or more. It doesn't surprise me at all that they would be getting these results.
- timacles 7mo ago[flagged]
- deleted 7mo ago[deleted]
- gdwatson 7mo agoI guess I am a sucker for stories about redesigning data structures, and I'd have liked more detail on that front. Also, they talked about Rust's greater memory safety; it would have been nice to know whether there were specific language features that played into the cache difference or whether it just made the authors comfortable using a systems language in this application and that made the difference.
- jshier 7mo agoThey posted about the Rust rewrite last year. https://blog.cloudflare.com/20-percent-internet-upgrade/ https://blog.cloudflare.com/20-percent-internet-upgrade/
- danpalmer 7mo agoThe tradeoff: The opportunity: Proving it out: Nah I'm good thanks. Slop takes more effort to read and just raises questions of accuracy. It's just disrespectful to your reader to put that work on them. And in a marketing blog post it's just a bad idea.
- montyanne 7mo agoCloudflare has excellent (human) technical writers. I don’t see any indication this is “slop”, it’s the standard in-the-weeds but understandable blog post they’ve been doing for years. AI text is everywhere, but this isn’t it.
- rustystump 7mo agoAgree to disagree. It is likely ai enhanced some where along the path to production. So many phrases reek AI but others do not. Is this a sprinkling of llm help or how a human genuinely writes, idk.
- abuani 7mo agoOut of curiosity, can you point to specific sections that reel of AI? I read the article and didn't see anything that immediately stuck out, but maybe I need to start looking for different signals.
- renewiltord 7mo agoThis is LLM tropey: > For our FL1 request handling layer, NGINX- and LuaJIT-based code, this cache reduction presented a significant challenge. But we didn't just assume it would be a problem; we measured it. It’s not that the “it’s not just A, it’s B” pattern. It’s just that humans don’t write like that. You don’t go “I didn’t just assume; I measured”. People usually say something like “but we didn’t know for sure, so we decided to measure it”. The LLM text is over-confident. Here’s an example on HN https://news.ycombinator.com/item?id=47538047 https://news.ycombinator.com/item?id=47538047 > The choice to never invert raster images isn't a compromise, it's the design decision. The problem veil solves is exactly that: every dark mode reader today inverts everything, and the result on photos, histology, color charts, scans is unusable. Preserving all images is the conservative choice, and for my target (people reading scientific papers, medical reports, technical manuals) it's the right one. It’s like a guy putting together a promo packet or something. A normal person would be a little hesitant and wouldn’t just go. “And what I’m doing isn’t because of constraints. It’s because I am making the right choices!” It’s just an oddly stilted way of speaking in conversation. Imagine talking to someone like that in real life. It would be all like “And then I thought the problem was that the global variable was set wrong. But I didn’t just assume that, I verified it.” No one’s accusing you of assuming it, dude. You don’t have to pre-emptively tell us you didn’t just assume it. Normal people don’t say that. I don’t have much of a problem with LLM text because I just skip over flavor like this to charts, code, and tables but this is obviously LLM
- trhway 7mo agoReminds that time when cheap Celeron with small cache was beating expensive Pentium with large cache (if i remember correctly that Celeron's cache was running at the core frequency while Pentium's was a separate die on half-frequency, and Celeron was very overclockable)
- BoredPositron 7mo agoPentium 4 the first release. AMD had the same gimmick with their Phenoms.
- zozbot234 7mo agoLower cache per core is actually a pretty natural outcome with the latest device fabrication nodes shrinking logic while leaving the size of SRAM largely unchanged. We may perhaps also see eDRAM (a lot denser than SRAM) for last-level caches.
- attentive 7mo agoThat was annoying to read because there is no easy to see impact of each change. It's FL2 + Gen 13 combined. I.e. what's the FL2 benchmark on Gen 12 compared to FL1?
- sanxiyn 7mo agoWell, that's because this post is about Gen 13. In FL2 post (presumably on same Gen 12 servers), they say 25% lower latency.
- kvemkon 7mo agoI'm missing comparison of FL2 on Gen13 vs Gen12, since this would be a real win (or loss?) from the hardware upgrade. How can they justify the upgrade without this data?
- alberth 7mo agoIt seems like the unspoken takeaway is just how shockingly performant LuaJIT is, even relative to Rust.
- anitil 7mo agoThey said they're replacing 15 years of Nginx+Lua, that's a testament to how good it can be.
- pjmlp 7mo agoProves the point that if one isn't reaching for Cloudflare performance levels, maybe that JIT in "pick your lang" is already more than adequate for the work being done, no need for RIIR. Which is kind of lost in the days that everyone wants to be the next unicorn.
- synack 7mo agoIs the Linux scheduler aware of shared CPU cache hierarchies? Is there any way we could make the scheduler do better cache utilization rather than pinning processes to cores or offloading these decisions to vendor specific code?
- AbuAssar 7mo agoEpyc’s naming is beautiful and consistent
- otterley 7mo agoThis post sponsored by AMD®.
- howdyhowdy 7mo agoSomeday someone will deploy CXL
- hulitu 7mo ago> trading cache for cores Viva el Celeron > for 2x performance You wish. Are people at Coudfare so young that they didn't heard about Celeron and Duron ?
- HackerThemAll 7mo agoIt all should be tuned with an AMD CPU expert, and programmer adjusting code under their guidance to leverage all CPU features. Did AMD engineers or seasoned hardware experts from server vendor assist in this implementation? Were the "Nodes Per Socket", "CCX as NUMA", "Last Level Cache as NUMA" settings tested/optimized? I don't see them mentioned in the article. They can make A LOT of difference for different workloads, and there's no single setting/single recommendation that would fit all scenarios. "The locality of cores, memory, and IO hub/devices in a NUMA-based system is an important factor when tuning for performance” - „AMD EPYC 9005 Processor Architecture Overview” page 7 What was the RAM configuration? 12 DIMM modules (optimal) or 24 (suboptimal)? Was the virtualization involved? If so, how was it configured? How does bare metal performance compare to virtualized system for this specific code? So many opportunities to explore not mentioned in the text.