HNHacker News
TopNewBestAskShowJobs

jhgg

3,448 karma · joined November 4, 2013

currently: Lead of Supercomputing at SpaceXAI, building the biggest AI supercomputers in the world. https://grok.com, https://x.ai

formerly: Principal Engineer of "Core Technologies" at Discord. https://discord.com/

[ my public key: https://keybase.io/jhgg; my proof: https://keybase.io/jhgg/sigs/NfC1mAm4fGJgKsLzYcshaSlYAfvMnxgLUZgee3nWqzI ]

submissionscomments
jhgg··on Grace Blackwell needs a new scheduler: 27% more usable GPUs from the same racks
Because inherently if you build this software correctly, you get millisecond level cycle times.

When you consider the problem from first principles, understand how the CPU that runs the program actually processes the data, are aware of things like cache locality, vectorization, etc... and have good placement, preemption, bin packing, and defragmentation algorithms, you learn that in the limit, milliseconds is all you need.

When you are responsible for the scheduling of ~millions of GPUs, every second starts to add up, and you realize that doing this correctly very quickly pays for itself.

Consider a large training run that takes 200k GPUs, if it takes 5 minutes to schedule that job, create pods, etc, that's ~16.6k GPU hours wasted. At a market rate of $11/gb300 GPU hour, that's ~$185k of wasted compute in scheduling overhead.

jhgg··on Grace Blackwell needs a new scheduler: 27% more usable GPUs from the same racks
Should have said "order of"
jhgg··on Grace Blackwell needs a new scheduler: 27% more usable GPUs from the same racks
"Order of millions of GPUs being scheduled on" - which is to say when a workload is submitted to the scheduler, it makes a scheduling decision and the individual compute nodes are being programmed within milliseconds.

This means that if say a job requesting GPUs is submitted with a given topology constraint, we would already computed the physical nodes that satisfy the topology requirement, and begun preemption / begun spinning up processes on the target machines within a few milliseconds of the job being submitted. If there were no preemptions required (which means we need to first wait for graceful termination), the job is fully scheduled in the blink of an eye, whether it's on tens or hundreds of thousands of GPUs.

jhgg··on Grace Blackwell needs a new scheduler: 27% more usable GPUs from the same racks
This blog post spends a lot of time telling why gang scheduling is needed here (a fact obvious to anyone using the nvl72s), but doesn't actually go into detail about how their scheduler works.

At work, we have built something very similar, a custom topology aware scheduler for workloads, and the most interesting things about such a project are entirely absent from this article, making it more of a fluff/marketing piece than an actually interesting technical blog in this area.

Our next iteration of this scheduler aims to scale to O(millions) of GPUs, with a scheduling cycle time measured in the milliseconds.

jhgg··on Show HN: Utilyze – an open source GPU monitoring tool more accurate than nvtop
We just track power utilization.
jhgg··on Discord: A case study in performance optimization
Cool article :)
jhgg··on Gleam OTP – Fault Tolerant Multicore Programs with Actors
Yes, agreed, hence rarely a problem in practice ;)
jhgg··on Gleam OTP – Fault Tolerant Multicore Programs with Actors
Risk of deadlock is real if you have processes calling each-other in a cyclic way. e.g. process A sends GenServer call to process B, that then sends a GenServer call to process A to in order to handle the original call. However, process A is busy waiting on B to reply to it's initial call.

This is rarely a problem in practice however.

jhgg··on Users claim Discord's age verification can be tricked with video game characters

    > government passes law that requires companies to age verify users
    > said government provides no way to actually verify a human's age
    > hilarity ensues
jhgg··on Show HN: I wrote a new BitTorrent tracker in Elixir
Really cool! You looking to write Elixir as your main job?
jhgg··on Eleven v3
This is not a model issue - you just have not properly implemented acoustic echo cancellation on your end.
jhgg··on Updated rate limits for unauthenticated requests
The truth is this won't actually stop AI crawlers and they'll just move to a large residential proxy pool to work around it. Not sure what the solution is honestly.
jhgg··on The Cost of Being Crawled: LLM Bots and Vercel Image API Pricing
Sweet! That's much more reasonable!
jhgg··on The Cost of Being Crawled: LLM Bots and Vercel Image API Pricing
$5 to resize 1,000 images is ridiculously expensive.

At my last job we resized a very large amount of images every day, and did so for significantly cheaper (a fraction of a cent for a thousand images).

Am I missing something here?

