News for hackers. Stuff that matters.
Re:Bento: Jupyter Notebooks at Meta by tqi on Wednesday September 18, 2024 @01:53PM (#41583221)
Facebook actually doesn't use git, they use mercurial (https://graphite.dev/blog/why-facebook-doesnt-use-git).

That decision is also illustrative of why they end up forking most things - Facebook's usage patterns at the far extreme end for almost any tool, and things thats are non-issues with fewer engineers or a smaller codebase become complete blockers.

Re:Bento: Jupyter Notebooks at Meta by kridsdale3 on Wednesday September 18, 2024 @03:49PM (#41584625)
Yes when I used to talk about this to interviewees, I described that every tool people commonly use is somewhere on the Big-O curves for scaling. Most of the time we don't really care if a tool is O(n) or O(10 n) or whatever.

At Meta, N tends to be hundreds of billions to hundreds of trillions.

So your algorithm REALLY matters. And git has a Big-O that is worse than Mercurial, so we had to switch.

Re:Bento: Jupyter Notebooks at Meta by steventhedev on Wednesday September 18, 2024 @11:44PM (#41588289)
I'm gonna disagree with you there. The difference was with stat patterns, and the person at Facebook who ran the tests had something wrong with the disk setup that was causing it to run slowly. They ignored multiple responses that reproduced very different results.

Nail in the coffin on this was a benchmark GitHub ran two years ago that got the results that FB should have: git status within seconds.

Facebook didn't use mercurial because of big O, they used it because of hubris and a bad disk config.

Re:Bento: Jupyter Notebooks at Meta by deadmutex on Thursday September 19, 2024 @12:39AM (#41588556)
This sounds plausible, but would love a source
Re:Bento: Jupyter Notebooks at Meta by steventhedev on Thursday September 19, 2024 @02:43AM (#41589215)
I should probably just write it up into a post, but the git mailing list at the time is the source (I remember reading it from the side a few months after convincing our VP R&D to switch from svn to git). We were chuckling around the same time that FB had to reallocate the stack on Galaxy S2 phones because they were somehow unaware of proguard or unable to have it work properly with their codegen.

Anyways:

1. Github benchmark: https://github.blog/engineering/infrastructure/improve-git-m...

2. The original email thread: https://public-inbox.org/git/CB04005C.2C669%25joshua.redston...

3. There's another email thread that gets linked everywhere - but in light of the prior thread, the numbers don't track: https://public-inbox.org/git/CB5074CF.3AD7A%25joshua.redston...

I recall there being a message from someone either at AirBnB or Uber who mentioned that they have a similar monorepo but without the slow git status, but can't seem to find it now - it's likely on one of the other mailing list archives but didn't make it to this one.

Point being that painting this as "the community was hostile" or "git is too slow for FB" is just disingenuous. The FB engineer barely communicated with the git team (at least publicly) and when there was communication, it was pushing a single benchmark that was deeply flawed, and then ignoring feedback on how to both improve the performance of slow blame, commit by repacking checkpoint packfiles (a one-off effort) and also ignoring feedback that the benchmark numbers didn't make sense in absolute terms.

Re:Bento: Jupyter Notebooks at Meta by sangnoir on Thursday September 19, 2024 @04:31AM (#41589769)
> Facebook didn't use mercurial because of big O, they used it because of hubris and a bad disk config.

Half-remembering a blog post I read - the git maintainers also wouldn't give Facebook the time of day on code changes to accommodate FBs requirements. Mercurial was more amenable. This also disproves the "Facebook has a fork of evertyhing, because the attempted to upstream the changes they wanted)

Re:Bento: Jupyter Notebooks at Meta by master_crab on Wednesday September 18, 2024 @11:47PM (#41588305)
If git is blocking you, you are using it wrong. Lotta instances of people treating it as an artifact repository. Use it correctly with a branching strategy that works for your use case and it's bulletproof.

Plenty of other customers with the same magnitude problems as Meta are using Git perfectly fine.

Re:Bento: Jupyter Notebooks at Meta by quicklime on Thursday September 19, 2024 @12:57AM (#41588656)
Who are the others with the same magnitude as Google and Meta’s monorepos?
Re:Bento: Jupyter Notebooks at Meta by disgruntledphd2 on Thursday September 19, 2024 @02:19AM (#41589107)
Particularly in 2014, when the git thing happened.
Re:Bento: Jupyter Notebooks at Meta by master_crab on Thursday September 19, 2024 @08:35AM (#41591180)
No one. Because people should know better than to use monorepos. Most teams at Amazon (which works at the same scale) religiously avoided them.
Re:Bento: Jupyter Notebooks at Meta by ec109685 on Thursday September 19, 2024 @09:45AM (#41591768)
Microsoft has all of windows in a single repository.
Re:Bento: Jupyter Notebooks at Meta by KaiserPro on Thursday September 19, 2024 @05:52AM (#41590192)
> Plenty of other customers with the same magnitude problems as Meta are using Git perfectly fine.

I mean there aren't. there are perhaps three places that have the same scale problem.

A monorepo for a place with about 50k developers, that has been operating at that scale for 5 years.

The current checkout if not sparse would be >80gigs

The commit rate is > 20 a second.

no amount of branching strategy is going to help on that.

I love git, I used it professionally since 2010, but git is not a good fit for something _massive_

Re:Bento: Jupyter Notebooks at Meta by ec109685 on Thursday September 19, 2024 @09:48AM (#41591801)
Microsoft has made git work for massive repositories through a lot of blood sweat and tears: https://github.blog/open-source/git/the-story-of-scalar/
Re:Bento: Jupyter Notebooks at Meta by LarsDu88 on Wednesday September 18, 2024 @05:35PM (#41585833)
They use sapling. An in-house clone of mercurial that was open sourced 2 years ago
Re:Bento: Jupyter Notebooks at Meta by herval on Thursday September 19, 2024 @07:32AM (#41590714)
FB uses mercurial _for most things_, but like any company that size, there's teams that use git and even teams that use perforce