GPT vs MBR for swap devices

Mark Millard marklmi at
Fri Jun 15 03:21:19 UTC 2018

bob prohaska fbsd at wrote on
Thu Jun 14 17:56:10 UTC 2018 :

> On Thu, Jun 14, 2018 at 09:53:57AM -0700, Rodney W. Grimes wrote:
> > 
> > I would be very interested in seeing if resizing the swap partition
> > in the example that greatly exceeds what the system expects as a
> > max total swap helps to bring the OOM issue under control.
> >
> The swap partitions at my immediate disposal are
> 1 GB USB flash
> 1 GB microSD flash
> 2 GB microSD flash
> 3 GB USB mechanical
> What combination is apt to be most informative? My original intent
> was to use 1 GB USB flash plus 1 GB microSD flash in hopes of a speed
> gain from interleaving, but maybe that's no longer realistic. Anything
> over 3 GB total causes the "too much swap" warning and I've never observed
> more than about 1.2 GB of swap in use.

1.2 GB of swap in-use lets out testing just the USB flash unless
one with a larger swap partition were available. Similarly for
the 1 GB microSD flash.

My prior suggestion could be implemented for the other two by
temporarily resizing the 3 GB swap partition to be just 2 GB
and then to try "USB mechanical" by itself for comparison to
the 2GB swap-partition microSD flash by itself.

This does overlap with the Rodney G.'s request for tests that
avoid getting the too-much-swap-space warnings and so might
well cover both directions of investigation if I interpret
Rodney's suggestion correctly.

As for use of multiple swap partitions and which are actually
used, I think the swapinfo command during the time of heavy
use (by size used) should indicate how much is in use for each
partition: it has a "used" field in the output.

# swapinfo -m
Device          1M-blocks     Used    Avail Capacity
/dev/gpt/FBSDUSSDswap     15360       19    15340     0%

(The context has only one swap partition but the above
does show the "used" being about 19 MBytes.)

Mark Millard
marklmi at
( went
away in early 2018-Mar)

More information about the freebsd-arm mailing list