RPI3 swap experiments ["was killed: out of swap space" with: "v_free_count: 5439, v_inactive_count: 1"]

Mark Millard marklmi at yahoo.com
Fri Aug 3 07:02:26 UTC 2018


On 2018-Aug-2, at 5:34 PM, Jamie Landeg-Jones <jamie at catflap.org> wrote:

> I've now added the log for vm stats for the failure with the usb 3.0 32 gb drive as swap. (3 partitions of 1GB) :
> 
> 15 minute output of swapinfo, gstat -abd -I 10s, sysctl vm, and syslog up to the fail at:
> 
> http://catflap.org/jamie/rpi3/


Your examples seem to have the structure of not having
much Inactive memory but having lots of swap space
and then ending up trying to page out the Inactive
memory until only 1 page is left --and then killing
a process despite lots of swap space being available.

Mem: 564M Active, 2M Inact, 68M Laundry, 162M Wired, 97M Buf, 104M Free
Device          1K-blocks     Used    Avail Capacity
/dev/mmcsd0s3b    4194304    78204  4116100     2%
then:
syslog: Aug  2 10:39:57 tiffany kernel: v_free_count: 3221, v_inactive_count: 1
syslog: Aug  2 10:39:59 tiffany kernel: pid 30593 (c++), uid 0, was killed: out of swap space

and . . .

Mem: 435M Active, 18M Inact, 81M Laundry, 167M Wired, 97M Buf, 198M Free
Device          1K-blocks     Used    Avail Capacity
. . .
Total             3145728   182216  2963512     6%
then:
syslog: Aug  3 01:04:39 tiffany kernel: v_free_count: 2777, v_inactive_count: 1
syslog: Aug  3 01:04:42 tiffany kernel: pid 31130 (c++), uid 0, was killed: out of swap space
syslog: Aug  3 01:04:42 tiffany kernel: v_free_count: 2775, v_inactive_count: 1
syslog: Aug  3 01:04:42 tiffany kernel: pid 31225 (c++), uid 0, was killed: out of swap space


If Inact+Laundry+Buf(?)+Free was not enough to provide sufficient
additional RAM, I'd would have guessed that some Active Real Memory
should then have been paged/swapped out and so RAM would be made
available. (This requires the system to have left itself sufficient
room in RAM for that guessed activity.)

But I'm no expert at the intent or actual operation.

Bob P.'s reports (for having sufficient swap space)
also indicate the likes of:

v_free_count: 5439, v_inactive_count: 1


So all the examples have: "v_inactive_count: 1".
(So: vmd->vmd_pagequeues[PQ_INACTIVE].pq_cnt==1 )


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



More information about the freebsd-arm mailing list