[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#70494] [PATCH 11/23] scripts: substitute: Untangle selecting fast v
From: |
Ludovic Courtès |
Subject: |
[bug#70494] [PATCH 11/23] scripts: substitute: Untangle selecting fast vs small compressions. |
Date: |
Thu, 16 May 2024 18:08:43 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Christopher Baines <mail@cbaines.net> skribis:
> Pulling the logic up to the script makes this code more portable and not
> reliant on setting a global variable.
>
> * guix/scripts/substitute.scm (%prefer-fast-decompression?): Rename to…
> (%default-prefer-fast-decompression?): this.
> (call-with-cpu-usage-monitoring): Use multiple values to return the results
> from the thunk as well as the cpu usage.
> (display-narinfo-data): Update accordingly.
> (download-nar): Add prefer-fast-decompression? as a keyword argument, remove
> code to set! it and monitor the cpu-usage.
> (process-substitution, process-substitution/fallback): Accept and pass through
> prefer-fast-decompression? to download-nar.
> (guix-substitute): Move the cpu usage monitoring and prefer fast decompression
> switching logic here.
>
> Change-Id: I4e80b457b55bcda8c0ff4ee224dd94a55e1b24fb
[...]
> + ;; Create a hysteresis: depending on CPU usage, favor
> + ;; compression methods with faster decompression (like ztsd)
> + ;; or methods with better compression ratios (like lzip).
> + ;; This stems from the observation that substitution can be
> + ;; CPU-bound when high-speed networks are used:
> + ;;
> <https://lists.gnu.org/archive/html/guix-devel/2020-12/msg00177.html>.
> + ;; To simulate "slow" networking or changing conditions,
> run:
> + ;; sudo tc qdisc add dev eno1 root tbf rate 512kbit latency
> + ;; 50ms burst 1540 and then cancel with: sudo tc qdisc del
> + ;; dev eno1 root
This comment’s formatting was broken (by M-q I guess).
Otherwise LGTM!
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug#70494] [PATCH 11/23] scripts: substitute: Untangle selecting fast vs small compressions.,
Ludovic Courtès <=