swap space issues

classic Classic list List threaded Threaded
37 messages Options
12
Reply | Threaded
Open this post in threaded view
|

swap space issues

Don Wilde
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.

When using synth, it shows swap usage of < 2%, but then it gives the
'out of swap' complaint and tosses all my users out into neverland.

My /boot/loader.conf has:

   kern.maxproc=75000
   kern.maxswzone=17200000

   ... but those are no longer effective.

What has changed, and what do I need to do to rectify this?

--
Don Wilde
****************************************************
* What is the Internet of Things but a system *
* of systems including humans?                     *
****************************************************
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: swap space issues

Greg 'groggy' Lehey-3
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?

> When using synth, it shows swap usage of < 2%, but then it gives the
> 'out of swap' complaint and tosses all my users out into neverland.

Unless this also causes kernel messages to that effect, this, too,
could be an issue with synth.

Greg
--
Sent from my desktop computer.
Finger [hidden email] 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

signature.asc (169 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: swap space issues

Don Wilde
In reply to this post by Don Wilde
On 6/24/20, Donald Wilde <[hidden email]> 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.
>
> When using synth, it shows swap usage of < 2%, but then it gives the
> 'out of swap' complaint and tosses all my users out into neverland.
>
> My /boot/loader.conf has:
>
>    kern.maxproc=75000
>    kern.maxswzone=17200000
>
>    ... but those are no longer effective.
>
> What has changed, and what do I need to do to rectify this?

I thought I had it running well... 3 tasks and max 8 builders / task.
It was sitting at 0.0 - 1% swap. Perking right along. Looked away to
another bit of work and it has blyecch'd again.

Rebooted, starting it again. It does seem to start over from where it
crashed, which is good.

I'm not in any way saying that this is a bad tool, just trying to
figure out why it crashes even with all the resources I've given it.

Building math/openblas and devel/llvm90 simultaneously, so it's
obvious what put it over the top!

Sigh... barfed again, but at least this time it marked those as failed
and started on new ports. I guess if I keep repeating the process
it'll get through them all. :D

--
Don Wilde
****************************************************
* What is the Internet of Things but a system *
* of systems including humans?                     *
****************************************************
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: swap space issues

Don Wilde
In reply to this post by Greg 'groggy' Lehey-3
On 6/24/20, Greg 'groggy' Lehey <[hidden email]> 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!

pstat -shm:

/dev/ada0s1b  65536 (1M blocks), Used: 1.5G, Avail: 63G, Capacity: 2%

This is while synth is still running on openblas and openjdk8.

>> When using synth, it shows swap usage of < 2%, but then it gives the
>> 'out of swap' complaint and tosses all my users out into neverland.
>
> Unless this also causes kernel messages to that effect, this, too,
> could be an issue with synth.

I believe the messages about 'out of swap' were from the kernel as it
died, not synth. As I say, it killed all my active users, both root
and non-root.

Why does _top_ show the 7906M number? I suspect that it's deeper than
just synth.

What else can I share to help diagnose this?

>
> Greg
> --
> Sent from my desktop computer.
[snip]
--
Don Wilde
****************************************************
* What is the Internet of Things but a system *
* of systems including humans?                     *
****************************************************
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: swap space issues

Don Wilde
On 6/24/20, Donald Wilde <[hidden email]> wrote:

> On 6/24/20, Greg 'groggy' Lehey <[hidden email]> 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!
>
> pstat -shm:
>
> /dev/ada0s1b  65536 (1M blocks), Used: 1.5G, Avail: 63G, Capacity: 2%
>
> This is while synth is still running on openblas and openjdk8.
>
>>> When using synth, it shows swap usage of < 2%, but then it gives the
>>> 'out of swap' complaint and tosses all my users out into neverland.
>>
>> Unless this also causes kernel messages to that effect, this, too,
>> could be an issue with synth.
>
> I believe the messages about 'out of swap' were from the kernel as it
> died, not synth. As I say, it killed all my active users, both root
> and non-root.
>
> Why does _top_ show the 7906M number? I suspect that it's deeper than
> just synth.
>
> What else can I share to help diagnose this?

Let me try this: I can reduce kern.maxswzone to a number lower than 32G.

That won't _solve_ the underlying problem, but we can see if it
impacts both top and synth.

I just did portsnap fetch update and it came up with 300 patches, so
that should give us a good run!

[snip]

--
Don Wilde
****************************************************
* What is the Internet of Things but a system *
* of systems including humans?                     *
****************************************************
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: swap space issues

Greg 'groggy' Lehey-3
In reply to this post by Don Wilde
On Wednesday, 24 June 2020 at 18:51:04 -0700, Donald Wilde wrote:

> On 6/24/20, Greg 'groggy' Lehey <[hidden email]> 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)?

