sapling/eden
Thomas Orozco d5097a2d8c mononoke/lfs_server: account for size in object popularity
Summary:
This modifies our object popularity mechanism to account for the size of the
objects being downloaded. Indeed, considering our bottleneck is bandwidth, we
forcing similar routing for 10 downloads of a 10MB object and 10 downloads of a
1GB object doesn't make that much sense.

This diffs updates our counting so that we now record the object size instead
of a count. I'll set up routing so that we disallow consistent routing when a
single object exceeds 250MiB/s of throughput ( = 1/4th of a task).

It's worth noting that this will be equivalent to what we have right now for
our most problematic objects (GraphQL schemas in Fbsource, 35M each), given
that we "unroute" at 150 requests / 20 seconds (`150 * 35 / 20 = 262`).

The key difference here is that this will work for all objects.

This does mean LFS needs to cache and know about content metadata. That's not
actually a big deal. Indeed, over a week, we serve 25K distinct objects
(https://fburl.com/scuba/mononoke_lfs/a2d26s1a), so considering content
metadata is a hundred bytes (and so is the key), we are looking at a few MBs of
cache space here.

As part of this, I've also refactored our config handling to stop duplicating
structures in Configerator and LFS by using the Thrift objects directly (we
still have a few dedicated structs when post-processing is necessary, but we
no longer have anything that deserializes straight from JSON).

Note that one further refinement here would be to consistently route but to
more tasks (i.e. return one of 2 routing tokens for an object that is being downloaded
at 500MiB/s). We'll see if we need that.

Reviewed By: HarveyHunt

Differential Revision: D24361314

fbshipit-source-id: 49e1f86cf49357f60f1eac298a753e0c1fcbdbe5
2020-12-03 06:17:06 -08:00
..
fs eden: remove some dead DMG redirection code 2020-12-01 23:58:32 -08:00
integration remove the unused glob() implementation 2020-12-01 13:39:14 -08:00
locale add a copyright header to glibc_en.po 2019-04-26 14:38:27 -07:00
mononoke mononoke/lfs_server: account for size in object popularity 2020-12-03 06:17:06 -08:00
scm phrevset: do not return None for namespace lookup 2020-12-02 15:09:18 -08:00
test_support Manually upgrading eden, and fixing their config 2020-08-06 12:37:04 -07:00
test-data enable treemanifest in snapshots 2019-08-28 18:46:03 -07:00
.gitignore eden: wire up mac contbuild 2019-02-05 21:52:30 -08:00
Eden.project.toml Eden.project.toml file for Nuclide 2018-04-26 11:05:23 -07:00