From nobody Sat Sep 02 20:05:37 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 4RdQrD4L4vz4ryWj; Sat, 2 Sep 2023 20:05:48 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: from puchar.net (puchar.net [194.1.144.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RdQrB6fT9z3d0t; Sat, 2 Sep 2023 20:05:46 +0000 (UTC) (envelope-from wojtek@puchar.net) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=puchar.net header.s=default header.b=PTQBi48U; spf=pass (mx1.freebsd.org: domain of wojtek@puchar.net designates 194.1.144.90 as permitted sender) smtp.mailfrom=wojtek@puchar.net; dmarc=none Received: Received: from 127.0.0.1 (localhost [127.0.0.1]) by puchar.net (8.15.2/8.17.1) with ESMTPS id 382K5cnd002631 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 2 Sep 2023 22:05:39 +0200 (CEST) (envelope-from wojtek@puchar.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=puchar.net; s=default; t=1693685139; bh=WBzFC9kJ3eEQu3jg/DcjA+Yb+r7p+ldIvfgK5fvxVjY=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=PTQBi48Uzph2P1EnDa0kPRnzg4JWEQbwPflsXjs7E30z7tc4VIcW18qzNGHtcNO99 C5OJrEvl9pgAgaSKGINKfAYRupGJF6c8fegQOUT8kuwlxu0yvZjOOp2Y8viYn1nETw HQTbgWvsLUW73ScNsJR4exWk83XORplvrpKVA5GU= Received: from wojtek.intra (localhost [127.0.0.1]) by wojtek.intra (8.16.1/8.16.1) with ESMTP id 382K5bBd050813; Sat, 2 Sep 2023 22:05:37 +0200 (CEST) (envelope-from wojtek@puchar.net) Received: from localhost (wojtek@localhost) by wojtek.intra (8.16.1/8.16.1/Submit) with ESMTP id 382K5bQg050810; Sat, 2 Sep 2023 22:05:37 +0200 (CEST) (envelope-from wojtek@puchar.net) X-Authentication-Warning: wojtek.intra: wojtek owned process doing -bs Date: Sat, 2 Sep 2023 22:05:37 +0200 (CEST) From: Wojciech Puchar To: Wei Hu cc: "freebsd-hackers@FreeBSD.org" , "freebsd-net@FreeBSD.org" Subject: Re: Very slow scp performance comparing to Linux In-Reply-To: Message-ID: References: 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 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.997]; R_SPF_ALLOW(-0.20)[+mx]; R_DKIM_ALLOW(-0.20)[puchar.net:s=default]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-net@freebsd.org,freebsd-hackers@freebsd.org]; ASN(0.00)[asn:43476, ipnet:194.1.144.0/24, country:PL]; RCVD_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[puchar.net:+]; TO_DN_EQ_ADDR_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_SOME(0.00)[]; HAS_XAW(0.00)[]; FROM_HAS_DN(0.00)[]; DMARC_NA(0.00)[puchar.net]; RWL_MAILSPIKE_POSSIBLE(0.00)[194.1.144.90:from] X-Rspamd-Queue-Id: 4RdQrB6fT9z3d0t tested on really today's low end laptop CPU: Intel(R) Pentium(R) CPU N3700 @ 1.60GHz (1600.19-MHz K8-class CPU) got 73MB/s from tmpfs to tmpfs, most of it was user time of ssh got 69MB/s from SSD to SSD, same. Test on server computer CPU: Intel(R) Pentium(R) CPU N3700 @ 1.60GHz (1600.19-MHz K8-class CPU) 337MB/s tmpfs to tmpfs 317MB/s ssd to ssd too mostly user time (ssh and sshd, encryption/decryption). I don't see anything wrong. What to check: a) linux ssh may have encryption off somehome b) you tested in on slow storage explanation of b - linux doesn't write to disk as long as it doesn't run of of RAM. FreeBSD writes to disk just as large block is ready, then write hell lot of data to disk, often blocking everything. So Linux looks great in stupid benchmarks. FreeBSD gives you good all-round performance with many processes working.