commit adb4bbb29d6a1407355e47e71716ca7f40c6dd67 from: Stefan Sperling date: Fri May 20 08:40:46 2022 UTC reduce the amount of memory used for caching deltas during deltification With files sorted properly for deltification we produce better deltas but end up consuming more memory and risk running into OpenBSD ulimits during packing. To compensate, reduce the threshold for the amount of delta data we store in memory, spooling more deltas into the cache file. ok op@ commit - f8174ca59ba426ea9c475fd15d2db770f8595b5e commit + adb4bbb29d6a1407355e47e71716ca7f40c6dd67 blob - 8cc2b39ff0afe5015ca6598e56bb1d70453ba6ae blob + 203398831c0a6d3ffc31d9eb8e34611330f3cfb4 --- lib/pack_create.c +++ lib/pack_create.c @@ -681,7 +681,7 @@ pick_deltas(struct got_pack_meta **meta, int nmeta, in off_t size, best_size; const int max_base_candidates = 3; size_t delta_memsize = 0; - const size_t max_delta_memsize = 25 * GOT_DELTA_RESULT_SIZE_CACHED_MAX; + const size_t max_delta_memsize = 4 * GOT_DELTA_RESULT_SIZE_CACHED_MAX; int outfd = -1; qsort(meta, nmeta, sizeof(struct got_pack_meta *), delta_order_cmp);