From owner-freebsd-stable@freebsd.org Fri Jun 26 16:11:42 2020 Return-Path: Delivered-To: freebsd-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D584735B390 for ; Fri, 26 Jun 2020 16:11:42 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp-relay-int.realworks.nl (smtp-relay-int.realworks.nl [194.109.157.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 49thhs3zr7z4ncj for ; Fri, 26 Jun 2020 16:11:41 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Date: Fri, 26 Jun 2020 18:11:36 +0200 (CEST) From: Ronald Klop To: Bob Bishop Cc: Donald Wilde , Peter Jeremy , freebsd-stable Message-ID: <1140215402.1.1593187896838@localhost> In-Reply-To: References: <20200625000410.GA10210@eureka.lemis.com> <20200625025248.GB10210@eureka.lemis.com> <20200626102331.GA6406@server.rulingia.com> Subject: Re: swap space issues MIME-Version: 1.0 X-Mailer: Realworks (514.203.b005ea048dd) Importance: Normal X-Priority: 3 (Normal) X-Rspamd-Queue-Id: 49thhs3zr7z4ncj X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of ronald-lists@klop.ws designates 194.109.157.24 as permitted sender) smtp.mailfrom=ronald-lists@klop.ws X-Spamd-Result: default: False [-1.69 / 15.00]; MID_RHS_NOT_FQDN(0.50)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.88)[-0.879]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:194.109.157.0/24]; NEURAL_HAM_LONG(-1.01)[-1.011]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[klop.ws]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.00)[-0.001]; HAS_X_PRIO_THREE(0.00)[3]; RCVD_IN_DNSWL_NONE(0.00)[194.109.157.24:from]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:3265, ipnet:194.109.0.0/16, country:NL]; FREEMAIL_CC(0.00)[gmail.com,rulingia.com,freebsd.org]; RWL_MAILSPIKE_VERYGOOD(0.00)[194.109.157.24:from] Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 16:11:42 -0000 =20 Van: Bob Bishop Datum: vrijdag, 26 juni 2020 17:18 Aan: Peter Jeremy CC: Donald Wilde , freebsd-stable Onderwerp: Re: swap space issues >=20 >=20 >=20 > > On 26 Jun 2020, at 11:23, Peter Jeremy wrote: > > > > On 2020-Jun-25 11:30:31 -0700, Donald Wilde wrote: > >> Here's 'pstat -s' on the i3 (which registers as cpu HAMMER): > >> > >> Device 1K-blocks Used Avail Capacity > >> /dev/ada0s1b 33554432 0 33554432 0% > >> /dev/ada0s1d 33554432 0 33554432 0% > >> Total 67108864 0 67108864 0% > > > > I strongly suggest you don't have more than one swap device on spinning > > rust - the VM system will stripe I/O across the available devices and > > that will give particularly poor results when it has to seek between th= e > > partitions. > =20 > If you configure a ZFS mirror in bsdinstall you get a swap partition per = drive by default. If you are running on multiple disks (a mirror) it can provide extra speed.= The example above is on the same disk. On one disk multiple swap partition= s will only spread the data non-optimal for the heads of the disk. >=20 > > Also, you can't actually use 64GB swap with 4GB RAM. If you look back > > through your boot messages, I expect you'll find messages like: > > warning: total configured swap (524288 pages) exceeds maximum recommend= ed amount (498848 pages). > > warning: increase kern.maxswzone or reduce amount of swap. > > or maybe: > > WARNING: reducing swap size to maximum of xxxxMB per unit > > > > The absolute limit on swap space is vm.swap_maxpages pages but the real= istic > > limit is about half that. By default the realistic limit is about 4=C3= =97RAM (on > > 64-bit architectures), but this can be adjusted via kern.maxswzone (whi= ch > > defines the #bytes of RAM to allocate to swzone structures - the actual > > space allocated is vm.swzone). > > > > As a further piece of arcana, vm.pageout_oom_seq is a count that contro= ls > > the number of passes before the pageout daemon gives up and starts kill= ing > > processes when it can't free up enough RAM. "out of swap space" messag= es > > generally mean that this number is too low, rather than there being a > > shortage of swap - particularly if your swap device is rather slow. > > > > -- > > Peter Jeremy >=20 >=20 > -- > Bob Bishop t: +44 (0)118 940 1243 > rb@gid.co.uk m: +44 (0)783 626 4518 >=20 >=20 >=20 >=20 > =20 >=20 >=20 > =20