guix-play/guix
Ludovic Courtès 472a0e82a5
daemon: Do not deduplicate files smaller than 8 KiB.
Files smaller than 8 KiB typically represent ~70% of the entries in
/gnu/store/.links but only contribute to ~4% of the space savings
afforded by deduplication.

Not considering these files for deduplication speeds up file insertion
in the store and, more importantly, leaves 'removeUnusedLinks' with
fewer entries to traverse, thereby speeding it up proportionally.

Partly fixes <https://issues.guix.gnu.org/24937>.

* config-daemon.ac: Remove symlink hard link check and CAN_LINK_SYMLINK
definition.
* guix/store/deduplication.scm (%deduplication-minimum-size): New
variable.
(deduplicate)[loop]: Do not recurse when FILE's size is below
%DEDUPLICATION-MINIMUM-SIZE.
(dump-port): New procedure.
(dump-file/deduplicate)[hash]: Turn into...
[dump-and-compute-hash]: ... this thunk.
Call 'deduplicate' only when SIZE is greater than
%DEDUPLICATION-MINIMUM-SIZE; otherwise call 'dump-port'.
* nix/libstore/gc.cc (LocalStore::removeUnusedLinks): Drop files where
st.st_size < deduplicationMinSize.
* nix/libstore/local-store.hh (deduplicationMinSize): New declaration.
* nix/libstore/optimise-store.cc (deduplicationMinSize): New variable.
(LocalStore::optimisePath_): Return when PATH is a symlink or smaller
than 'deduplicationMinSize'.
* tests/derivations.scm ("identical files are deduplicated"): Produce
files bigger than %DEDUPLICATION-MINIMUM-SIZE.
* tests/nar.scm ("restore-file-set with directories (signed, valid)"):
Likewise.
* tests/store-deduplication.scm ("deduplicate, below %deduplication-minimum-size"):
New test.
("deduplicate", "deduplicate, ENOSPC"): Produce files bigger than
%DEDUPLICATION-MINIMUM-SIZE.
* tests/store.scm ("substitute, deduplication"): Likewise.
2021-11-16 14:34:28 +01:00
..
build build-system/julia: Enable Julia Pkg to find installed packages. 2021-11-16 14:39:51 +02:00
build-system build-system/julia: Enable Julia Pkg to find installed packages. 2021-11-16 14:39:51 +02:00
import import: utils: Add more licenses and extend their detection. 2021-11-12 23:34:18 +01:00
scripts environment: Fix ‘--check’ with exported PS1 variable. 2021-11-14 23:18:08 +01:00
store daemon: Do not deduplicate files smaller than 8 KiB. 2021-11-16 14:34:28 +01:00
tests tests: git: Make 'tag' directive non-interactive. 2021-09-18 19:37:45 +02:00
android-repo-download.scm
avahi.scm
base16.scm base16: Reduce GC pressure in bytevector->base16-string. 2021-09-10 17:30:54 +02:00
base32.scm base32: Work around (ash x N) miscompilation at '-O1' and below. 2021-09-21 15:15:52 +02:00
base64.scm
build-system.scm
bzr-download.scm
cache.scm cache: Gracefully handle non-existent cache. 2021-10-25 19:02:33 +02:00
channels.scm channels: 'channel-news-entry-commit' correctly resolves annotated tags. 2021-09-18 19:37:45 +02:00
ci.scm ci: Add jobs history support. 2021-08-22 21:36:29 +02:00
colors.scm
combinators.scm
config.scm.in
cpio.scm syscalls: Deduplicate device number conversion. 2021-09-23 18:17:16 +02:00
cve.scm
cvs-download.scm
d3.v3.js
deprecation.scm
derivations.scm
describe.scm
diagnostics.scm
discovery.scm discovery: Hide Guile warnings when loading modules. 2021-09-30 23:44:49 +02:00
docker.scm
download.scm download: "GUIX_DOWNLOAD_FALLBACK_TEST=none" disables fallback mechanisms. 2021-10-15 23:16:28 +02:00
elf.scm
extracting-download.scm Add (guix extracting-download). 2021-10-07 22:24:23 +02:00
ftp-client.scm
gexp.scm
git-authenticate.scm
git-download.scm
git.scm git: 'reference-available?' recognizes 'tag-or-commit'. 2021-09-18 23:08:32 +02:00
glob.scm
gnu-maintenance.scm
gnupg.scm
grafts.scm
graph.js
graph.scm graph: Add '--max-depth'. 2021-09-21 15:15:52 +02:00
hg-download.scm
http-client.scm
i18n.scm
inferior.scm
ipfs.scm
licenses.scm import: utils: Add more licenses and extend their detection. 2021-11-12 23:34:18 +01:00
lint.scm lint: Add description check for common typos. 2021-10-24 14:26:12 -07:00
man-db.scm
memoization.scm
modules.scm
monad-repl.scm
monads.scm
nar.scm
narinfo.scm
openpgp.scm
packages.scm guix: packages: Clarify that list is a list of <license> records. 2021-11-13 09:52:19 +01:00
pki.scm
profiles.scm profiles: Build the man database only if 'man-db' is in the profile. 2021-11-06 23:01:21 +01:00
profiling.scm
progress.scm
quirks.scm
records.scm
remote.scm store: 'map/accumulate-builds' handler checks the store received. 2021-10-28 21:30:27 +02:00
repl.scm
scripts.scm
search-paths.scm
self.scm maint: Factorize po xref translation. 2021-10-17 18:26:44 +02:00
serialization.scm
sets.scm
ssh.scm
status.scm
store.scm store: 'map/accumulate-builds' handler checks the store received. 2021-10-28 21:30:27 +02:00
substitutes.scm
svn-download.scm
swh.scm swh: Allows token from Software Heritage authentication service. 2021-10-15 23:16:28 +02:00
tests.scm tests: Factorize 'file=?'. 2021-11-16 14:34:28 +01:00
transformations.scm transformations: Git tags and 'git describe' style IDs are used as version. 2021-09-08 18:03:50 +02:00
ui.scm ui: 'load*' correctly reports 'read-error' in all cases. 2021-11-07 23:10:41 +01:00
upstream.scm Revert the #51061 patch series for now. 2021-10-08 23:31:34 +02:00
utils.scm utils: Define a target-x86-32? and target-x86-64? predicate. 2021-11-07 01:38:23 -04:00
workers.scm