Simple Optimizations for macOS and iOS Build Agents
Unlock your iOS and macOS CI build hardware’s full potential with these simple, free, automatable optimizations.
Reliable, repeatable CI/CD is a primary goal of all DevOps teams, but decreasing the time it takes for these processes to complete is generally the driver for additional iterations on a pipeline. Increasing the size and power of your hardware is certainly a direct way to achieve that, but there are also simple optimizations that you can make to your existing infrastructure to improve performance without increasing your CI/CD cost.
This post will call out simple, high-value optimizations for Xcode build agents that fall into one of two classes – freeing up an agent’s available processing power, and ensuring that an agent is up and available when called upon to execute a given job. Each optimization will be executable from the command line, so as to make it simple to layer these commands into your existing automation.
Free up CPU in a macOS build agent
Spotlight is a system-wide desktop search feature built into macOS. While it is a handy tool for desktop use, it works by creating an index of all items and files on the system, which eats up processing power that could be better spent on executing jobs in a CI/CD pipeline. Disabling Spotlight will free up CPU by reducing the disk I/O required to execute this indexing.