Van: Bob Bishop <rb at gid.co.uk> Datum: vrijdag, 26 juni 2020 17:18 Aan: Peter Jeremy <peter at rulingia.com> CC: Donald Wilde <dwilde1 at gmail.com>, freebsd-stable <freebsd-stable at freebsd.org> Onderwerp: Re: swap space issues> > > > > On 26 Jun 2020, at 11:23, Peter Jeremy <peter at rulingia.com> wrote: > > > > On 2020-Jun-25 11:30:31 -0700, Donald Wilde <dwilde1 at gmail.com> 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 the > > partitions. > > 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 partitions will only spread the data non-optimal for the heads of the disk. >> > 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 recommended 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 realistic > > limit is about half that. By default the realistic limit is about 4?RAM (on > > 64-bit architectures), but this can be adjusted via kern.maxswzone (which > > 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 controls > > the number of passes before the pageout daemon gives up and starts killing > > processes when it can't free up enough RAM. "out of swap space" messages > > 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 > > > -- > Bob Bishop t: +44 (0)118 940 1243 > rb at gid.co.uk m: +44 (0)783 626 4518 > > > > > > > >
On 6/26/20, Ronald Klop <ronald-lists at klop.ws> wrote:> > Van: Bob Bishop <rb at gid.co.uk> > Datum: vrijdag, 26 juni 2020 17:18 > Aan: Peter Jeremy <peter at rulingia.com> > CC: Donald Wilde <dwilde1 at gmail.com>, freebsd-stable > <freebsd-stable at freebsd.org> > Onderwerp: Re: swap space issues >> >> >> >> > On 26 Jun 2020, at 11:23, Peter Jeremy <peter at rulingia.com> wrote: >> > >> > On 2020-Jun-25 11:30:31 -0700, Donald Wilde <dwilde1 at gmail.com> 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 >> > the >> > partitions. >>Based on all recommendations on this thread (thanks, guys!), I've rebuilt my i3 mule with exactly one 16G partition, as it has only 'spinning rust' <haha> for a disk. My loader.conf has kern.maxswzone=4200000 and ccache is fully active and working for both root on tcsh and users on sh. I have yet to try synth again. I'm doing buildworld/buildkernel for 12-STABLE, but evidence so far is good. 'top -t' is actually happy, showing 16G (grog?), so I'll try firing up synth after another hour or so on the latest fetch of the ports tree. Happy coder, me! :D -- Don Wilde **************************************************** * What is the Internet of Things but a system * * of systems including humans? * **************************************************** -------------- next part -------------- # Device Mountpoint FStype Options Dump Pass# /dev/ada0s1a / ufs rw 1 1 /dev/ada0s1b none swap sw 0 0 /dev/ada0s1d /exp ufs rw 2 2 fdesc /dev/fd fdescfs rw 0 0 proc /proc procfs rw 0 0