Meta AI Open-Sources Rebalancer: A C++ Assignment Solver That Runs About 40 Million Placement Problems a Day
Meta has open-sourced Rebalancer, a C++ library with a Python interface for solving assignment problems.It decides which objects go into which bins under constraints and objectives.According to the Engineering at Meta’s post, Rebalancer has handled resource allocation across Meta for over 9 years.
The release ships under Apache 2.0 with documentation, a PyPI package and a debugging UI called Rebalancer Explorer.Is it deployable?Yes.pip install rebalancer installs v1.0.4 for Python 3.12+, with prebuilt wheels for Linux x86-64 and macOS 14+ ARM64..deb, .rpm and Homebrew packages also exist.
PyPI still classifies the project as Alpha.What Problem Does Rebalancer Solve?Assignment problems show up across Meta’s stack.Racks go into datacenters, servers go to services, tasks go to servers, and user traffic goes to datacenters.Meta names 2 blockers: usability and scalability.
Engineers struggle to turn policies into precise formulas, and many problems are NP-hard and too large for commercial solvers.Rebalancer’s answer is to separate how a problem is specified from how it is solved.
The design is detailed in the OSDI 2024 paper, Optimizing Resource Allocation in Hyperscale Datacenters.
How the Specification Layer Works The spec language has 3 layers: Modeling constructs: dimensions (attributes such as CPU or storage), partitions (groups of objects), scopes (groups of bins) and utilization.
Expression API: aggregate utilization with SUM or MAX, or transform it with operations such as SQUARE.Spec API: dozens of predefined objectives and constraints, listed in the docs.Meta’s example models tasks as objects, servers as bins and racks as a scope.
A CapacitySpec caps CPU and storage per server.A GroupCountSpec keeps 1 job type per rack.A BalanceSpec balances each server’s utilization across both dimensions.One Expression Graph, Two Solvers Rebalancer compiles the spec into a directed acyclic expression graph.
Leaf nodes hold utilization values; aggregation and transformation nodes sit above them.Users supply an initial assignment and a stopping condition.Constraints that the initial assignment already violates become high-priority goals.
Optimal solver: The graph is translated into a mixed integer program for FICO Xpress, Gurobi or HiGHS.Variable aggregation and symmetry breaking shrink models.The worst-case model size is still O(objects × bins).Meta’s largest problems are too big for any MIP solver.
Local search: This solver works directly on the expression graph.It explores moves of objects to other bins, with a worst-case neighborhood of O(objects + bins).It then applies the best candidate that breaks no constraint.
Evaluation is parallelized, reaching millions of evaluations per second, and the search space is pruned.Meta uses local search for almost all large problems and MIP for small to mid-size ones, often prototyping with MIP first.
Production Numbers at Meta About 40 million assignment problems solved per day, across 30+ unique formulations.P99 solve time of 12 seconds on 265k objects and 3.2k bins.Problems above 1 million objects and 5k bins average 171 seconds, across 3.4k+ runs.
Best Use Cases for Rebalancer Placing shards, tasks or containers on a cluster: Assign work to servers under CPU and memory caps while spreading replicas across racks.Meta’s Shard Manager and RAS run this pattern.
Balancing traffic and workloads across regions: Route user traffic or jobs to datacenters, trading latency against load.Taiji does this for edge traffic, and Meta balances ML training by priority.
Operational assignment outside infrastructure: Map support tickets to engineers, meetings to rooms or desks to people under capacity rules.Meta has done all 3.Debugging With Rebalancer Explorer Modelers at Meta spent most of their time debugging solver behavior.
Rebalancer Explorer is a Dockerized web UI built for this.It shows binding constraints, relaxation effects, and why an object landed in a bin.Interactive Explainer Run local search Step once Random bad start Reset
Step
0 Moves evaluated
0 Capacity overflow
0 Balance objective
0 Objective over steps (lower is better, ideal = 324) Server S1 starts 4 CPU over capacity.Press Run.<!-- PANE 2 --> Rebalancer compiles specs into a directed acyclic expression graph.Leaves hold each server's utilization; SQUARE, SUM and MAX nodes sit above them.
When one task moves, only the leaves it touches and their ancestors need new values.The graph uses the same live state as tab 1.
Move a random task Apply best local-search move Press a button to move a task. <!-- PANE 3 --> The MIP model needs about one binary variable per object per bin, so it grows as O(objects × bins). A local-search neighborhood grows as O(objects + bins). Drag the sliders or load Meta's published sizes.
Small: 500 × 20 Meta P99: 265k × 3.2k Meta XL: 1M × 5k
Objects
Bins
MIP binary variables, worst case
<i id="mtpMb" style="background:linear-
Related
相關文章
利用 NVIDIA Cosmos3-DROID 建構串流機器人學習管線
在本教學中,我們以 NVIDIA Cosmos3-DROID 資料集為基礎,設計了一套端到端的串流機器人學習管線,無需在本地下載其 707 GB 的儲存庫。我們首先剖析 LeRobotDataset v3.0 的結構,並從 info.json、任務元資料、片段表與資料集統計資料中建構元資料圖,接著使用 PyArrow 搭配 HTTP 位元組範圍存取,選擇性地讀取 Parquet 行群組與列。我們將個別片段轉換為狀態-動作軌跡,並分析關節運動、夾爪事件、笛卡兒末端執行器路徑與動作頻率譜,再透過基於搜尋的 PyAV/FFmpeg 存取,僅解碼所需的 AV1 視訊視窗。最後,我們使用資料集統計資料正規化觀測值與動作,並以操作式 chunking 方式建構 PyTorch 資料集。

