Janus is a system for partitioning the ﬂash storage tier between workloads in a cloud-scale distributed ﬁle system with two tiers, ﬂash storage and disk. The ﬁle system stores newly created ﬁles in the ﬂash tier and moves them to the disk tier using either a First-In-First-Out (FIFO) policy or a Least-Recently-Used (LRU) policy, subject to per-workload allocations. Janus constructs compact metrics of the cacheability of the different workloads, using sampled distributed traces because of the large scale of the system. From these metrics, we formulate and solve an optimization problem to determine the ﬂash allocation to workloads that maximizes the total reads sent to the ﬂash tier, subject to operator-set priorities and bounds on ﬂash write rates. Using measurements from production workloads in multiple data centers using these recommendations, as well as traces of other production workloads, we show that the resulting allocation improves the ﬂash hit rate by 47–76% compared to a uniﬁed tier shared by all workloads. Based on these results and an analysis of several thousand production workloads, we conclude that ﬂash storage is a cost-effective complement to disks in data centers.