High amount of swap space being used

asked 2016-09-16 12:40:54 -0600

ADarkDividedGem gravatar image

updated 2016-09-17 06:25:56 -0600

After installing OpenStack Mitaka via packstack --allinone on a server with 32 CPUs and 16GB or RAM I was surprised to find the OpenStack Dashboard sluggish. Running htop suggests that Memory and Swap space is being used heavily on the OpenStack server:

htop screenshot

Here it shows rabbitmq and mysql are using 16.8G and 16.6G of Virtual Memory which I assume is usually not something to worry about because the actual physical utilisation is low but it seems to be reducing the amount of memory other processes can use and its having to use swap space.

RabbitMQ is configured at its default vm_memory_high_watermark of 0.4 (40%) and vm_memory_limit of 6660407296 (6.6G). Meanwhile MariaDB has a key_buffer_size of 16777216 (16M) and innodb_buffer_pool_size of 134217728 (134M) so I have no idea why so much memory is being used by those two processes.

Any idea why the virtual memory is so high and why swap space is being used and how I can reduce it?

edit retag flag offensive close merge delete


the screenshot shows multiple neutron-server processes - probably 32 as 1 per cpu is the default. You should reduce this - I think it is api_workers in one of the neutron config files. The same goes for other services like nova-api etc. That should reduce you memory usage.

darragh-oreilly gravatar imagedarragh-oreilly ( 2016-09-17 06:08:24 -0600 )edit

The api_workers is indeed set to 32 but running ps -Al | grep neutron-server | wc -l returns 66. I can reduce the api_workers value but the memory increases over time so I am running ps aux --sort -rss every 10 minutes to monitor memory usage over time.

ADarkDividedGem gravatar imageADarkDividedGem ( 2016-09-17 07:34:23 -0600 )edit

forgot about rpc_workers - that would be other 32 processes.

darragh-oreilly gravatar imagedarragh-oreilly ( 2016-09-17 11:18:13 -0600 )edit