Yandex Introduces Sona: A Single Generative Recommender That Replaces Entire Recommendation Cascade
Most production recommenders are cascades. Candidate generators feed a pre-ranker, which feeds a heavy ranker built on hundreds of engineered features. Yandex’s Sona Technical Report describes a different design.
《Gran Turismo 7》迎來首臺中國VGT 同時GT史上30年首次新增電車駕駛教學
新加坡,2026 年 10 月 3 日 —— 今日,在新加坡 Gran Turismo World Series(GT World Series)賽事現場,Gran Turismo系列遊戲製作人山內一典與小米汽車歐洲研發中心設計負責人Jean-Arthur Madelaine現場聯合宣佈:Xiaomi Vision Gran Turismo(小米 Vision GT)即將於10月正式上線《Gran Turismo 7》(GT7),成為該。
A Coding Guide to Google Research’s Kauldron: Configs That Are Plain Data, Components Wired by String, and a JAX Trainer You Can Read End to End
In this tutorial, we implement Kauldron, the JAX training library from Google Research that describes itself as optimized for research velocity and modularity, and we take those two words literally by testing what they actually buy us.
剛剛,iQOO掏出年度旗艦,自研電競芯片性能提升15%,首款電競平板也來了
作者 | 陳駿達 編輯 | 心緣 9月29日報道,剛剛,vivo旗下iQOO品牌發佈了年度旗艦手機iQOO 16,這臺手機搭載了第六代驍龍8超級至尊版,全球首發了由iQOO和三星顯示聯合研發的2K 165Hz三星珠峰屏,並基於iQOO搭建的“3+2遊戲技術版圖”,提升了手機在視效、操控、直播和跨端遊戲等維度的體驗。
抽“錦鯉”享美食!“點亮杭州 碰見好運”服務消費季活動啟動
本文作者: Nemo 2026-09-25 10:17 導語:據瞭解,圍繞“點亮杭州 碰見好運”主題,活動將在9月21日至10月7日期間發放百萬級消費券,覆蓋吃喝玩樂購。9月24日,“點亮杭州 碰見好運”服務消費季活動在西湖區天目裡國際街區正式啟動。