From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: bug#24937: "deleting unused links" GC phase is too slow Date: Thu, 16 Apr 2020 15:26:58 +0200 Message-ID: <87ftd3muhp.fsf@elephly.net> References: <87wpg7ffbm.fsf@gnu.org> <87lgvm4lzu.fsf@gnu.org> <87twaaa6j9.fsf@netris.org> <87twaa2vjx.fsf@gnu.org> <87lgvm9sgq.fsf@netris.org> <87d1gwvgu0.fsf@gnu.org> <87wpf4yoz0.fsf@netris.org> <87fulrsqxx.fsf@gnu.org> <87vaunbvcu.fsf@mdc-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:33334) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jP4Yl-0000MY-AV for bug-guix@gnu.org; Thu, 16 Apr 2020 09:28:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jP4Yk-0007Ms-3D for bug-guix@gnu.org; Thu, 16 Apr 2020 09:28:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54430) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jP4Yk-0007Ml-0I for bug-guix@gnu.org; Thu, 16 Apr 2020 09:28:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jP4Yj-0008Ao-Ta for bug-guix@gnu.org; Thu, 16 Apr 2020 09:28:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-reply-to: <87vaunbvcu.fsf@mdc-berlin.de> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane-mx.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 24937@debbugs.gnu.org Ricardo Wurmus writes: > Ludovic Court=C3=A8s writes: > >> Ricardo, Roel: would you be able to run that links-traversal.c from >> >> on a machine with a big store, as described at >> ? > > I just ran this on my workstation in the office where I regularly build > packages. Here=E2=80=99s the output of =E2=80=9Cdf -i /gnu=E2=80=9D > > Filesystem Inodes IUsed IFree IUse% Mounted on > /dev/mapper/fedora-root 3301376 1098852 2202524 34% / > > Probably not large enough to derive conclusions about hydra=E2=80=99s beh= aviour. > > [I can=E2=80=99t run it on the shared store at the MDC because NFS perfor= mance is > too poor. I recently ran =E2=80=9Cguix gc --optimize=E2=80=9D to dedupe = the shared > store (post-build deduplication is disabled since a few weeks) and it=E2= =80=99s > at 3,197,489 used inodes.] > > Here are the results of running the link-traversal code on my > workstation: > > --8<---------------cut here---------------start------------->8--- > rwurmus in ~: gcc -std=3Dgnu99 -Wall links-traversal.c -DMODE=3D3 > rwurmus in ~: sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches' > rwurmus in ~: time ./a.out > 412825 dir_entries, 107 seconds > stat took 0 seconds > > real 1m47.264s > user 0m0.214s > sys 0m1.314s > > rwurmus in ~: gcc -std=3Dgnu99 -Wall links-traversal.c -DMODE=3D2 > rwurmus in ~: sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches' > rwurmus in ~: time ./a.out > 12821 dir_entries, 107 seconds (including stat) > > real 1m46.475s > user 0m0.201s > sys 0m1.309s > --8<---------------cut here---------------end--------------->8--- I ran this for the first time on ci.guix.gnu.org, which has a very big store (currently at around 29TB). df -i /gnu: Filesystem Inodes IUsed IFree IUse% Mounted on /dev/sdb1 610021376 132350406 477670970 22% /gnu I had to increase the number of MAX_ENTRIES to 135000000. I forgot to drop caches initially. This is the first run: --8<---------------cut here---------------start------------->8--- root@berlin ~ [env]# gcc links-traversal.c -DMODE=3D3 -o links-traversal root@berlin ~ [env]# time ./links-traversal 57079502 dir_entries, 3906 seconds stat took 136 seconds real 67m48.145s user 0m59.575s sys 2m30.065s --8<---------------cut here---------------end--------------->8--- I aborted the run after I dropped caches after 67 minutes. I=E2=80=99m going to continue testing on one of the build nodes, and I=E2= =80=99ll try using statx. -- Ricardo