Jira (FACT-3149) Reported memory usage is wrong on FreeBSD

4 views
Skip to first unread message

Romain Tartière

unread,
Sep 16, 2022, 6:25:03 PM9/16/22
to puppe...@googlegroups.com
Romain Tartière created an issue
 
Facter / Bug FACT-3149
Reported memory usage is wrong on FreeBSD
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2022/09/16 3:24 PM
Priority: Normal Normal
Reporter: Romain Tartière

On a FreeBSD system I see:

root@agrajag ~ # facter memory.system
{{{}}
  available => "155.02 MiB",
  available_bytes => 162549760,
  capacity => "96.08%",
  total => "3.87 GiB",
  total_bytes => 4150763520,
  used => "3.71 GiB",
  used_bytes => 3988213760
}

While this indicate the available memory being quite low, it is in reality not the case with just ~57% of the RAM being used:

root@agrajag ~ # sysctl vm.stats.vm.v_page_count vm.stats.vm.v_wire_count vm.stats.vm.v_active_count 
vm.stats.vm.v_page_count: 980446
vm.stats.vm.v_wire_count: 103938
vm.stats.vm.v_active_count: 432388

root@agrajag ~ # top -b 
last pid: 30691;  load averages:  1,22,  0,88,  0,80  up 15+21:38:11    12:15:02
119 processes: 2 running, 117 sleeping
CPU:  2,7% user,  0,0% nice,  1,0% system,  0,1% interrupt, 96,2% idle
Mem: 1751M Active, 834M Inact, 592M Laundry, 405M Wired, 148M Free

 

{{root@agrajag ~ # vmstat -H
procs     memory       page                      disks     faults       cpu
r b w     avm     fre  flt  re  pi  po    fr   sr da0 cd0   in   sy   cs us sy id
 0  0  0 48819820  176524   640   3   0   0   591  598   0   0   18  2224   871  3  1 96
}}

The facter code rely on the the `fre` field of the vmstat output which is the "size of the free list" of the system virtual memory and does not reflect the size of the available memory.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo

Morgan Rhodes (Jira)

unread,
Sep 20, 2022, 4:14:03 PM9/20/22
to puppe...@googlegroups.com

Morgan Rhodes (Jira)

unread,
Sep 20, 2022, 4:14:03 PM9/20/22
to puppe...@googlegroups.com
Morgan Rhodes updated an issue
Change By: Morgan Rhodes
Sprint: Phoenix 2022-09-28
Reply all
Reply to author
Forward
0 new messages