Start your Tuning

In this section we will be tuning some NGINX configuration parameters and reviewing the results. We will be using NGINX Instance Manager to make configuration changes and then pushing those changes to the NGINX Proxy.



  1. Log in to NGINX Instance Manager

Go to NGINX Intsance Manager –> ACCESS –> NIM WEB GUI

username: admin

pass: NIM123!@#

../../_images/nim-login.png

Click on the Instance Manager tile.


../../_images/nim-button.png


  1. Modify nginx.conf parameters
../../_images/nim-edit-button.png

Click on Instances in the left column and then the ellipsis on the far right of the NGINX-Plus-Proxy instance. Next, click Edit Config.



Now you can edit the NGINX configuration file through this NIM interface

../../_images/nim-nginx-conf.png


Find the line (3) that has worker_processes. When set to “auto” NGINX will spawn worker processes to match the number of CPU cores on the system. This system is configured with 2 CPU cores, so in this case, NGINX will spawn 2 worker processes.

Let’s change the value from auto to 1, reducing the number of worker processes in half.

../../_images/nim-processes-1.png


../../_images/nim-publish.png

Hit the publish button in the upper right to push the changes out to the NGINX Proxy



Now run another test and review the Locust Charts

../../_images/locus-10-100-30.png

Note

Are there any differences in Requests per Second, Response times or other stats from the previous test?



  1. Make another change to the nginx.conf, publish and test again

Find and change worker_connections to a value of 16 from 4096 (line 11)

../../_images/nim-worker-1.png

After changes, make sure to publish and run test again with same values.

Note

How did the performance change and What does worker_connections do?



  1. Revert changes to original settings and publish

worker_processes auto; (line 3)


worker_connections 4096; (line 11)