Home > database >  Does a repository on NFS allow git to run off local disks on each file system?
Does a repository on NFS allow git to run off local disks on each file system?

Time:03-31

A local repository is fast only if you have fast access to the data. A repository on NFS is often slower than the repository over SSH on the same server, allowing Git to run off local disks on each system.

Scott Chacon and Ben Straub, Pro Git (New York: Apress, 2014), chap. 4, https://git-scm.com/book/en/v2.

In the second sentence of the quotation above, what allows Git to "run off local disks on each system"? In other words, what is the implicit subject of the -ing participle clause? Is it "A repository on NFS"?

CodePudding user response:

In other words, what is the implicit subject of the -ing participle clause?

(Note: this is more of an English usage question.) I'd say the quoted text is a bit sloppy, grammatically speaking: the subject you're asking about is actually "Git's distributed nature", which appears nowhere in the quoted text.

The distributed nature of Git repositories means that you can clone a repository, copying all the commits1 from some server version of the repository. Once you have the entire set of commits locally, you can work with those commits, locally, at your local machine's speed. The fact that local drives (often SSDs these days) may be very fast then helps out.

In the 1980s, when NFS was invented, we had slow disk drives (20 millisecond access times were considered fast ). We had SASI and early SCSI drives, holding maybe 100 to 300 MB, spinning at 3600 RPM or slower. Meanwhile, a desktop computer like a Sun 3/50 had a maximum of 4 mega bytes of RAM (not 4 gigabytes, just 4 MiB). With Ethernet at 10 Mbit/s, reading files over the Ethernet wire was not painfully slow compared to reading files from spinning media, and a big server might have 32 MiB of RAM for caching file data and could use multiple huge 600 MB drives (e.g., Fuji SuperEagle or bigger). Many 3/50s came "diskless" as a result.

The computing world is, of course, an endless wheel of concept recycling: "cloud storage" is now a big thing.

  •  Tags:  
  • git
  • Related