From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id oy7nDBT93GHlugAAgWs5BA (envelope-from ) for ; Tue, 11 Jan 2022 04:44:20 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id QLWxCBT93GH8mAAAauVa8A (envelope-from ) for ; Tue, 11 Jan 2022 04:44:20 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DA43334526 for ; Tue, 11 Jan 2022 04:44:14 +0100 (CET) Received: from localhost ([::1]:56046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n784z-0006pY-JC for larch@yhetil.org; Mon, 10 Jan 2022 22:44:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36822) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n784o-0006p2-RD for bug-guix@gnu.org; Mon, 10 Jan 2022 22:44:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60870) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n784o-0003DV-GH for bug-guix@gnu.org; Mon, 10 Jan 2022 22:44:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n784o-0008F8-AX for bug-guix@gnu.org; Mon, 10 Jan 2022 22:44:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#51472: substitute servers should be preferred according to their coverage rate Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 11 Jan 2022 03:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51472 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 51472-submit@debbugs.gnu.org id=B51472.164187263031658 (code B ref 51472); Tue, 11 Jan 2022 03:44:02 +0000 Received: (at 51472) by debbugs.gnu.org; 11 Jan 2022 03:43:50 +0000 Received: from localhost ([127.0.0.1]:53773 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n784c-0008ES-4S for submit@debbugs.gnu.org; Mon, 10 Jan 2022 22:43:50 -0500 Received: from mail-il1-f180.google.com ([209.85.166.180]:43916) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n784Y-0008E9-ID; Mon, 10 Jan 2022 22:43:48 -0500 Received: by mail-il1-f180.google.com with SMTP id d3so13288706ilr.10; Mon, 10 Jan 2022 19:43:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=HyTnPKH+jIBOdAoS8b757xWDoqlRx56636WKJVPmQB8=; b=mfdYVFnistdFOFt2WmvCuWsgVjppGL5Uow/vPYFCHbvDzeAdTDfE7escfKUGmoMntn EewESSoOu4qZhNmU83y8yIGUoaXEuGll+N/I3uvF/BKUaR3M2PHd7Be1D53mQZUGkykh BOvpbMZ1AWsjvYCjRYh0KMM2B+ZUcaMNVe5fm+mvPzPQRASv83uRFU25M/HBPKPtWflw BhXlsqWIamZ2uDGm8t71Jwt6ubRVeq6OLTMDZ7CBJckBmIoK12kzXgGvduBU/L3DmanL iOOneNi4p8pPXWMZs5azoXm0c8GX3K2izrpzxDTj4HuXiXRzj5USA7jNnY+XVz96I+nV Fcbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=HyTnPKH+jIBOdAoS8b757xWDoqlRx56636WKJVPmQB8=; b=p+xu0gfmRxEzovcg+bPEb+KSYbRElQteGYiUM/a9wRbsYq9zO/N4sPF4gW+9iVcJ7g hkq9biri//kEPKMmjszIoavzlMexmFgbAqEbzHR5BDokuQ6Mpnpdqa6uHhbDcUbRPdeh +Oatx2eQcfI2mNTdqYwHNMsu1JuNvTIyF0nn4aH5PwMWbgYYwDlh96qN3IftYGX2rk7O zKAEil52X3wiQSmivV436KlwHkrd95yPK8zoYenF9cUobEQTzVsvYzmVwAQVC/TbgCMh 6aSZRFiFu7g9gC1WK72XRDQws9fhwtwCSO8UkRHIb7ZazMKuEqEwPK+GHfllb9WOWyGc Y3/w== X-Gm-Message-State: AOAM5310R7mR/gc0zE9IuNE+dsNMmOubR47U2erAMVTd2wCIj4k5qGJi UPwLo7u6L7F5Ja2SkJ2nhrDm/lfMhdc= X-Google-Smtp-Source: ABdhPJy8UqzbCCAISLcLZnaDkVAqgzRNuxz1N2AswDY1EKSF36+1VGNgO+ghPwhy2kacI4/VeTqb9A== X-Received: by 2002:a05:6e02:15c4:: with SMTP id q4mr1489874ilu.133.1641872620685; Mon, 10 Jan 2022 19:43:40 -0800 (PST) Received: from hurd (dsl-205-151-56-104.b2b2c.ca. [205.151.56.104]) by smtp.gmail.com with ESMTPSA id h23sm3465738ila.81.2022.01.10.19.43.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jan 2022 19:43:40 -0800 (PST) From: Maxim Cournoyer References: <87k0hwa8ic.fsf@gmail.com> <874k8oknlj.fsf@gnu.org> Date: Mon, 10 Jan 2022 22:43:33 -0500 In-Reply-To: <874k8oknlj.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Sun, 07 Nov 2021 16:11:04 +0100") Message-ID: <87pmozndi2.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 51472@debbugs.gnu.org, GNU Debbugs Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1641872655; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=HyTnPKH+jIBOdAoS8b757xWDoqlRx56636WKJVPmQB8=; b=AosspwROgocVOpwkz2iNXg2PRGt3TdVsQlpEkcB0GBFL6SoGiHCvJnkWjIwkCwfHr/8AJ+ N0fKXAsdI8wM+96Z36dpbXYQ1J4Qli2qclIQbtMS0xAW5wTPyPh1oDvxrDHcMDpa5dV4lI BcUu2LfkeosS9crVkzJoHTlPGQIsr75DxkTHvveARdSA3JQ2in4h7oIQ1GCo4D1F8UuhWi msdrliIyW+FU48r+5y3yyuZeERXs2767i3NIKsfQacfk11XXfcNGWi8vTh52PpBW4jDdqo OiJzQpr1GVXGLGhyaUfKIp79lpZa1g+J0QEYao++UwEzyN1nVWiO7phA1Iw46A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641872655; a=rsa-sha256; cv=none; b=F/EOu0HzzmjipKra3JrNdJuUAY83F3LbAY8QwFuHmjAqRTKgP5Edwu+B4AWidjguT6sRry yvYeMnsh4mC8w0prIxQECVds8GkJildbcj7bCXIjEst7WTWNsZKCurwqwto3brvCf0R0xb B5DrsXuu1jh5jP9Mtdvkh3wnTYzl+rkblfX8o8aTwamC6fCOaRueVFDcTMK7cNhN308pjn RaPDWTkQvJ5cilG3zD44Y/89ytwlTZkPsxPsdrxtnI9Vao3UbB8F+ep6dN96208uGNwFjy FdoQSDg1RlK6l7xNC39admW5TzIlQyHieYdxycsMrw2alIIVQ32xoBJu6JHkOA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=mfdYVFni; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.01 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=mfdYVFni; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: DA43334526 X-Spam-Score: -2.01 X-Migadu-Scanner: scn1.migadu.com X-TUID: RsiXXAIL3m3o merge 48808 51472 thanks Hello Ludovic, Ludovic Court=C3=A8s writes: > Hi, > > Maxim Cournoyer skribis: > >> When using substitute servers discovery, I've noticed that if one of the >> substitute servers doesn't have any substitutes available, it'll keep >> getting tried instead of others, leading to a slide-show of substitutes >> updates such as: >> >> normalized load on machine '127.0.0.1' is 0.04 >> building /gnu/store/ajd0hx104702jpz2ycdwgrnyrv8jsp6d-xorg-server-21.1.0.= tar.xz.drv... >> process 9195 acquired build slot '/var/guix/offload/127.0.0.1:6666/1' >> normalized load on machine '127.0.0.1' is 0.04 >> building /gnu/store/49rqi3wpvdm5pv6in9pamzdvg0wscrl8-xorgproto-2021.5.dr= v... >> substitute: updating substitutes from 'http://192.168.10.102:80'... 0.= 0% >> substitute: updating substitutes from 'http://192.168.10.102:80'... 0.= 0% >> substitute: updating substitutes from 'http://192.168.10.102:80'... 0.= 0% >> substitute: updating substitutes from 'http://192.168.10.102:80'... 0.= 0% >> substitute: updating substitutes from 'http://192.168.10.102:80'... 0.= 0% > > We=E2=80=99d need to check why this particular server is checked repeated= ly. > The fact that it displays =E2=80=9C0.0%=E2=80=9D doesn=E2=80=99t mean tha= t the server lacks > substitutes, but that it does not reply to =E2=80=98GET /xyz.narinfo=E2= =80=99 requests, > for example because it=E2=80=99s off-line (see > .) > >> We should implement some scheme to prefer querying high-substitute >> servers first, instead of wasting time querying servers always failed >> queries; this would greatly improve performance when using substitute >> discovery for example combined with low coverage. > > There are several problems with that. First one is that you can=E2=80=99= t tell > what substitute coverage is until you=E2=80=99ve actually made those GET > requests. Second one is that substitute coverage varies and it=E2=80=99s= not an > absolute measure; for example, if a server provides substitutes for only > 0.1% of all the packages, but that=E2=80=99s precisely the 0.1% you care = about, > it=E2=80=99s more valuable than the one that has 99% of the packages but = lacks > those you want. > > There are other issues such as the fact that current semantics is to > respect the order of substitute URLs, which is presumably chosen by the > user according to their own criteria: download speed, bandwidth usage, > etc. > > I hope this makes sense! It does! I agree that it'd be tricky to get this right; makes me realize that my problem is probably due to #48808, and fixing that one would probably have avoided that bug report :-). I'm merging this one with 48808. Thank you! Maxim