From nobody Fri Aug 11 16:25:17 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 4RMq0C1BPYz4m6fX for ; Fri, 11 Aug 2023 16:25:31 +0000 (UTC) (envelope-from joesuf4@gmail.com) Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) (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 4RMq0B0W1Lz4cL8 for ; Fri, 11 Aug 2023 16:25:30 +0000 (UTC) (envelope-from joesuf4@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20221208 header.b=izsWl2Qu; spf=pass (mx1.freebsd.org: domain of joesuf4@gmail.com designates 2a00:1450:4864:20::436 as permitted sender) smtp.mailfrom=joesuf4@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-31771bb4869so1966567f8f.0 for ; Fri, 11 Aug 2023 09:25:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691771128; x=1692375928; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=QKzK6Vp0W6hCtBp/ZcMfIWyK5k1bfoKX4SdTb8FX2NA=; b=izsWl2QuqBFMC46uDWgp0Xh//sCxYRsrE+jOuWaBLLWDxWbAdMrZic7DzACPnF/ZOD sC5xaC4Km2EWyG/rCKzrzhUoLHOWSzHm9hRZ32AtDHCwF5M7VZ0jh7ZSqWgmka7iYYZA hcdJGDdvDgwqzN0ycLO5eAG3hvrhO9xlC28PzkBIa4rAZy4sFej92k3QTWK7oMMyKE9X /jbkVjss/F8pzvXv9kw7yaqmrkDgMKumbpV2JJCeggYcdedzmrNQISHpInX6akGfGaF+ vOdUbwVPNTj37JWZhwMkMnBVZ+FMtP3GMNH2vx8/wE5N+Wn6MsrPh1EXe+VjjyaeG+Dw mTaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691771128; x=1692375928; 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=QKzK6Vp0W6hCtBp/ZcMfIWyK5k1bfoKX4SdTb8FX2NA=; b=C0vNhtLTZShEkkwUiLYTKrg2r+KBJiGygGnx8KHa3OKBgbh9W5lBDQaQOheofEV1Lx YUo3tf0iySo2SyzomNz4r9LLZrHTy9fXOtAZV1wFfH8ph2XQ5eQMJ0lSnQf/c2uveCHf IYFEbV+mhYLDVcQ3jzn6G53z2pidVzNJhil0HETj92CFxTAwRnWvVr0cFFw6AqqMog5H wNb3JpP2FWxhnfxYAHo/WtpkNnOimJnATE4b1vNNY999YHkV3gwwVNTmYX4q8CD11YxW Vlv2BhM/onOL7Pfsb3p4dzrGeHa3uC++DZNPG44nnbJ9t+8AhrnJWRTMwoxn2BHbjIZx 5W4g== X-Gm-Message-State: AOJu0YzDIptBGebTLIwqjxZEA9VW4NMi15dyXM/R5Bd+XcblTBe40rYg 73xppSd9lqgZu2IjC9n7yj6qBBWZb1ww0eMkW0c/RudY X-Google-Smtp-Source: AGHT+IHOx9WcuNLCA9hP33ricDhTXAf7ruPl4PbY8eq8v2KbmkAgy6JKTGBKIJBcCDwMToFrIbHCDvq7W3p0tDHh/qs= X-Received: by 2002:a5d:4ecf:0:b0:314:824:3788 with SMTP id s15-20020a5d4ecf000000b0031408243788mr1802360wrv.27.1691771128439; Fri, 11 Aug 2023 09:25:28 -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:25:17 -0400 Message-ID: Subject: Re: can sftp be made multi-threaded? To: freebsd-hackers@freebsd.org Content-Type: multipart/alternative; boundary="00000000000026ea2f0602a829c9" 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.984]; 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::436: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: 4RMq0B0W1Lz4cL8 --00000000000026ea2f0602a829c9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Why don=E2=80=99t you just use xargs -P until you=E2=80=99ve exhausted your= 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 sendi= ng > 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.4Gh= z > 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. > > -- > > --00000000000026ea2f0602a829c9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Why don=E2=80=99t you just use xargs -P until 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 a= t 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.

--

--00000000000026ea2f0602a829c9--