FD35192 MemoryUsageInsightsInFortiOS5 0
FD35192 MemoryUsageInsightsInFortiOS5 0
in FortiOS v5.0
Memory usage on the Fortigate is represented as a single gauge in the GUI or a counter in SNMP,
ranging from 0 to 100%.
Even though this counter is easy to read, it needs to be analyzed with deeper attention when
reaching high values as it is mixes multiple memory related indicators.
The 10% memory usage reported in this sample GUI widget (or get sys perf status) is a top-level
view of used physical memory.
“diag hard sys memory” gives further details about how the memory is allocated.
FortiOS applications, such as the UTM components, web and CLI based interfaces, run in the
user space (non-system area). Application memory usage can be viewed using
CPU [| ] 4.3%
Mem [|||| ] 10.0% 807M/7963M
Processes: 20 (running=1 sleeping=99)
This command shows the memory allocated for each process tree (parent and children), as
amount of memory held in RAM (RSS) and its ratio over the total memory (MEM%).
The kernel buffers are allocated for all system related tasks. These are mainly for network
buffers, filesystem structure buffers, and generic usage fixed-size buffers.
Kernel buffers are using a “slab” memory management mechanism, where each buffer has a
fixed size (1st column), that is adjusted to store the underlying kernel object.
The kernel can then allocate the number of buffer objects required to store the related object
type (3rd column).
In the above example, FortiOS has allocated 1152 buffers of 442 bytes each to store objects of
type 'tcp_session', which represents a total of 509184 bytes, or approximately 500kB.
This memory area is mainly used for disk I/O buffering. It caches program/ data files instead
of reloading them from the slow storage device.
Active memory is considered as busy memory. It contains data related to files that are
currently open.
Inactive memory is almost free memory, albeit accounted as “used”. It contains data that
are no longer being accessed by processes, such as recently closed files. FortiOS considers
it is judicious to keep this data held in RAM, so that if it needs to be accessed again, no time
is spent in accessing the storage device.
As long as the system is not under memory pressure, the inactive cache will slowly grow
over time if disk related features are enabled.
However, when memory usage reaches ~70%, the system will reclaim memory from the
inactive cache and stabilize at this level.
This memory area primary purpose is to allow fast passing of data between processes. Shared
memory blocks are owned by the process who allocated them, but they can be used by other
processes.
Shm is allocated/released on demand and is expected to vary along with the system load.
5. memory pattern
Monitoring memory usage of the Fortigate shows continuous evolution around an average
value throughout the day, with slow increases and sudden drops.
This typical pattern shape is related to FortiOS memory manager, who allocates memory
pages on demand (slow increase), and release them in groups (sudden drop).