SWAP usage is more common on Layer 7 gateway 10.1 than 9.x
search cancel

SWAP usage is more common on Layer 7 gateway 10.1 than 9.x


Article ID: 277202


Updated On:


CA API Gateway


Multiple customers reported concerns on swap usage on gateway 10.1


The inactive memory is swaped out only when the kernel cannot find enough free memory. But, depends on the setting, it can choose between reclaiming the buffers/cache memory, or swap out the inactive memory.


On appliance gateway 10.1, the swappiness is set to 60, which is the default swappiness value on most Linux distributions. But this value is quite agressive, ie. when there is no free memory, the kernel will intend to use swap rather than reclaim the buffers/cache.


On the other hand, from 10.1, the gateway set init heap size the same as max heap size which means the max heap memory is allocated when the gateway start up, this is for performance purpose, but if the heap is not fully used,  the gateway will occupy some memory which won't be used for long time -- that means there will be some inactive memory.

(you can check the gc log to see the heap usage)

(the gateway 9.x only set the max heap size, so the heap memory is allocated by time, which means there is no much inactive memory to swap out)


Base on above 2 reasons, the 10.1 will likely use more swap than 9.x.


This should not really impact the gateway (unless you really run out of memory), so you can just ignore it.

But if you don't like swap usage, you may set swappingness to 0,  then the kernel will try not to use swap, but reclaim buffers/cache -- actually this is recommended for most of database server.

To do so, run following command after login command console,

# sysctl vm.swappiness=0

To change it permenently, add one line in /etc/sysctl.conf



To show the current swappiness,

# sysctl vm.swappiness

Additional Information