unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#49174: Poor 'guix substitute' performance when receiving Zstd-compressed substitutes
@ 2021-06-22 18:50 Maxim Cournoyer
  2021-06-23 13:26 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Maxim Cournoyer @ 2021-06-22 18:50 UTC (permalink / raw)
  To: 49174

Hello,

It's something I've been observing for a while, but substitutes are very
IO intensive (as can be seen in iotop, the substitute process is waiting
on IO > 99% of the time) and is much slower than expected (3 minutes to
transfer 100 MiB uncompressed over a 50 mbps downstream link):

--8<---------------cut here---------------start------------->8---
TID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO>    COMMAND
13934 be/4 root     1033.09 K/s 1485.06 K/s  0.00 % 93.36 % guile \ /gnu/store/vphx2839xv0qj9xwcwrb95592lzrrnx7-guix-1.3.0-3.50dfbbf/bin/guix substitute --substitute
--8<---------------cut here---------------end--------------->8---

The publisher (remote machine) is has its guix-daemon configured via:

--8<---------------cut here---------------start------------->8---
      (service guix-publish-service-type
               (guix-publish-configuration
                (advertise? #t)
                (compression '(("zstd" 3)))
                (host "0.0.0.0")))	;listen on all interfaces
--8<---------------cut here---------------end--------------->8---

CPU is idling during on both sides during the transfer (all the work
appears to be in the IO on the receiving end).

The above example was observed downloading
/gnu/store/4fcwwlv9bzfrraxiz41b4vcv131930fx-libstdc++-doc-9.4.0, but I
do not think it is substitute-specific.

Maxim




^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#49174: Poor 'guix substitute' performance when receiving Zstd-compressed substitutes
  2021-06-22 18:50 bug#49174: Poor 'guix substitute' performance when receiving Zstd-compressed substitutes Maxim Cournoyer
@ 2021-06-23 13:26 ` Ludovic Courtès
  2022-10-07  1:11   ` Maxim Cournoyer
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2021-06-23 13:26 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 49174

Hi,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

> It's something I've been observing for a while, but substitutes are very
> IO intensive (as can be seen in iotop, the substitute process is waiting
> on IO > 99% of the time) and is much slower than expected (3 minutes to
> transfer 100 MiB uncompressed over a 50 mbps downstream link):
>
> TID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO>    COMMAND
> 13934 be/4 root     1033.09 K/s 1485.06 K/s  0.00 % 93.36 % guile \ /gnu/store/vphx2839xv0qj9xwcwrb95592lzrrnx7-guix-1.3.0-3.50dfbbf/bin/guix substitute --substitute
>
>
> The publisher (remote machine) is has its guix-daemon configured via:
>
>       (service guix-publish-service-type
>                (guix-publish-configuration
>                 (advertise? #t)
>                 (compression '(("zstd" 3)))
>                 (host "0.0.0.0")))	;listen on all interfaces

Note that in this case nars are built and compressed on the fly on the
server side, which puts an upper bound on the bandwidth you can achieve.

I showed earlier how I profiled these things:

  https://guix.gnu.org/en/blog/2021/getting-bytes-to-disk-more-quickly/

If the client is I/O-bound, that’s good: it means we can’t do any better
(unless we skip unpacking as demonstrated by distri).

If you can provide detailed profiles of either the server side or the
client side (but in that case, make sure the server is caching things),
that’d be great!

Otherwise I’m afraid this is not actionable.  :-)

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#49174: Poor 'guix substitute' performance when receiving Zstd-compressed substitutes
  2021-06-23 13:26 ` Ludovic Courtès
@ 2022-10-07  1:11   ` Maxim Cournoyer
  0 siblings, 0 replies; 3+ messages in thread
From: Maxim Cournoyer @ 2022-10-07  1:11 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 49174-done

Hi,

Ludovic Courtès <ludo@gnu.org> writes:

> Hi,
>
> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>
>> It's something I've been observing for a while, but substitutes are very
>> IO intensive (as can be seen in iotop, the substitute process is waiting
>> on IO > 99% of the time) and is much slower than expected (3 minutes to
>> transfer 100 MiB uncompressed over a 50 mbps downstream link):
>>
>> TID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO>    COMMAND
>> 13934 be/4 root     1033.09 K/s 1485.06 K/s  0.00 % 93.36 % guile \ /gnu/store/vphx2839xv0qj9xwcwrb95592lzrrnx7-guix-1.3.0-3.50dfbbf/bin/guix substitute --substitute
>>
>>
>> The publisher (remote machine) is has its guix-daemon configured via:
>>
>>       (service guix-publish-service-type
>>                (guix-publish-configuration
>>                 (advertise? #t)
>>                 (compression '(("zstd" 3)))
>>                 (host "0.0.0.0")))	;listen on all interfaces
>
> Note that in this case nars are built and compressed on the fly on the
> server side, which puts an upper bound on the bandwidth you can achieve.
>
> I showed earlier how I profiled these things:
>
>   https://guix.gnu.org/en/blog/2021/getting-bytes-to-disk-more-quickly/
>
> If the client is I/O-bound, that’s good: it means we can’t do any better
> (unless we skip unpacking as demonstrated by distri).
>
> If you can provide detailed profiles of either the server side or the
> client side (but in that case, make sure the server is caching things),
> that’d be great!
>
> Otherwise I’m afraid this is not actionable.  :-)

Since moving from HDDs to SSDs, I haven't seen this problem, so I
suspect the poor IO of the HDDs was really the culprit rather than
something to do with guile-zstd (and we had also benchmarked the late
some when I experimented with using zstd-compressed man pages).

Closing!

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-07  1:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-22 18:50 bug#49174: Poor 'guix substitute' performance when receiving Zstd-compressed substitutes Maxim Cournoyer
2021-06-23 13:26 ` Ludovic Courtès
2022-10-07  1:11   ` Maxim Cournoyer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).