From nobody Fri Dec 22 16:59:10 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 4SxYSc0XYDz54C86 for ; Fri, 22 Dec 2023 17:00:00 +0000 (UTC) (envelope-from void@f-m.fm) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) (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 4SxYSZ39QGz3XP0 for ; Fri, 22 Dec 2023 16:59:58 +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=u6q3fvWv; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=hAFKMFja; spf=pass (mx1.freebsd.org: domain of void@f-m.fm designates 64.147.123.19 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 56A253200B21 for ; Fri, 22 Dec 2023 11:59:56 -0500 (EST) Received: from imap46 ([10.202.2.96]) by compute6.internal (MEProxy); Fri, 22 Dec 2023 11:59:56 -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=1703264395; x=1703350795; bh=urScdkpprG n6AJS4c1aFynnWoHAE15SlUeND96Wq7hY=; b=u6q3fvWvNlB9uv2bFc06+1XsxE vUBGeOoh+xvBdJOrJ991tig14rsSYKbCxXsRQuol8ytL+w/eiOrgpxg23NatnY+h htQCQmQJzI5I7zpTx6Fma94TGz6OwnhD9l243SpeNeOPxqLTHQxJugkzEHzsSUj5 FCcndJvccCEYg6PgPW1lguZ1CvGu7kFH25KpmujiCkryw3YKyZ2hPv+jA27x++u7 YKtagOFsbW441cSZPVgkp8hQNZw8He6n8EUMC+Ba4hok2TmPEbahzQ2UmMS+a2BN PeaiT3+KzjkmhjFmtIHwpjOIp8GZvlhJz9G9LWJQQ1ro9pTEmDqTd7XmiWFw== 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=1703264395; x=1703350795; bh=urScdkpprGn6AJS4c1aFynnWoHAE 15SlUeND96Wq7hY=; b=hAFKMFjaiZrCAbGPZBh5qQun5jnQ7pNtv1dU108b16Zd pfrMrf/qGoCfz2lTmncdTJmqO0q7K5zOR15TSeT3Geh//zaxuBMkKeJb+MpmDJMz KnR/1A0F5WJhPD1w8XRNFtaJPgQdVEoKTubFGgCz/wnidEC4P4grOu1EPVYL4zUh LdNgBmSWmPGWdkFbwnwtS6yaOvbDCCVKcAL6oob+J81ugusmKZLm7OAutTJ5+Ete CY5U8hdtwFJnxTTXMKaMDnAiKxbHDqEsV4Doi9Bvyu2QAqfIc+9541nIPjTioYzp Wnj66Lko9QbIVZIexWP1Yas0WYohBwamaDm33QlG/A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvddujedgledvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtsehttd ertderredtnecuhfhrohhmpehvohhiugcuoehvohhiugesfhdqmhdrfhhmqeenucggtffr rghtthgvrhhnpeeitedvueehtdehtddvhfeuhfevhedvieelvdeiffehveelheegfedule ejudekvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pehvohhiugesfhdqmhdrfhhm X-ME-Proxy: Feedback-ID: i2541463c:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 8092C2A2008B; Fri, 22 Dec 2023 11:59:55 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1364-ga51d5fd3b7-fm-20231219.001-ga51d5fd3 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 Message-Id: In-Reply-To: References: Date: Fri, 22 Dec 2023 16:59:10 +0000 From: void To: freebsd-fs Subject: Re: measuring swap partition speed Content-Type: text/plain X-Spamd-Result: default: False [-4.46 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.97)[-0.970]; DMARC_POLICY_ALLOW(-0.50)[f-m.fm,none]; RWL_MAILSPIKE_EXCELLENT(-0.40)[64.147.123.19:from]; R_DKIM_ALLOW(-0.20)[f-m.fm:s=fm2,messagingengine.com:s=fm2]; R_SPF_ALLOW(-0.20)[+ip4:64.147.123.19]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[64.147.123.19:from]; XM_UA_NO_VERSION(0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-fs@freebsd.org]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[f-m.fm]; ASN(0.00)[asn:29838, ipnet:64.147.123.0/24, country:US]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; 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)[]; RCPT_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[freebsd-fs@freebsd.org] X-Rspamd-Queue-Id: 4SxYSZ39QGz3XP0 X-Spamd-Bar: ---- My assessment of the "system being inactive while testing" may have been inaccurate. By "being inactive" I was looking at avg load being 1% or less, and for swap use being 0. Maybe the initial "inactive" test should have been in single user mode [1] because the tests in this mode show no (I mean much less) of a speed issue. Apologies for not considering single user mode till now. The results in single user mode seem to me to infer that there is no problem with the hardware. I have been able to reliably create the problem by rebooting the computer, then running something that does not need to be one huge chunk of data, that doesn't load the system that much, so ran 'make installworld' and in another terminal ran the write-to-swap-partition test [2]. It shows in this context that writing to the filesystem effectively blocks writing to swap. 507 kB/s compared to 16 MB/s. I don't know if this is unique to arm64 or if it's also the case on other arches, but it seems suboptimal to me. [1] single user mode test across various blocksizes: Enter root password, or ^D to go multi-user Password: Enter full pathname of shell or RETURN for /bin/sh: root@:/ # dd if=/dev/urandom of=/dev/da0p7 bs=4k conv=sync status=progress dd: /dev/da0p7: end of device2040 MiB) transferred 223.000s, 9591 kB/s 524289+0 records in 524288+0 records out 2147483648 bytes transferred in 223.905183 secs (9591040 bytes/sec) root@:/ # dd if=/dev/urandom of=/dev/da0p7 bs=8k conv=sync status=progress dd: /dev/da0p7: end of device2045 MiB) transferred 131.001s, 16 MB/s 262145+0 records in 262144+0 records out 2147483648 bytes transferred in 131.214263 secs (16366236 bytes/sec) root@:/ # dd if=/dev/urandom of=/dev/da0p7 bs=16k conv=sync status=progress dd: /dev/da0p7: end of device2038 MiB) transferred 82.003s, 26 MB/s 131073+0 records in 131072+0 records out 2147483648 bytes transferred in 82.420743 secs (26055136 bytes/sec) root@:/ # dd if=/dev/urandom of=/dev/da0p7 bs=32k conv=sync status=progress dd: /dev/da0p7: end of device2028 MiB) transferred 61.030s, 35 MB/s 65537+0 records in 65536+0 records out 2147483648 bytes transferred in 61.621686 secs (34849479 bytes/sec) root@:/ # dd if=/dev/urandom of=/dev/da0p7 bs=128k conv=sync status=progress dd: /dev/da0p7: end of device2032 MiB) transferred 49.002s, 43 MB/s 16385+0 records in 16384+0 records out 2147483648 bytes transferred in 49.394171 secs (43476459 bytes/sec) root@:/ # [2] test swap partition writing while multiuser and 'make installworld' # dd if=/dev/urandom of=/dev/da0p7 bs=8k conv=sync status=progress ^C57442304 bytes (57 MB, 55 MiB) transferred 113.382s, 507 kB/s 7013+0 records in 7012+0 records out 57442304 bytes transferred in 114.630376 secs (501109 bytes/sec) test while multiuser and 4k write to zfs: # dd if=/dev/urandom of=test4k.bin bs=4k count=2500000 conv=sync status=progress ^C9595363328 bytes (9595 MB, 9151 MiB) transferred 115.001s, 83 MB/s 2360113+0 records in 2360113+0 records out 9667022848 bytes transferred in 115.957392 secs (83367025 bytes/sec) # dd if=/dev/urandom of=/dev/da0p7 bs=8k conv=sync status=progress ^C7127040 bytes (7127 kB, 6960 KiB) transferred 112.235s, 64 kB/s 872+0 records in 871+0 records out 7135232 bytes transferred in 112.309547 secs (63532 bytes/sec)