Zack McCauley - WardsParadox

Hi, I’m a macadmin for a school district in Montana. Never stop learning.

Faster Munki Downloads from Nginx

2018-01-29

Through multiple issues over the last month or so, I decided to completely rebuild my Munki server. This server is semi-critical in our district as all configurations are now sent out via Munki. As I was waiting for Ubuntu 16 to install and do some base configurations, I started looking for some guides on how to increase performance. I stumbled across worker_cpu_affinity.

This can be a bit dangerous to mess with, and shouldn't have to be messed with, at least from a couple topics on it. I'm not sure if Nginx was being correctly assigned, but I decided to try and associate the worker processes with specific cores. My Nginx config (/etc/nginx/nginx.conf) has these two lines in the outermost section of the config file. Since making this change, both Munki and MunkiReport have had huge increases in performance.

worker_processes    4;
worker_cpu_affinity 0001 0010 0100 1000;

With this performance increase, I have seen our Munki client timeout's drop to single digit percentages of what we had before. I've also seen just how fast things download. For example, the MS Office 2016 Pkg installer is approx 2 GB in size. When doing a few machines out at a couple of schools, this would normally take 5-10 minutes to download a piece. I have now seen that download take under 2 minutes for all machines. I'm glad this was able to help us, and maybe it will help you.