From nobody Fri Aug 11 16:27:04 2023 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RMq2F3yhDz4m7KP for ; Fri, 11 Aug 2023 16:27:17 +0000 (UTC) (envelope-from joesuf4@gmail.com) Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RMq2D5KXwz4dSs for ; Fri, 11 Aug 2023 16:27:16 +0000 (UTC) (envelope-from joesuf4@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20221208 header.b=IT0JB7h3; spf=pass (mx1.freebsd.org: domain of joesuf4@gmail.com designates 2a00:1450:4864:20::329 as permitted sender) smtp.mailfrom=joesuf4@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-3fe5c0e57d2so18991975e9.0 for ; Fri, 11 Aug 2023 09:27:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691771235; x=1692376035; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=UoG9BzQE3vI2ShFJ7KBy4dHZW4qgaONjSZFpxnPp4mM=; b=IT0JB7h3KzAmCGFA2wNejZbBGxSnTQQ8BIW7mpcy+JUQxpqwfzvjJL+Zmeoav9AFAy eq2H0NsNMbVZdIUSzhyJ2qAbgehB0TEhf48OMn3Cnzm861a+AqZfEOV26+rd4cD8S+S4 xHrz289v2sxJjyqnuhk3JNB8cCKy3a9TDiLyVjUBZ1/NKpbeFvSammNj864hC8sMarzL otUQlcSYZfHbvQWFi+xCMNtf+Cl4OclrGKe4aHEtfC3uvcLstvekOP5jF8yk0aCl9IOv vY3kHLOrdhHjgnWGRUepBPpfYhsOPTPeeAQWV5vmC2nKlYV/WuT/oVrVYcjGltTZyfcv 8WEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691771235; x=1692376035; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UoG9BzQE3vI2ShFJ7KBy4dHZW4qgaONjSZFpxnPp4mM=; b=gVSqHATDfmXoxXCVsQooM3ZDHlYhWUIR+s27Aja3HTG6Qy+2Gu/hrGJVBPfsJJVgvR RUtIcH6GxSlGStf1Xt4RvnD2pv4GIBFHvMspTBg2hte6/m2+jYh56Jt2UCt4Y9oc/PnH gr25sM4O/YcfewB0vbQi6vG09Hx9GjEqTl+0BI0RUgyw/gPwedXRxap6gyXuCiGb3SeE yBwMIurenUkLTKM6DvelMCdS7sp5S34WrsycR5PJrL4HL0yXDOsULIyJvpniBY5hVmSq XCdvnnGH9KiWPdVlS/4j4rZli1tylfTZCINWW3vhtV660KhfLi+SDUIzOu3My301+g2K M+Kg== X-Gm-Message-State: AOJu0Ywh02EQhAkHpqCc3o4Zlxh8DufhaF3MwwBOWDMT5/hG1kjpRwXS pgrKzuG6WgiCeovAJ+ta6OwPu5f6YvniPopBN3ko8kR7 X-Google-Smtp-Source: AGHT+IGh+nX7mczwCZ55UoCt7q1YPyUrSmTomNcOjl9tdsIIzPsTeceRquggr5QX4Ifcb4fnq86pAh4zxDbi1NWy4DM= X-Received: by 2002:adf:ef4a:0:b0:314:1b36:f440 with SMTP id c10-20020adfef4a000000b003141b36f440mr1770028wrp.70.1691771235045; Fri, 11 Aug 2023 09:27:15 -0700 (PDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 References: <202308111121.37BBLX0J064263@donotpassgo.dyslexicfish.net> In-Reply-To: From: Joe Schaefer Date: Fri, 11 Aug 2023 12:27:04 -0400 Message-ID: Subject: Re: can sftp be made multi-threaded? To: freebsd-hackers@freebsd.org Content-Type: multipart/alternative; boundary="0000000000008197170602a82f15" X-Spamd-Result: default: False [-2.95 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.997]; NEURAL_HAM_MEDIUM(-0.98)[-0.983]; NEURAL_HAM_LONG(-0.97)[-0.973]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20221208]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; RCPT_COUNT_ONE(0.00)[1]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ARC_NA(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::329:from]; DKIM_TRACE(0.00)[gmail.com:+]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_DN_NONE(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_COUNT_ONE(0.00)[1]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org] X-Spamd-Bar: -- X-Rspamd-Queue-Id: 4RMq2D5KXwz4dSs --0000000000008197170602a82f15 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable If it=E2=80=99s just a single file, split it into chunks. On Fri, Aug 11, 2023 at 12:25 PM Joe Schaefer wrote: > Why don=E2=80=99t you just use xargs -P until you=E2=80=99ve exhausted yo= ur CPU capacity? > > On Fri, Aug 11, 2023 at 10:10 AM void wrote: > >> On Fri, Aug 11, 2023 at 12:21:33PM +0100, Jamie Landeg-Jones wrote: >> >> >rsync just spawns an ssh command, so would probably behave similarly. >> >> I'm hoping that rsync will spawn many ssh. Need to look at max sessions >> on both ends of the connection. >> >> Since encountering the described problem, the person at the other >> end is away for the week so have not been able to test thoroughly. >> What I have been able to test shows that there is spiky latency >> in the connection, as well as slow speed, single-threaded. >> >> >Another thing, scp transfers from my test Rpi2 are much slower than the >> network >> >can handle due to the CPU use, which hits 100% on one cpu whilst it's >> running. >> >So, check that CPU isn't the bottleneck too. >> >> Yup. That won't be happening here. Dual xenon with 56 cores at remote >> end and same (but with 32 cores) at this end >> >> >As for the speed, I just tested sftp to transfer a file of random data, >> 2 GB in >> >size from one FreeBSD box in London to another in France: >> > >> >The final result was: >> > >> > 100% 2000MB 43.5MB/s 00:46 (Note, that's MegaBYTES/s) >> >> I ran a similar test. >> Sending system is on synchronous gigabit fibre on US east coast, >> receiving system is near London on 110/21 fibre (so, gigabit in the >> sending >> direction): >> >> 100% 2000MB 7.2MB/s 04:36 >> >> using rsync -azP : 2,097,152,000 100% 6.81MB/s 0:04:53 (xfr#1, >> to-chk=3D0/1) >> >> the speed fluctulates a lot. Both systems are quiet in a network and OS >> sense >> for the duration of the test. >> >> >The London box is pretty old, and is a virtual host scheduled to be >> decomissioned. >> >It is running an old openssl 1.X, openssh 8.8 and is a single core >> 2.4Ghz amd64 box. >> > >> >The France box is a 4 core bare metal 3.1Ghz and64 running openssh 9.2 >> and openssl 1.1.1 >> >> both ends here are running very recent -current, so ssl/ssh is >> OpenSSH_9.3p1, OpenSSL 3.0.9 30 May 2023 >> >> >Anything more I can tell you that may help? >> >> Thanks very much for your input. I'm certain it's not a freebsd problem. >> >> -- >> >> --0000000000008197170602a82f15 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
If it=E2=80=99s just a single file, split it into chunks.=

On Fri, Aug 11, 2023 at 12:25 PM Joe Schaefer <joesuf4@gmail.com> wrote:
Why don=E2=80=99t you just use xargs -P un= til you=E2=80=99ve exhausted your CPU capacity?

=
On Fri, Aug 11, 2023 at 10:10 AM void <void@f-m.fm> wrote:
On Fri, Aug 11, 2023 at 12:21:33PM +0100, Jamie Landeg-Jones wrote= :

>rsync just spawns an ssh command, so would probably behave similarly.
I'm hoping that rsync will spawn many ssh. Need to look at max sessions=
on both ends of the connection.

Since encountering the described problem, the person at the other
end is away for the week so have not been able to test thoroughly.
What I have been able to test shows that there is spiky latency
in the connection, as well as slow speed, single-threaded.

>Another thing, scp transfers from my test Rpi2 are much slower than the= network
>can handle due to the CPU use, which hits 100% on one cpu whilst it'= ;s running.
>So, check that CPU isn't the bottleneck too.

Yup. That won't be happening here. Dual xenon with 56 cores at remote end and same (but with 32 cores) at this end

>As for the speed, I just tested sftp to transfer a file of random data,= 2 GB in
>size from one FreeBSD box in London to another in France:
>
>The final result was:
>
> 100% 2000MB=C2=A0 43.5MB/s=C2=A0 =C2=A000:46=C2=A0 (Note, that's M= egaBYTES/s)

I ran a similar test.
Sending system is on synchronous gigabit fibre on US east coast,
receiving system is near London on 110/21 fibre (so, gigabit in the sending=
direction):

100% 2000MB=C2=A0 =C2=A07.2MB/s=C2=A0 =C2=A004:36

using rsync -azP : 2,097,152,000 100%=C2=A0 =C2=A0 6.81MB/s=C2=A0 =C2=A0 0:= 04:53 (xfr#1, to-chk=3D0/1)

the speed fluctulates a lot. Both systems are quiet in a network and OS sen= se
for the duration of the test.

>The London box is pretty old, and is a virtual host scheduled to be dec= omissioned.
>It is running an old openssl 1.X, openssh 8.8 and is a single core 2.4G= hz amd64 box.
>
>The France box is a 4 core bare metal 3.1Ghz and64 running openssh 9.2 = and openssl 1.1.1

both ends here are running very recent -current, so ssl/ssh is
OpenSSH_9.3p1, OpenSSL 3.0.9 30 May 2023

>Anything more I can tell you that may help?

Thanks very much for your input. I'm certain it's not a freebsd pro= blem.

--

--0000000000008197170602a82f15--