>>> When using synth, it shows swap usage of < 2%, but then it gives the
>>> 'out of swap' complaint and tosses all my users out into neverland.
>>
>> Unless this also causes kernel messages to that effect, this, too,
>> could be an issue with synth.
>
> I believe the messages about 'out of swap' were from the kernel as
> it died, not synth. As I say, it killed all my active users, both
> root and non-root.

Hmm.

> Why does _top_ show the 7906M number? I suspect that it's deeper
> than just synth.

If top counts swap in a form that overflows at 32 GB, 40 GB could show
up as 8 GB.

> 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?

FWIW, I've had a very large number of issues with -STABLE in recent
months, though not this one.  I should send a separate message.

Greg
--
Sent from my desktop computer.
Finger [hidden email] 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

signature.asc (169 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: swap space issues

Don Wilde
On 6/24/20, Greg 'groggy' Lehey <[hidden email]> wrote:

> On Wednesday, 24 June 2020 at 18:51:04 -0700, Donald Wilde wrote:
>> On 6/24/20, Greg 'groggy' Lehey <[hidden email]> 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

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

'top' now shows 4597M total swap.

>
>>>> When using synth, it shows swap usage of < 2%, but then it gives the
>>>> 'out of swap' complaint and tosses all my users out into neverland.
>>>
>>> Unless this also causes kernel messages to that effect, this, too,
>>> could be an issue with synth.
>>
>> I believe the messages about 'out of swap' were from the kernel as
>> it died, not synth. As I say, it killed all my active users, both
>> root and non-root.
Okay, I've now got data on that. It crashed again. :-\

First, the kernel killed init-spawned PIDs up into the 12000s: 'out of
swap space'.

Next, I get the following 5 times, boldface (this is console, not a GUI):

swblk zone ok
swap blk zone exhausted, increase kern.maxswzone

Back to normal font, the kernel killed four cron-job PIDs, 'out of swap space'

At this point, if I hit a <cr>, I get a login prompt.

>
> Hmm.
>
>> Why does _top_ show the 7906M number? I suspect that it's deeper
>> than just synth.
>
> If top counts swap in a form that overflows at 32 GB, 40 GB could show
> up as 8 GB.
>
>> 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.

This is an old Dell i3 laptop. It's really generic, picked
specifically as something I could use for Ubuntu or FreeBSD. Dell
SERVICE TAG is 5K8W162, but it's a generic i3 with 4G of RAM.

I'm developing a multi-server application for my cousin, so I'm using
this as a mule to work my way through some of the issues involved in
that project, from FreeBSD itself through NGINX and Lua, etc.
>
> FWIW, I've had a very large number of issues with -STABLE in recent
> months, though not this one.  I should send a separate message.
>
I guess I've been fortunate, then. Most of my issues have been with
re-learning FreeBSD. :D
--
Don Wilde
****************************************************
* What is the Internet of Things but a system *
* of systems including humans?                     *
****************************************************

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[hidden email]"

gpart_list.txt (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: swap space issues

Greg 'groggy' Lehey-3
On Wednesday, 24 June 2020 at 20:34:24 -0700, Donald Wilde wrote:

> On 6/24/20, Greg 'groggy' Lehey <[hidden email]> wrote:
>> On Wednesday, 24 June 2020 at 18:51:04 -0700, Donald Wilde wrote:
>>> On 6/24/20, Greg 'groggy' Lehey <[hidden email]> 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 [hidden email] 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

signature.asc (169 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: swap space issues

Kevin Oberman-4
On Wed, Jun 24, 2020 at 10:30 PM Greg 'groggy' Lehey <[hidden email]>
wrote:

> On Wednesday, 24 June 2020 at 20:34:24 -0700, Donald Wilde wrote:
> > On 6/24/20, Greg 'groggy' Lehey <[hidden email]> wrote:
> >> On Wednesday, 24 June 2020 at 18:51:04 -0700, Donald Wilde wrote:
> >>> On 6/24/20, Greg 'groggy' Lehey <[hidden email]> 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.
>
gpart(8) works just fine on MBR drives and partitions/slices and has a much
friendlier user interface. "gpart resize"  is the command you want.
--
Kevin Oberman, Part time kid herder and retired Network Engineer
E-mail: [hidden email]
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: swap space issues

Don Wilde
On 6/24/20, Kevin Oberman <[hidden email]> wrote:

> On Wed, Jun 24, 2020 at 10:30 PM Greg 'groggy' Lehey <[hidden email]>
> wrote:
>
>> On Wednesday, 24 June 2020 at 20:34:24 -0700, Donald Wilde wrote:
>> > On 6/24/20, Greg 'groggy' Lehey <[hidden email]> wrote:
>> >> On Wednesday, 24 June 2020 at 18:51:04 -0700, Donald Wilde wrote:
>> >>> On 6/24/20, Greg 'groggy' Lehey <[hidden email]> 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

I was continuing to reference it because its 'incorrect results' might
flag where we need to see things working. When 'top' shows the right
results, we've fixed the right thing.

>> 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.

Here's what I see immediately following shutdown -r and boot:

Device          1K-blocks     Used    Avail Capacity
/dev/ada0s1b     67108864        0 67108864     0%

>>
>> >>> 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.

Thanks again, Greg!

>>
> gpart(8) works just fine on MBR drives and partitions/slices and has a much
> friendlier user interface. "gpart resize"  is the command you want.
> --
> Kevin Oberman, Part time kid herder and retired Network Engineer

Thanks, Kevin! My laptop's BIOS is old enough that it balked when I
tried to boot from a GPT setup of 12.1R. One Of These Days I'll fix
that but the MBR works and I needed to move on.

We'll get there! :D
--
Don Wilde
****************************************************
* What is the Internet of Things but a system *
* of systems including humans?                     *
****************************************************
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: swap space issues

Kevin Oberman-4
On Thu, Jun 25, 2020 at 4:42 AM Donald Wilde <[hidden email]> wrote:

> On 6/24/20, Kevin Oberman <[hidden email]> wrote:
> > On Wed, Jun 24, 2020 at 10:30 PM Greg 'groggy' Lehey <[hidden email]>
> > wrote:
> >
> >> On Wednesday, 24 June 2020 at 20:34:24 -0700, Donald Wilde wrote:
> >> > On 6/24/20, Greg 'groggy' Lehey <[hidden email]> wrote:
> >> >> On Wednesday, 24 June 2020 at 18:51:04 -0700, Donald Wilde wrote:
> >> >>> On 6/24/20, Greg 'groggy' Lehey <[hidden email]> 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
>
> I was continuing to reference it because its 'incorrect results' might
> flag where we need to see things working. When 'top' shows the right
> results, we've fixed the right thing.
>
> >> 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.
>
> Here's what I see immediately following shutdown -r and boot:
>
> Device          1K-blocks     Used    Avail Capacity
> /dev/ada0s1b     67108864        0 67108864     0%
>
> >>
> >> >>> 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.
>
> Thanks again, Greg!
>
> >>
> > gpart(8) works just fine on MBR drives and partitions/slices and has a
> much
> > friendlier user interface. "gpart resize"  is the command you want.
> > --
> > Kevin Oberman, Part time kid herder and retired Network Engineer
>
> Thanks, Kevin! My laptop's BIOS is old enough that it balked when I
> tried to boot from a GPT setup of 12.1R. One Of These Days I'll fix
> that but the MBR works and I needed to move on.
>
> We'll get there! :D
>

I think a lot of people miss the point that the fact that gpart was written
primarily to provide support  GPT partitioning, it also supports MBR and
bsdlabel is really obsolete. gpart(8) supports 7 different partitioning
schemes including the old RAW scheme, GPT and MBR. I still have an MBR disk
on my near decade old laptop and I use gpart on it.
--
Kevin Oberman, Part time kid herder and retired Network Engineer
E-mail: [hidden email]
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: swap space issues

Don Wilde
On 6/25/20, Kevin Oberman <[hidden email]> wrote:

> On Thu, Jun 25, 2020 at 4:42 AM Donald Wilde <[hidden email]> wrote:
>
>> On 6/24/20, Kevin Oberman <[hidden email]> wrote:
>> > On Wed, Jun 24, 2020 at 10:30 PM Greg 'groggy' Lehey <[hidden email]>
>> > wrote:
>> >
>> >> On Wednesday, 24 June 2020 at 20:34:24 -0700, Donald Wilde wrote:
>> >> > On 6/24/20, Greg 'groggy' Lehey <[hidden email]> wrote:
>> >> >> On Wednesday, 24 June 2020 at 18:51:04 -0700, Donald Wilde wrote:
>> >> >>> On 6/24/20, Greg 'groggy' Lehey <[hidden email]> 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
>>
>> I was continuing to reference it because its 'incorrect results' might
>> flag where we need to see things working. When 'top' shows the right
>> results, we've fixed the right thing.
>>
>> >> 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.
>>
>> Here's what I see immediately following shutdown -r and boot:
>>
>> Device          1K-blocks     Used    Avail Capacity
>> /dev/ada0s1b     67108864        0 67108864     0%
>>
>> >>
>> >> >>> 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.
>>
>> Thanks again, Greg!
>>
>> >>
>> > gpart(8) works just fine on MBR drives and partitions/slices and has a
>> much
>> > friendlier user interface. "gpart resize"  is the command you want.
>> > --
>> > Kevin Oberman, Part time kid herder and retired Network Engineer
>>
>> Thanks, Kevin! My laptop's BIOS is old enough that it balked when I
>> tried to boot from a GPT setup of 12.1R. One Of These Days I'll fix
>> that but the MBR works and I needed to move on.
>>
>> We'll get there! :D
>>
>
> I think a lot of people miss the point that the fact that gpart was written
> primarily to provide support  GPT partitioning, it also supports MBR and
> bsdlabel is really obsolete. gpart(8) supports 7 different partitioning
> schemes including the old RAW scheme, GPT and MBR. I still have an MBR disk
> on my near decade old laptop and I use gpart on it.
I have been bouncing around between gpart and geom, seeking to
understand them better. The man page is... obtuse... but I'm
understanding more of it now. geom and gpart seem to be rather
self-referential. <wink>

Here's /etc/fstab:

# Device Mountpoint FStype Options Dump Pass#
/dev/ada0s1a / ufs rw 1 1
/dev/ada0s1b none swap sw 0 0
/dev/ada0s1d none swap sw 0 0
fdesc /dev/fd fdescfs rw 0 0
proc /proc procfs rw 0 0

Here's /boot/loader.conf:

security.bsd.allow_destructive_dtrace=0
loader_logo="beastie"
kern.maxproc=75000
kern.maxswzone=25600001

Attached is 'gpart list' output.

top is still not happy, but it now shows 11G.

I think I'm ready to try synth again. :D

I also think it's time for a new thread, because I still have one
niggling issue.

Thanks for all your help, guys! :D
[end thread]
--
Don Wilde
****************************************************
* What is the Internet of Things but a system *
* of systems including humans?                     *
****************************************************

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[hidden email]"

gpart_list.txt (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: swap space issues

Eugene Grosbein-10
In reply to this post by Don Wilde
25.06.2020 18:42, Donald Wilde wrote:

> Thanks, Kevin! My laptop's BIOS is old enough that it balked when I
> tried to boot from a GPT setup of 12.1R. One Of These Days I'll fix
> that but the MBR works and I needed to move on.
>
> We'll get there! :D

gpart is not for GPT, it is for "GEOM Partitioning".
gpart manages all kind of partitioning in FreeBSD,
including swap partitions.


_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: swap space issues

Paul Mather
In reply to this post by Don Wilde
On Jun 24, 2020, at 11:34 PM, Donald Wilde <[hidden email]> wrote:

> 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.
>
> This is an old Dell i3 laptop. It's really generic, picked
> specifically as something I could use for Ubuntu or FreeBSD. Dell
> SERVICE TAG is 5K8W162, but it's a generic i3 with 4G of RAM.


I think I've missed in this thread where you said which FreeBSD arch you are running: is it FreeBSD/amd64 or FreeBSD/i386?  (With an "old" machine, 4 GB RAM, and an install still using MBR, it could potentially be FreeBSD/i386.)

If it is FreeBSD/i386, there is a precedent for it having problems with configuring large amounts of swap.  However, it is usually related to having relatively little RAM, too (large amounts of swap space means the OS needs to use more RAM to keep track of it).

Cheers,

Paul.

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: swap space issues

Don Wilde
On 6/25/20, Paul Mather <[hidden email]> wrote:
> On Jun 24, 2020, at 11:34 PM, Donald Wilde <[hidden email]> wrote:
>
>
> I think I've missed in this thread where you said which FreeBSD arch you are
> running: is it FreeBSD/amd64 or FreeBSD/i386?  (With an "old" machine, 4 GB
> RAM, and an install still using MBR, it could potentially be FreeBSD/i386.)
>
Sorry, Paul. You're right, I didn't say. amd64. Here's 'uname -a'

FreeBSD Synergy000010 12.1-STABLE FreeBSD 12.1-STABLE r362500
LIBERTYSERVER  amd64

> If it is FreeBSD/i386, there is a precedent for it having problems with
> configuring large amounts of swap.  However, it is usually related to having
> relatively little RAM, too (large amounts of swap space means the OS needs
> to use more RAM to keep track of it).
>
That's good to know, Paul. I am once again doing embedded work, which
means I will be coding 32-bit ARM M7's soon enough.

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%





--
Don Wilde
****************************************************
* What is the Internet of Things but a system *
* of systems including humans?                     *
****************************************************
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: swap space issues

Eugene Grosbein-10
26.06.2020 1:30, 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%

"pstat -s" may also be invoked as "swapinfo" or better "swapinfo -h".


_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: swap space issues

Greg 'groggy' Lehey-3
On Friday, 26 June 2020 at  1:55:29 +0700, Eugene Grosbein wrote:

> 26.06.2020 1:30, 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%
>
> "pstat -s" may also be invoked as "swapinfo"
That's no shorter.

> or better "swapinfo -h".

"Better" is in the eye of the beholder.  I find -h extremely
irritating.

Greg
--
Sent from my desktop computer.
Finger [hidden email] 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

signature.asc (169 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: swap space issues

Greg 'groggy' Lehey-3
In reply to this post by Kevin Oberman-4
On Wednesday, 24 June 2020 at 23:27:27 -0700, Kevin Oberman wrote,
without trimming:

> On Wed, Jun 24, 2020 at 10:30 PM Greg 'groggy' Lehey <[hidden email]>
> wrote:
>
>> On Wednesday, 24 June 2020 at 20:34:24 -0700, Donald Wilde wrote:
>>> On 6/24/20, Greg 'groggy' Lehey <[hidden email]> wrote:
>>>> On Wednesday, 24 June 2020 at 18:51:04 -0700, Donald Wilde wrote:
>>>>> On 6/24/20, Greg 'groggy' Lehey <[hidden email]> wrote:
>>>>>> On Wednesday, 24 June 2020 at  9:36:23 -0700, Donald Wilde wrote:
>>>>>>> All,
...

This would be much more readable if you trimmed unrelated content.

>> 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.
>>
> gpart(8) works just fine on MBR drives and partitions/slices and has a much
> friendlier user interface. "gpart resize"  is the command you want.
Thanks.  I try to offer suggestions that I've tried, and offer an
example.  I haven't tried 'gpart resize', but it looks much easier.

Greg
--
Sent from my desktop computer.
Finger [hidden email] 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

signature.asc (169 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: swap space issues

Don Wilde
On 6/25/20, Greg 'groggy' Lehey <[hidden email]> wrote:

> On Wednesday, 24 June 2020 at 23:27:27 -0700, Kevin Oberman wrote,
> without trimming:
>
>> On Wed, Jun 24, 2020 at 10:30 PM Greg 'groggy' Lehey <[hidden email]>
>> wrote:
>
>> gpart(8) works just fine on MBR drives and partitions/slices and has a
>> much
>> friendlier user interface. "gpart resize"  is the command you want.
>
> Thanks.  I try to offer suggestions that I've tried, and offer an
> example.  I haven't tried 'gpart resize', but it looks much easier.
>
'gpart resize' did work well, although the man page for gpart assumes
way too much. I was able to successfully work my way through and
create ('gpart add') and mount not just one but two 32G swap
partitions.
--
Don Wilde
****************************************************
* What is the Internet of Things but a system *
* of systems including humans?                     *
****************************************************
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: swap space issues

Greg 'groggy' Lehey-3
On Thursday, 25 June 2020 at 19:31:34 -0700, Donald Wilde wrote:

> On 6/25/20, Greg 'groggy' Lehey <[hidden email]> wrote:
>> On Wednesday, 24 June 2020 at 23:27:27 -0700, Kevin Oberman wrote,
>> without trimming:
>>
>>> On Wed, Jun 24, 2020 at 10:30 PM Greg 'groggy' Lehey <[hidden email]>
>>> wrote:
>>
>>> gpart(8) works just fine on MBR drives and partitions/slices and
>>> has a much friendlier user interface. "gpart resize" is the
>>> command you want.
>>
>> Thanks.  I try to offer suggestions that I've tried, and offer an
>> example.  I haven't tried 'gpart resize', but it looks much easier.
>
> 'gpart resize' did work well,
Yes, I saw that from the gpart output you posted.

> although the man page for gpart assumes way too much. I was able to
> successfully work my way through and create ('gpart add') and mount
> not just one but two 32G swap partitions.

Yes, I saw that too.  Not quite what I was suggesting: I suspected
some overflow issue, so the partitions should really have been a
little shy of 32 GB.  And at least for the start you should only mount
one of them.  In the unlikely event that it should threaten to fill
up, you can still mount the other one without rebooting (swapon(1)).

How are things looking now?

Greg
--
Sent from my desktop computer.
Finger [hidden email] 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

signature.asc (169 bytes) Download Attachment
12