From nobody Thu Dec 21 15:50:52 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 4SwvzQ0xVBz54wgB for ; Thu, 21 Dec 2023 15:50:58 +0000 (UTC) (envelope-from void@f-m.fm) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (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 4SwvzN6ZFFz3HPf for ; Thu, 21 Dec 2023 15:50:56 +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=ammUE4cI; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=Gt0UfVPj; spf=pass (mx1.freebsd.org: domain of void@f-m.fm designates 64.147.123.21 as permitted sender) smtp.mailfrom=void@f-m.fm; dmarc=pass (policy=none) header.from=f-m.fm Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 660283200AB3 for ; Thu, 21 Dec 2023 10:50:55 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 21 Dec 2023 10:50:55 -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=1703173854; x=1703260254; bh=iAlxTLe2Sg E2By+JiNo6Ycp2hx5C9PXeh0H8GUuCRz0=; b=ammUE4cItk1e0uehVp+dwhwTLM /cnxlAbbFHgRPPzxDvxNoqLGgf2bKiaw3nG9jjgu9htIwEFrdzKYLoemeUedHSdp HOYBLU1FRJRQ68DUnUXT+QHVxZBERJFGCsisCO1O6vlDLZzyPmn934eojuraXUyO LQv0ozK24vsrjNKeTAFn+Ob2mmCL9IiOITsdT0SlnVfQ2J9nEquje/2kwqMW2M9O BA4Tqj76q8814krF1ok8KsYUDip2I2Xua3q8FatgxWyplOiGseTZgjIgQczpZiNL AWQ0pSFewUDb+6j54EO5ab9jd5/UT3TFe+MwN8XCRTYXSYwI1OPydbKY3otg== 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=1703173854; x=1703260254; bh=iAlxTLe2SgE2By+JiNo6Ycp2hx5C 9PXeh0H8GUuCRz0=; b=Gt0UfVPjKcxohBWwuMh/6TQNImTgkR5GYV3XAK2TlFoy ybxpWqHI7VBp3sNIA/r01MjmTxThPGvKwxt6a3E1sFW7jbFVAIwzTOdhpxwxWXwW mS/VHjbfXXdP5udpK6CJBvH44UQpjkOJ64AqCsetVm5XQ/CJ6M15igrrKGi14Qel YPioEdizt218kWpVRukk2ovYlbn9vw3qVkejCnoa/2vwKwJEZXA5mdiAeI0WuJ6h V6uzNvYWVXAvAcLUuIo7WHS8T52GIqgskgdnjg74UOW6C/THB4Q2JdFIKErA5RQE t229yYen8+vLIVQnUZpvymFeIjte8XH1R6Be2NfNnA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdduhedgheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesthdtre dttddtvdenucfhrhhomhepvhhoihguuceovhhoihgusehfqdhmrdhfmheqnecuggftrfgr thhtvghrnhepfedtgfethfefkeejhefhheetteevjeeifeefudegheegfeelfeeggeevve dugedvnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigv pedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehvohhiugesfhdqmhdrfhhm X-ME-Proxy: Feedback-ID: i2541463c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Thu, 21 Dec 2023 10:50:54 -0500 (EST) Date: Thu, 21 Dec 2023 15:50:52 +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 [-3.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.96)[-0.960]; MID_RHS_NOT_FQDN(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[f-m.fm,none]; RWL_MAILSPIKE_EXCELLENT(-0.40)[64.147.123.21:from]; R_DKIM_ALLOW(-0.20)[f-m.fm:s=fm2,messagingengine.com:s=fm2]; R_SPF_ALLOW(-0.20)[+ip4:64.147.123.21]; RCVD_IN_DNSWL_LOW(-0.10)[64.147.123.21: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: 4SwvzN6ZFFz3HPf X-Spamd-Bar: --- On Wed, Dec 20, 2023 at 07:48:14PM -0800, Mark Millard wrote: ># swapoff /dev/label/growfs_swap ># dd if=/dev/urandom of=/dev/da0s2b bs=8k count=250000 conv=sync status=progress >^C478830592 bytes (479 MB, 457 MiB) transferred 22.001s, 22 MB/s >60557+0 records in >60556+0 records out >496074752 bytes transferred in 22.790754 secs (21766491 bytes/sec) 22MB/s is usable, I think. In my context, I'd be satisfied with that. My context differs from yours slightly in that yours is SSD and mine is spinning rust. This is unusable: # 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 because it's way too slow. Swap never gets fully reclaimed, thrashing happens, loads of other followon effects happen. The same partition formatted as ufs reports 113 MB/s. Multiple swap partitions have been tested, then converted to ufs. Results are the same. There are no reported errors in smartctl. Long smartctl tests run monthly. 5 Reallocated_Sector_Ct PO--CK 100 100 050 - 0 9 Power_On_Hours -O--CK 001 001 000 - 48992 196 Reallocated_Event_Count -O--CK 100 100 000 - 0 197 Current_Pending_Sector -O--CK 100 100 000 - 0 198 Offline_Uncorrectable ----CK 100 100 000 - 0 I can't find any hardware problem here. Possible workarounds, bearing in mind I'm not versant in C so it's not like I can fix this myself in code: 1. swap as swapfile and not partition [a] 2. swap as nfs [b] 3. swapoff & swapon script running every minute [c] 4. just turn all swap off and reboot after crashing (undesirable) 5. use another OS that doesn't have this problem [a] not tried yet, and i hope it works. Legacy info suggests swap as partition is usually faster than filesystem-based swap. But the reverse might be the case here. [b] also not tried. This, I imagine, would be filesystem only (I'm unsure a zfs volume can be exported to look like a mountable partition to the client) [c] https://github.com/Freaky/swapflush.git - usually works but maybe i need to run it every minute instead of every five mins. For testing, this script was disabled. Any additional suggestions on how to overcome this problem gratefully received. --