jhgg··on Query GPT: Transform Natural Language into SQL
IMO, it's not. All the UI boils down to: https://github.com/zhangchenchen/query_gpt/blob/main/src/api...
jhgg··on IO Devices and Latency
Metal looks super cool, however at my last job when we tried using instance local SSD's on GCP, there were serious reliability issues (e.g. blocks on the device losing data). Has this situation changed? What machine types are you using?

Our workaround was this: https://discord.com/blog/how-discord-supercharges-network-di...

jhgg··on Datadog acquires Quickwit
Hoping this leads to datadog launching a logging solution that does not cost an arm and a leg at scale.
jhgg··on How to make LLMs shut up
Except this article is about how their efforts to prompt the LLM didn't end up working and how they used embeddings / vector search to filter out comments that the LLM generated based on user feedback.
jhgg··on ChatGPT Pro
Does that matter when you can just swap it for gpt-5-whatever at some point in the future?
jhgg··on ChatGPT Pro
Are you implying this technology will remain static in its capabilities going forward despite it having seen significant improvement over the last few years?
jhgg··on How much memory do you need in 2024 to run 1M concurrent tasks?
I did this measurement, and using time -v, the maximum resident size in KB comes out to 440,424 kb for 1m tasks, 46,820 kb for 100k, and 7,156 kb for 10k.
jhgg··on Using Erlang hot code updates
When I worked at Discord, we used BEAM hot code loading pretty extensively, built a bunch of tooling around it to apply and track hot-patches to nodes (which in turn could update the code on >100M processes in the system.) It allowed us to deploy hot-fixes in minutes (full tilt deploy could complete in a matter of seconds) to our stateful real-time system, rather than the usual ~hour long deploy cycle. We generally only used it for "emergency" updates though.

The tooling would let us patch multiple modules at a time, which basically wrapped `:rpc.call/4` and `Code.eval_string/1` to propagate the update across the cluster, which is to say, the hot-patch was entirely deployed over erlang's built-in distribution.

jhgg··on Show HN: Lyceum – An MMO game built with Zig and Erlang
Having a potentially untrusted client connect to the erlang node as a c_node (which seems to be what zerl does) is not a good idea generally, as connecting that way essentially allows the client to execute arbitrary code on the server.
jhgg··on Zigler: Zig NIFs in Elixir
https://github.com/discord/sorted_set_nif
jhgg··on Electronic Arts streamlines game patching with AWS
A content-defined chunking scheme allows for you to build a pretty efficient game patcher where you can update between any version of the game (forwards and backwards) and doesn't require a bunch of server-side shenanigans.

League of Legends blogged about their updater here: https://technology.riotgames.com/news/supercharging-data-del...

I built something strikingly similar at my last job around the same time as well. Our server-side code was remarkably simple, just holding manifests (list of files and their chunk hashes) + a GCS bucket where all the chunks were stored (filename was just the hash of the chunk, making it content addressable.) Patching just involved the client understanding which chunks it already had, and which chunks needed to be downloaded from the server, or moved between files. Uploading a "new version" of the game to the server was also simple, just figure out what chunks were not in seen in the prior N versions of the game by looking at their manifests, and uploading them to the server, along with a new manifest describing the final contents of the game.

Given updating to a new version was just a matter of downloading new chunks, or re-arranging chunks that already existed on disk, going from one manifest to another did not depend on the new version being the successor of the prior version.

The majority of a game patch isn't actually the executable (where content-defined chunking wouldn't work well) instead were game assets like textures, audio files, etc..., which is why this strategy worked really well.

jhgg··on How Discord stores trillions of messages (2023)
Yeah it just worked a lot better on scylla.
jhgg··on How Discord stores trillions of messages (2023)
No cache. Just read coalescing. There is a big difference. Coalescing just ensures that while a query is executing if an identical query arrives, rather than sending the same query as an already executing query to the database it will wait for the existing query to complete and duplicate the result. If after this the same query arrives again, it will be issued against the database.

This means we don't have to deal with cache invalidation/consistency issues while also being able to handle thundering herds, for example a large server pinging @everyone and having a bunch of people click into the channel or launch their apps in response.

jhgg··on How Discord stores trillions of messages (2023)
We did not change schema or partitioning strategy.
jhgg··on How Discord stores trillions of messages (2023)
Scylla just eats all the ram it can with cache. So it's hard to say really. On Cassandra we allocated half the ram to the JVM which it gladly used up and left the other half to the OS for disk cache. On Scylla, since it uses direct io, there is no need for OS disk cache.
jhgg··on How Discord stores trillions of messages (2023)
Read traffic is much higher than write traffic due to mobile clients needing to sync chat history more often as their sessions are much shorter lived. Also search queries execute 1 query per result. And don't forget people doing GDPR data dump requests. It adds up.
Page 1 of 17Next →