From nobody Tue Dec 19 13:23:31 2023 X-Original-To: freebsd-fs@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 4SvcpK5K4xz54Dx0 for ; Tue, 19 Dec 2023 13:23:37 +0000 (UTC) (envelope-from void@f-m.fm) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4SvcpJ2qLvz4TSX for ; Tue, 19 Dec 2023 13:23:36 +0000 (UTC) (envelope-from void@f-m.fm) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=f-m.fm header.s=fm2 header.b=CSLaXqi5; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=qkCFQ7AG; spf=pass (mx1.freebsd.org: domain of void@f-m.fm designates 64.147.123.24 as permitted sender) smtp.mailfrom=void@f-m.fm; dmarc=pass (policy=none) header.from=f-m.fm Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 49EC33200A35 for ; Tue, 19 Dec 2023 08:23:34 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 19 Dec 2023 08:23:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=f-m.fm; h=cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1702992213; x=1703078613; bh=K8Gr8IxX1X fS/4skJhGb32TXLGnquMYAc7xKmM82low=; b=CSLaXqi5vO76Gkji7coOR0Demo yVQmLfGJlpzwahNzKB/m1q0vv6z1y/rXqrfEOg2RjVVSgPoR5bRh+3YX7RRt9zmr 4I5CbP//lb7Otp60UTEVFy7Ldrl0OB1CWN9r7/U3Zbb3A1Wu6jeOueialXdq1zel 9YCFpYCHw7VxlpDxLwKn9ZZDe3d9VNFVBgZNP8OHIENyVAhcJoVshzZ5RzzXss59 l2wACIuojc6XHrxls0pu76xZXSOlifYYLkIFMrZ+fiECPoaGdo2hgA4iSY+XHVoy 6I18LIl8s30ya6PuhENlQrE3W0Ogz34lG4PuLnKsIxFhYsZvqWtxMnqH0LQw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1702992213; x=1703078613; bh=K8Gr8IxX1XfS/4skJhGb32TXLGnq uMYAc7xKmM82low=; b=qkCFQ7AGj+NaA9giU8cpTgWgalWvwxv5i9LirKomjSCQ BmwUOQia485VjTJum8C8pT7SCA1dHHfy4IgvpuLROqbBrTRaVZN81qZ9PmW0tE98 EEULh8ilX1vNlyy9dgevQhWjsa7ptthy4Rk4BEqlJBRW6TZX0E/M5HpJyUovp4oT rDs1d2TgTaQ5UUz/tMze1cl1UZw3XrcwGSuM+u5ipKiprFnyriP+20Nfjy+WwaBj EYNpICmTVZ2MoB8AmrPvYhwy83ICJSCUg6QA91E9cVNMNfP6pZhZtTuwflP1Qtk+ LM8P1PdT3tPdCURLWTbaBkL8m5J0lG8DgwpFZi9eYw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvddutddghedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesthdtre dttddtvdenucfhrhhomhepvhhoihguuceovhhoihgusehfqdhmrdhfmheqnecuggftrfgr thhtvghrnhepkeeluddvlefhieelfefggffhffektdehleelgfdugfdvgeekjeejuddthe ehgfeunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhep vhhoihgusehfqdhmrdhfmh X-ME-Proxy: Feedback-ID: i2541463c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 19 Dec 2023 08:23:33 -0500 (EST) Date: Tue, 19 Dec 2023 13:23:31 +0000 From: void To: freebsd-fs@freebsd.org Subject: Re: measuring swap partition speed Message-ID: Mail-Followup-To: freebsd-fs@freebsd.org References: List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MID_RHS_NOT_FQDN(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[f-m.fm,none]; RWL_MAILSPIKE_EXCELLENT(-0.40)[64.147.123.24:from]; R_DKIM_ALLOW(-0.20)[f-m.fm:s=fm2,messagingengine.com:s=fm2]; R_SPF_ALLOW(-0.20)[+ip4:64.147.123.24]; RCVD_IN_DNSWL_LOW(-0.10)[64.147.123.24:from]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; PREVIOUSLY_DELIVERED(0.00)[freebsd-fs@freebsd.org]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; ASN(0.00)[asn:29838, ipnet:64.147.123.0/24, country:US]; MLMMJ_DEST(0.00)[freebsd-fs@freebsd.org]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_NONE(0.00)[]; FREEMAIL_FROM(0.00)[f-m.fm]; DWL_DNSWL_NONE(0.00)[messagingengine.com:dkim]; DKIM_TRACE(0.00)[f-m.fm:+,messagingengine.com:+]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[f-m.fm]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 4SvcpJ2qLvz4TSX X-Spamd-Bar: --- On Fri, Dec 15, 2023 at 08:41:10AM -0700, Warner Losh wrote: >benchmarking of storage. Do a random workload with a 8k write size (since >that's the page >size of aarch64) on one of the swap partitions when it's not in active use. I've not got my head around benchmarks/fio yet. But I've done the following tests which seem to show abysmal swap speed, not linked to the hardware : # dd if=/dev/urandom of=/dev/da0p4 bs=8k count=250000 conv=sync status=progress ^C11862016 bytes (12 MB, 11 MiB) transferred 40.063s, 296 kB/s 1494+0 records in 1493+0 records out 12230656 bytes transferred in 41.495178 secs (294749 bytes/sec) # dd if=/dev/urandom of=/dev/da0p4 bs=128k count=250000 conv=sync status=progress ^C88080384 bytes (88 MB, 84 MiB) transferred 47.309s, 1862 kB/s 674+0 records in 673+0 records out 88211456 bytes transferred in 48.677246 secs (1812170 bytes/sec) But when the same partition is formatted as ufs: # newfs -U /dev/da0p4 /dev/da0p4: 2048.0MB (4194304 sectors) block size 32768, fragment size 4096 using 4 cylinder groups of 512.03MB, 16385 blks, 65664 inodes. with soft updates super-block backups (for fsck_ffs -b #) at: 192, 1048832, 2097472, 3146112 # mount /dev/da0p4 /mnt # dd if=/dev/urandom of=/mnt/test8k.bin bs=8k count=250000 conv=sync status=progress 2036400128 bytes (2036 MB, 1942 MiB) transferred 18.013s, 113 MB/s 250000+0 records in 250000+0 records out 2048000000 bytes transferred in 18.084497 secs (113246167 bytes/sec) why the difference? My non-expert observation is that when swap gets used, all writes start backing up and it starts thrashing. it's a thing I'd expect to see with slow media like microSD but not on faster hardware. I have the following sysctls set to minimise swap use vm.pageout_oom_seq=120 vm.pfault_oom_attempts=-1 vm.pageout_update_period=0 vfs.zfs.arc.min=536870912 vfs.zfs.arc_max=1073741824 this is a rpib4 with 8GB how can I fix? --