FBDetect: Catching Tiny Performance Regressions at Hyperscale [pdf]
tangchq74.github.io
tangchq74.github.io
It's not even easy to reliably detect such a small performance regression on a single thread on a single machine.
I suppose in theory having multiple machines could actually improve the situation, by letting them average out the noise? But on the other hand, it's not like you have identically distributed samples to work with - workloads have variance over time and space, so there's extra noise that isn't uniform across machines.
Color me a little skeptical, but it's super cool if actually true.
If you’re looking for statistical validity , this is not the way to go about it; if you perform 20 analyses, there’s too high a chance one of them will spuriously show p>.95 (see p-hacking).
I saw a team at oculus fail to do this for highly constrained isolated environments with repeatable workloads and having the threshold be much more conservative (eg 1-10%) and failing. This paper is promulgating filtering your data all to hell to the point of overfitting.
Important to distinguish frontend vs backend performance of course. This is about backend performance where they care about this stuff a lot because it multiplies at scale & starts costing them real money. Frontend performance has less of a direct impact on their numbers with the only data I know on that is the oft-cited Google stuff trying to claim that there's a direct correlation between lost revenue and latency (which I haven't seen anyone else bother to try to replicate & see if it holds up).
I'm not sure what you're calling frontend in this context (client side? or client-facing "front-end" servers?), but I'm talking about their server side specifically. I've looked at their API calls and understand when slowness is coming from the client or the server. The client side is even slower for sure, but the server side also never felt like it was optimized to the point where deviations this small mattered.
Having control lets you see if things changed. Optimization is changing things.
This team seems to be focused on control. I assume optimization is left to the service teams.
I get that they're different, but the whole point is optimization here. They're not gathering performance metrics just to hang them up on a wall and marvel at the number of decimal points, right? They presumably invested all the effort into this infrastructure because they think this much precision has significant ROI on the optimization side.
To me it seemed clear that the paper is about detecting regressions, which is control under my definition above. I still think of that as distinct from optimization.
It often isn't to make things go faster for an individual user (often times the driving factor of latency is not computation, but inter-system rpc latency, etc.). The value is to bin-pack processing more requests into the same bucket of CPU.
That can have latency wins, but it may not in a lot of contexts.
At some point, two things happened. Any change to code, especially heavily used code, became risky because of limited typechecking, and the scale of the site was large enough that running Zend got expensive. Compiling to C++ with HipHop addressed immediate performance concerns, but it's a fragile solution. At some point, you're faced with either rewriting the codebase in something sensible or migrating in-place with a language fork and a custom VM. Facebook opted to pay the ongoing tax of maintaining its own language and having a team that supports it.
An in-house language gives you freedoms like being able to make language changes driven by business needs like privacy, but the language lacks scrutiny of larger community. Some features are half-baked, and it's missing features most popular languages have.
PHP 7 cherry picked enough Hack and HHVM features that it's better to stick with PHP. There's no broader support for the language, and it's not clear HHVM is still faster.
The next time you're involved in language bikeshedding, remember that Facebook went all-in on PHP, and it was a good-enough choice.
https://engineering.fb.com/2022/07/27/developer-tools/progra...