Advanced: Performance Tuning

There are many things that can be done to make the OSM experience better. Here we’ll discuss ways to optimize the performance of OSM on Kubernetes.

General

In general, we recommend the following minimum System Requirements:

16GB RAM
100GB free disk space
2 cores

Create swapfile (optional)

Creating a swapfile is optional but highly recommended if the host machine doesn’t have any configured. You can check it by executing free -h.

To create a swap file execute the following commands, and replace by size of swap you want. The recommended size is the double of the actual memory of the machine.

sudo fallocate -l <swap-gb>G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo "/swapfile swap swap defaults 0 0" | sudo tee -a /etc/fstab
sudo swapon --show
free -h

microk8s

microstack

Enable KVM (recommended)

KVM is highly recommended to be installed prior to installing MicroStack, or virtual machines may not function.

sudo apt install cpu-checker -y
sudo modprobe kvm
kvm-ok

System Tuning (recommended)

OpenStack runs a lot of processes, and opens a lot of network connections. We recommend tweaking your system networking and virtualization defaults to accommodate this:

echo fs.inotify.max_queued_events=1048576 | sudo tee -a /etc/sysctl.conf
echo fs.inotify.max_user_instances=1048576 | sudo tee -a /etc/sysctl.conf
echo fs.inotify.max_user_watches=1048576 | sudo tee -a /etc/sysctl.conf
echo vm.max_map_count=262144 | sudo tee -a /etc/sysctl.conf
echo vm.swappiness=1 | sudo tee -a /etc/sysctl.conf
sudo sysctl -p