GPT vs MBR for swap devices

Mark Millard marklmi at yahoo.com
Fri Jun 15 07:18:22 UTC 2018


# vmstat -c -w 5
procs  memory       page                    disks     faults         cpu
r b w  avm   fre   flt  re  pi  po    fr   sr da0 ad0   in    sy    cs us sy id
1 0 0 416M  224M  1647   1   0   0  1856  142   0   0  144  1791  1024  4  2 94
0 0 0 416M  224M     9   0   0   0     0    1   0   0    4    85   116  0  0 100
0 0 0 416M  224M    12   0   0   0     0    1   0   0    2    93   113  0  0 100
0 0 0 416M  224M     9   0   0   0     2    1   1   0    4    64   121  0  0 100


On 2018-Jun-14, at 10:15 PM, bob prohaska <fbsd at www.zefox.net> wrote:

> On Thu, Jun 14, 2018 at 10:00:59PM -0600, Warner Losh wrote:
>> 
>> I think that's because USB flash can't swap fast enough to keep up with the
>> page demand. You might be able to confirm this by looking at the write
>> rates to the swap portions for the various other media with gstat. 
> 
> I'll try capturing vmstat -c -w 5 to a file, but will need help 
> interpreting the results. It seems particularly hard to correlate
> vmstat output with corresponding compilation activity. 
> 
>> . . .

When I look at:

# vmstat -c -w 5
procs  memory       page                    disks     faults         cpu
r b w  avm   fre   flt  re  pi  po    fr   sr da0 ad0   in    sy    cs us sy id
1 0 0 416M  224M  1647   1   0   0  1856  142   0   0  144  1791  1024  4  2 94
0 0 0 416M  224M     9   0   0   0     0    1   0   0    4    85   116  0  0 100
0 0 0 416M  224M    12   0   0   0     0    1   0   0    2    93   113  0  0 100
0 0 0 416M  224M     9   0   0   0     2    1   1   0    4    64   121  0  0 100
. . .

and "man vmstat" I do not see any column that is the swap space
usage (nor any combination of columns to do such a calculation
from).

I do not expect that vmstat reports what you are likely/primarily
looking for.

An example is "avm" which for which the man page reports:

             . . . Note that the entire
             memory object's size is considered mapped even if only a subset
             of the object's pages are currently mapped.  This statistic is
             not related to the active page queue which is used to track real
             memory.

The free list size ("fre") is not sufficient either.


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)



More information about the freebsd-arm mailing list