GPT vs MBR for swap devices

bob prohaska fbsd at
Wed Jun 13 18:37:19 UTC 2018

On Wed, Jun 13, 2018 at 10:09:20AM -0600, Warner Losh wrote:
>  The write speed
> is kinda crappy (maybe 50-60MB/s when streaming a file to them, and
> 20-3MB/s in a mixed workload).....

That does not seem horrible compared to a mechanical disk with its
seek delays. A brief web search suggests 4k random write speeds of
1-3 MB/s for mechanical disks more modern than the one I'm using.

Thus far experiements have included swap on microSD (works), swap on
mechanical disk (works), swap on USB flash (causes OOM kills even with 
< 20% swap utilization) and mixed USB flash, microSD flash and/or 
mechanical swap (causes OOM kills).

It seems odd that adding USB flash swap to either microSD or USB 
mechanical swap seems to make mischief. If a device is slow, I
thought the swapper would dis-favor or ignore it.

Some of the combinations trigger the warning:

warning: total configured swap (1048576 pages) exceeds maximum recommended amount (918256 pages).
warning: increase kern.maxswzone or reduce amount of swap.

which I've ignored, thinking the system will ignore excess swap space. Is 
this mistaken? It's pretty clear the system does not need more than about 
1.5 GB of swap. Available swap devices are presently sized like so:

3 GB mechanical disk
2 GB microSD flash
1 GB microSD flash
1 GB USB flash

The original plan was to use the two 1 GB flash partitions in the hope
they'd interleave, but that does not work at all. The microSD flash
swap seems to work fine. I was wondering if the USB mechanical swap
might point to trouble in the USB side of things, but it does not. 

Thanks for reading, 

bob prohaska

More information about the freebsd-arm mailing list