From nobody Sat Dec 23 23:24:34 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 4SyKyD6lKhz558dt for ; Sat, 23 Dec 2023 23:24:52 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic317-21.consmr.mail.gq1.yahoo.com (sonic317-21.consmr.mail.gq1.yahoo.com [98.137.66.147]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4SyKyC3WK6z3C8w for ; Sat, 23 Dec 2023 23:24:51 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=PatBt85o; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.66.147 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1703373888; bh=AGiWZ0GtHqd9soebrNcSMEMYlI8S01f+/KIFA3wgS3U=; h=From:Subject:Date:References:To:In-Reply-To:From:Subject:Reply-To; b=PatBt85o3f+ZrKr5sNHY++rp1K3hAiFErOs4bITQ348b9/IRYKMjhZ0MhsJ/c4CQC3DTbKCWRIyltFczh8Ux14ZCgUsbYitd5yMdztP71Xd1q2tfzsn4NJMDyZq2RFdrF344PF9KFpf+1jV97t85gJ5a/q4rSPtDsZgH/mU7HDhbRllHCm35rpU5RyK+j6S34Hz8CY8s1JSzQX/H/J5r8NAd8jiCCNZQWhmCDf892KD2D1UwbE/aBgdlngYPLHBrZNZA0r6/JZix5VvjNbRHqHjLQhLjekmkzWr10GbK6rg97MoSaMQPZ/aCHyuRj85jKgp91/WA9rN6BkoETtPPwQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1703373888; bh=NZR5KHbSjpNw402V787ya0pmWjF1lM7WGDGXTYDkX9z=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=hrQy1kHxuioyGqRQjvA65XtJF3mK0z/FOrG0QL6Xye87NozQwHQ2Y69fPZufRGwiCLwcf4yVVD3DR69FgrW/A4ZbD99YtLo4TheR2KEVcSP1UT7zD1eW4ZsF60k8FrP2O9hBGxRYX5n9ZEULvuIkro5HmxKjodw1LJ0lqOrlKrmoiA32DgzFbjkeKPchey04nAelApoOL4h+qkHcnSgB0mooblyXNtQYZ6XX0RFEKKtwVTjG8g5PpUEhLAD9+g0dlTLvwhnrZyyXz5CiRclGmWacT6qtXvDt7E5e444fb9g4c3legUSI+CIiSTke5AWkuN5GlCBUVYiYILH4f1EV7Q== X-YMail-OSG: rU8.fJAVM1lWp1uq186g1b_OGTCuMJEk4IBsYONZRrjwAslbYkl2nnynlFMcyEZ L7uuggEGWGdnZRtAJoRhzRDaaE3nXfmFZzs6jMpiRm1HVntw4I3dXdTPBtn6jbrVnLfAvDfmuX9m NNEehne7xcpFYCu15k_CMED.lweFe1KdVF.vVYCP2RXAg9qH2abKIlvDGfwIpC2zGE6ROzMSa43K WTMia3KZKxFcEDJzHuZS141a14nbaPEHSpfqOfHMArebDBMfCoun9dJNfBbitW4h.8PMl8MqJm0B 0gievnendZTtkkcVnfnqYeiR9_I81Op5h1_zZVaDtUb9LXEiJrl5a73vMOAOCXFqBSfgiDTVA2RI IhrKCklGRvHpmKZbIo8SbTRfAS5ohBxH.5miRlVm6wn4InNB0jyrxfsR6vCXfILXaIAjGsOLGOYu Fov_BhGeyb4yQCwKkwh9CYNpOmtv2IBwudrhsAVtZ0mnPaOiRVLRHwXgaAgTM4G.JlRQSX2Xt.gK xJ1RV5E6Vg49dCVmoUT5POaX6qPdYiXZqZ9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Qxcb8LyohUXtv7mg3CbX _OcGnvZ6zzB4B7RSykUFj7yQ20RY2R0K_kT_ZIaX7VNoZFQc9VxZXOKCNxGpTDY1YZolJL9d09ry Bz51DJaalVAnv9Xaz7ybYyUlfx2LC7SmUHsa9L85AXHmxKSk0b2i9Lm8kvT7N8.bCmWZzyhYl_co 5pkciRNOosIC6PbrgJzMlXnRbpJLT8ym0ly6XN8yliuwdBEkn2y8JX.5853b.250X.LU8qG2neHL 9bZRs2OYX4Jd2TfC91oKk2dM7UDAPwOEq_jq4Y1kdDXnnG_h8H1RA.PBea9uf_GfYaXw0iE39M6A ZuuQW998m24iUnJT_mCBb3H.WWKGCXOeXIkJ8znba3R.5oSAjxQFiefKauxrGW5DFKwCmZyM7IHr 8KEa.Cb7XlChWHDTLKYz.Ly7wbwr6dpqZcZhhXjNgxhrURSsdZgJzN8Tb3YcsLZnKXL8BlndBcex nocm4LaGyhhdIGvCXqEHs.8hMvzFKyZOXNwmw_p0zSKQ00e05pMiM8SQkXJQEI0HHmZADAbT0bSj yM8fhqhf6D7Oi26DbnDO7xBe.3ccRrQw0DaJOJHfnkZZ8IAujPdCnxqM8wosDAWW0ciOFEQ.50bn 4FQI1tiGuCQZvuOSo5zCFSIKoyvYYcMl6z29QlP9jGmfbSn4Sc4m2dCcRZZ1kiu819bpJtCyce1s q X-Sonic-MF: X-Sonic-ID: 47fa48de-65ac-45db-b189-204992988392 Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.gq1.yahoo.com with HTTP; Sat, 23 Dec 2023 23:24:48 +0000 Received: by hermes--production-gq1-6949d6d8f9-x28h5 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID ae133fe4d8995c93ae69ee93a40199e9; Sat, 23 Dec 2023 23:24:45 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable 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 (Mac OS X Mail 16.0 \(3774.300.61.1.2\)) Subject: Re: measuring swap partition speed Date: Sat, 23 Dec 2023 15:24:34 -0800 References: <81D464BA-FABE-4F25-B2BE-3DB9D85E3E64@yahoo.com> To: void , freebsd-fs@freebsd.org In-Reply-To: <81D464BA-FABE-4F25-B2BE-3DB9D85E3E64@yahoo.com> Message-Id: <68CE5AE9-4800-49B6-BC00-14F5D3AB464A@yahoo.com> X-Mailer: Apple Mail (2.3774.300.61.1.2) X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; MLMMJ_DEST(0.00)[freebsd-fs@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[98.137.66.147:from]; MID_RHS_MATCH_FROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.66.147:from]; DKIM_TRACE(0.00)[yahoo.com:+]; FREEMAIL_FROM(0.00)[yahoo.com]; TO_DN_SOME(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_TO(0.00)[f-m.fm,freebsd.org]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4SyKyC3WK6z3C8w X-Spamd-Bar: --- On Dec 23, 2023, at 14:01, Mark Millard wrote: > On Dec 23, 2023, at 11:55, Mark Millard wrote: >=20 >> void wrote on >> Date: Sat, 23 Dec 2023 15:52:55 UTC : >>=20 >>> On Fri, 22 Dec 2023, at 09:37, Ronald Klop wrote: >>>> Can you provide more concrete information? Like: >>>>=20 >>>> # usbconfig list >>>=20 >>> # usbconfig list >>> ugen0.1: <(0x1106) XHCI root HUB> at usbus0, cfg=3D0 md=3DHOST = spd=3DSUPER (5.0Gbps) pwr=3DSAVE (0mA) >>> ugen0.2: at usbus0, cfg=3D0 md=3DHOST = spd=3DHIGH (480Mbps) pwr=3DSAVE (100mA) >>> ugen0.3: at usbus0, cfg=3D0 md=3DHOST spd=3DLOW (1.5Mbps) pwr=3DON = (24mA) >>> ugen0.4: at usbus0, cfg=3D0 md=3DHOST = spd=3DHIGH (480Mbps) pwr=3DON (450mA) >>> ugen0.5: at usbus0, cfg=3D0 md=3DHOST spd=3DSUPER = (5.0Gbps) pwr=3DON (36mA) >>>=20 >>> The power supply is the approved 5.1V 3A one. >>=20 >> I use CanaKit power supplies that have more margin for the power: >>=20 >> 5.1V 3.5A >>=20 >>>> And the output of "devinfo -v". That will give people much more=20 >>>> information to work with instead of "anecdotal evidence" about your=20= >>>> hardware being usb3. >>>=20 >>> devinfo -v : https://bsd.to/ADPj >>>=20 >>> detailed dmesg is here: https://bsd.to/Q5tx >>=20 >> That last indicates another potentially significant difference >> from my example benchmarks done for comparison to yours: >>=20 >> GEOM_ELI: Device da0p3.eli created. >> GEOM_ELI: Encryption: AES-XTS 256 >> GEOM_ELI: Crypto: software >>=20 >> That likely contributes to slowing down I/O for da0p3 and >> possibly to leaving less time for I/O to other partitions >> when da0p3 is in use. >>=20 >> If you had the resources to test avoiding the encrypted >> partition for your type of media, that might prove >> interesting. >>=20 >> I've never had occasion to want to use any encrypted >> partitions for my FreeBSD activity. >>=20 >> I'm unsure of the GEOM_ELI processing-time contributions >> vs. "gstat -spod" reporting. >=20 > FYI: the 2023-Dec-16 stable/14 snapshot that I'm using > has: >=20 > # strings /boot/efi/start4.elf | grep VC_BUILD_ID_ > VC_BUILD_ID_USER: dom > VC_BUILD_ID_TIME: 10:50:39 > VC_BUILD_ID_VARIANT: start > VC_BUILD_ID_TIME: Mar 17 2023 > VC_BUILD_ID_BRANCH: bcm2711_2 > VC_BUILD_ID_HOSTNAME: buildbot > VC_BUILD_ID_PLATFORM: raspberrypi_linux > VC_BUILD_ID_VERSION: 82f3750a65fadae9a38077e3c2e217ad158c8d54 (clean) >=20 > So fairly modern RPi* firmware compared to what FreeBSD used > to use. >=20 > What vintage are you using? IT may have different defaults than > what my FreeBSD snaphot context reports. >=20 >=20 > Another issue may be: >=20 > bcm2835_cpufreq0: current ARM 600MHz, Core 250MHz, SDRAM 400MHz, Turbo = OFF > bcm2835_cpufreq0: max/min ARM 2147/600MHz, Core 750/250MHz, SDRAM = 400/400MHz >=20 > What does: >=20 > # sysctl dev.bcm2835_cpufreq.0.freq_settings dev.cpu.0.freq_levels = dev.cpu.0.freq >=20 > report for your context? The default for the FreeBSD supplied > config.txt in the snapshot I'm using is: >=20 > # sysctl dev.bcm2835_cpufreq.0.freq_settings dev.cpu.0.freq_levels = dev.cpu.0.freq > dev.bcm2835_cpufreq.0.freq_settings: 1500/-1 600/-1 > dev.cpu.0.freq_levels: 1500/-1 600/-1 > dev.cpu.0.freq: 600 >=20 > Adding arm_boost=3D1 to config.txt in order to have 1800 instead of = 1500: >=20 > # sysctl dev.bcm2835_cpufreq.0.freq_settings dev.cpu.0.freq_levels = dev.cpu.0.freq > dev.bcm2835_cpufreq.0.freq_settings: 1800/-1 600/-1 > dev.cpu.0.freq_levels: 1800/-1 600/-1 > dev.cpu.0.freq: 600 >=20 > Then there is how I normally use all the RPi4B's that I > (sometimes) have access to: >=20 > # more /boot/efi/config.txt=20 > [all] > arm_64bit=3D1 > dtparam=3Daudio=3Don,i2c_arm=3Don,spi=3Don > dtoverlay=3Dmmc > dtoverlay=3Ddisable-bt > device_tree_address=3D0x4000 > kernel=3Du-boot.bin >=20 > [pi4] > hdmi_safe=3D1 > armstub=3Darmstub8-gic.bin > # > over_voltage=3D6 > sdram_freq_min=3D3200 > arm_freq_min=3D2000 > force_turbo=3D1 >=20 > # sysctl dev.bcm2835_cpufreq.0.freq_settings dev.cpu.0.freq_levels = dev.cpu.0.freq > dev.bcm2835_cpufreq.0.freq_settings: 2000/-1 > dev.cpu.0.freq_levels: 2000/-1 > dev.cpu.0.freq: 2000 >=20 >=20 > An unfortunate issue is the signed output of: >=20 > # sysctl -x hw.cpufreq.sdram_freq > hw.cpufreq.sdram_freq: 0xbebc2000 > root@generic:~ # sysctl hw.cpufreq.sdram_freq > hw.cpufreq.sdram_freq: -1094967296 >=20 > 0xbebc2000 =3D=3D 3200000000 >=20 > (3200 [MHz] in terms of config.txt content. More modern > RPi* firmware always uses that figure by default for > sdram_freq_min as well: so fixed RAM frequency across > alternate arm frequencies.) >=20 > Also, FreeBSD does not have a hw.cpufreq.sdram_freq_min > but the RPi4B does have sdram_freq_min . >=20 > Based on config.txt as FreeBSD supplies it: >=20 > # sysctl hw.cpufreq.sdram_freq > hw.cpufreq.sdram_freq: 400000000 >=20 > (That last is 400 [MHz] in config.txt notation.) >=20 > This is based on the RPi* firmware default for > sdram_freq_min for the vintage of RPi* firmware > FreeBSD currently uses for its snapshot builds. >=20 > If you are using the combination: >=20 > dev.cpu.0.freq: 600 > hw.cpufreq.sdram_freq: 400000000 >=20 > that may be causing extra time to be taken compared to > alternatives. >=20 > Of course you may be using powerd or some such. I use > fixed frequency configurations normally. >=20 Well, my assumption about the likes of the hw.cpufreq.sdram_freq being due to RPi* firmware looks to be wrong. The RPi* documentation changed from 400 MHz to 3200 MHz for RPi4B sdram_freq_min at: Before (400), Jun 8, 2021: = https://github.com/raspberrypi/documentation/blob/974995fabb184a2435a98e68= c1e728b346112f89/configuration/config-txt/overclocking.md After (3200), Jun 9, 2021: = https://github.com/raspberrypi/documentation/blob/920ff905995541f7ef1c6048= 2924a392143e9192/configuration/config-txt/overclocking.md The RPi* firmware should be setting things up to have 3200 MHz. Since that is not what FreeBSD ends up with in modern snapshots with the FreeBSD supplied config.txt , Likely FreeBSD has taken control of such. This might just be one example parameter that is overridden. =3D=3D=3D Mark Millard marklmi at yahoo.com