-
-
Notifications
You must be signed in to change notification settings - Fork 636
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent excessive uncached readlink's when using a symlinked workdir (#…
…9270) Problem Extracting tarball artifacts into a FUSE context leads to excessive readlink calls on the pants workdir symlink. Readlinks can be slow in FUSE filesystems, which may not cache readlink results. Running pants on a moderate size target can lead to 100's of thousands of readlink calls, which degrades performance perceptibly. Solution If the pants workdir is a symlink, cache the real path to the symlink and pass it to the tarball artifact extractor, to sidestep decompressing into the FUSE context. Result The accumulated syscall profile's look like: *Before* Wall time: 05:29 ... readlink====================================================>202344 ... *After* Wall time: 03:37 ... readlink=============>549 ... The speed up happens when building from a clean state, when all artifacts are pulled from a remote cache and decompressed into the workdir. The cold compile time, when artifacts are built and stored locally, is the same for before and after.
- Loading branch information
Henry Fuller
authored
Mar 12, 2020
1 parent
2f6ccdc
commit 86c22f7
Showing
6 changed files
with
80 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters