New Content #13941

Updated by Marcos M 4 months ago

Questions frequently come up regarding memory usage in pfSense software. A doc on about the subject could mention notes/quirks/etc. regarding in regards to pfSense specifically, rather than only defining terms. Examples below. 

 How does ZFS ARC affect the firewall? The note in the 23.01 release notes could be included in this doc. 
 * On systems using ZFS, the first boot post-upgrade will appear to have higher than normal memory usage due to the large volume of filesystem activity that takes place during the upgrade process. This is harmless, however. This is due to ZFS arc memory usage, which it will yield as needed if other processes require more memory. Rebooting the firewall after the upgrade completes will return the reported memory usage to a normal level. 
 * Wired is non-swappable memory (zfs arc, buffer cache, process tables, etc). Userland can also wire memory with mlock (database index uses for example). For a small memory systems, it may be beneficial to define a size for @vfs.zfs.arc_max@ since it can otherwise use up to half the RAM which instead could be used for daemons, routing, and firewall states. 

 Some systems show @Laundry@ memory and others don't. What is the significance of this from pfSense's perspective? 
 # system 1 
 last pid: 56922;    load averages:    2.12,    2.99,    1.80                                              up 0+02:31:40    13:47:08 
 610 threads:     3 running, 561 sleeping, 8 zombie, 38 waiting 
 CPU:    0.2% user,    0.0% nice,    0.6% system,    0.6% interrupt, 98.6% idle 
 Mem: 23M Active, 4096B Inact, 133M Laundry, 262M Wired, 372K Buf, 2032K Free 
 ARC: 35M Total, 17M MFU, 14M MRU, 164K Anon, 301K Header, 3543K Other 
      6349K Compressed, 25M Uncompressed, 4.00:1 Ratio 
 Swap: 2048M Total, 2043M Used, 4588K Free, 99% Inuse, 92K In, 8192B Out 

 #system 2 
 last pid: 79940;    load averages:    0.29,    0.36,    0.32                                              up 1+01:47:10    18:08:37 
 449 threads:     5 running, 392 sleeping, 52 waiting 
 CPU:    4.2% user,    0.0% nice,    2.6% system,    0.0% interrupt, 93.1% idle 
 Mem: 583M Active, 2512M Inact, 2022M Wired, 40K Buf, 2761M Free 
 ARC: 1391M Total, 229M MFU, 1077M MRU, 1180K Anon, 13M Header, 70M Other 
      1212M Compressed, 2763M Uncompressed, 2.28:1 Ratio 
 Swap: 1024M Total, 1024M Free