Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jun 2020 15:29:49 +1000
From:      Greg 'groggy' Lehey <grog@FreeBSD.org>
To:        Donald Wilde <dwilde1@gmail.com>
Cc:        freebsd-stable <freebsd-stable@freebsd.org>
Subject:   Re: swap space issues
Message-ID:  <20200625052949.GC10210@eureka.lemis.com>
In-Reply-To: <CAEC73938Wjb5MHvLW36PdoAy_nso-tSN51AhUYydC6qxY99pog@mail.gmail.com>
References:  <CAEC7391qs%2BA-jMpR1RyvR-BmnLyiksXHkQUjsGeePuEZJfMciw@mail.gmail.com> <20200625000410.GA10210@eureka.lemis.com> <CAEC7390VDxbYSY%2B4_fEaYxwdSPzbFWUVTdHw=vbAgq%2Bnmv09Vw@mail.gmail.com> <20200625025248.GB10210@eureka.lemis.com> <CAEC73938Wjb5MHvLW36PdoAy_nso-tSN51AhUYydC6qxY99pog@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--6zdv2QT/q3FMhpsV
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Wednesday, 24 June 2020 at 20:34:24 -0700, Donald Wilde wrote:
> On 6/24/20, Greg 'groggy' Lehey <grog@freebsd.org> wrote:
>> On Wednesday, 24 June 2020 at 18:51:04 -0700, Donald Wilde wrote:
>>> On 6/24/20, Greg 'groggy' Lehey <grog@freebsd.org> wrote:
>>>> On Wednesday, 24 June 2020 at  9:36:23 -0700, Donald Wilde wrote:
>>>>> All,
>>>>>
>>>>> I recently upgraded my 12-STABLE system to the latest, and now my
>>>>> swap subsystems aren't working. I deliberately set up a 40GB
>>>>> partition for swap, and when I do 'top -t' I am only seeing 7906M
>>>>> total.
>>>>
>>>> That looks suspiciously like the difference from 32 GB.  Could it be
>>>> numeric overflow?  And if so, where?  What does pstat -s say?
>>>
>>> Well, hi Greg! LTNT2!
>>
>> Indeed.
>>
>>> pstat -shm:
>>>
>>> /dev/ada0s1b  65536 (1M blocks), Used: 1.5G, Avail: 63G, Capacity: 2%
>>
>> Now that's really puzzling.  Why does it say 64 G when you said 40 G,
>> and the error from top tends to confirm it?  How big is the partition
>> (gpart output)?
>
> Attached 'gpart list' output

FWIW, gpart show would have done the job.  But what I see there is Yet
Another swap partition size, 66 GB.   So so far we have various parts
reporting 8 GB, 40 GB, 64 GB and 66 GB.

> Reduced kern.maxswzone to 9999999. Is it decimal or unlabeled hex?

It'll be decimal, but it refers to the number of swblk structures
assigned in memory, and after reading the code I'm still not 100% in
the clear how this relates to the size of swap, if at all.

> 'top' now shows 4597M total swap.

... and 4.6 GB.  5 different sizes.

You really shouldn't be relying on top for swap info.  It's a third
party program that demonstrably shows incorrect results (though I
believe that the maintainer would be very interested to know why and
to fix it).  But pstat -s (without any further options) should show
what the kernel thinks.

>>> What else can I share to help diagnose this?
>>
>> Background, maybe?  You say that you upgraded your system.  Did you
>> change the swap size when you did?  What were swap and RAM sizes
>> before and after?
>
> Meant that I upgraded from 12.1-RELEASE to 12-STABLE. When I
> configured the -RELEASE install, I manually messed with the MBR disk
> partitions. This is nominally a half-TB HDD which showed up as a total
> of 446 G available (IIRC, gpart should show it's actual size). I did
> auto partitioning, looked at the sizes, and manually set my partitions
> to give me 40G of swap instead of the auto-generated size of 4G.

That's really puzzling.  It seems that it gave you much more than you
asked for.

Try this in single user mode: modify the size of the swap partition to
30 GB.  I haven't used MBR partitions for years now, but I believe
that 'bsdlabel -e' will do the trick.  Just shorten the length of the
b partition.  You may need to 'mount -u /'.  If you do it right
(check!), this won't harm any of the other partitions: it'll just
leave 26 GB free between the swap partition and the next partition.

Greg
--
Sent from my desktop computer.
Finger grog@FreeBSD.org for PGP public key.
See complete headers for address and phone numbers.
This message is digitally signed.  If your Microsoft mail program
reports problems, please read http://lemis.com/broken-MUA

--6zdv2QT/q3FMhpsV
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iEYEARECAAYFAl70Nk0ACgkQIubykFB6QiOjDwCgsGC8glQIvy8Q8W12SnSidgXT
B94An2ByDZFPiujorOriW/e7BzvLqJan
=AcdP
-----END PGP SIGNATURE-----

--6zdv2QT/q3FMhpsV--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200625052949.GC10210>