Created on
08-30-2019
12:22 AM
Edited on
02-13-2025
06:09 AM
By
Jean-Philippe_P
Description
This article describes how to optimize memory consumption on low and middle-end models of FortiGate (smaller than 100D/E/F).
Every enabled feature on the FortiGate will consume some RAM memory. This may be critical, as the firewall may not have enough processing power for typical firewall tasks.
Scope
FortiGate appliances smaller than 100D/E/F.
Solution
config ips settings
config ips sensor
conf antivirus profile
conf antivirus settings
Adjust IPS process count:
config ips global
set engine-count 1
set cp-accel-mode none
set exclude-signatures none
end
config system autoupdate schedule
set frequency daily
set time 03:00
end
config log memory setting
set status disable
end
config log disk filter
set forward-traffic disable
end
Reducing the cache size is beneficial in environments where memory or performance optimization is a priority, as it ensures the DNS cache remains efficiently managed, preventing excessive resource consumption.
See the following article for more information on the above setting:
Technical Tip: Internet-service-database: On-demand
Advanced steps to optimize MEM utilization:
In addition to the steps above, it is possible to further optimize MEM consumption:
Attention:
Caution should be taken when using the following steps as they affect the overall behavior of the system. They will, therefore, require preliminary analysis, preferably by the TAC engineers.
conf firewall profile-protocol-options
set oversize limit
config system fortiguard
set webfilter cache-ttl 600 <--- The default value is 3600.
set antispam cache-ttl 600 <--- The default value is 1800.
end
config system dns
set dns cache-ttl 600 <--- The default value is 1800.
end
config system global
tcp halfopen-timer <- (And others.)
end
config system global
system session-ttl
9. Reduce session-TTL to improve session recycling efficiency:
config system session-ttl
set default 600
config port
edit 1
set protocol 17
set timeout 120
next
end
end
10. Adjust the IPS setting that affects memory consumption.
config ips global
set socket-size [integer, 0-512] <-----IPS socket buffer size. The max and default values depend on available memory. A lower value reduces memory usage.
set database [regular|extended] <----- Regular protects against the latest common and in-the-wild attacks. Extended includes protection from legacy attacks.
end
Note:
If the steps above do not produce satisfactory results, consider using a higher-capacity FortiGate.
Related articles:
Technical Tip: Free up memory to avoid conserve mode
Technical Note: Priority of session-ttl settings in FortiGate
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.