# System Tuning (macOS)

*This is an Optional Step.* This is not needed if you are using ZebraTester to create a script.

*Only to run local ZebraTester Load Tests properly* does Apica strongly recommend tuning the default network connections for your macOS system.

## macOS <a href="#macos" id="macos"></a>

The OS-settings for the maximum number of network connections per process are restricted by default to **256** on almost all macOS X versions.

This default value is too small to execute even small tests from macOS systems. It is also too small to monitor remotely executed cluster jobs executed on any other machines.

* You can verify your current value by entering the command "**ulimit -n**" from a terminal.

ZebraTester includes an automated script that helps set these defaults to allow proper ZebraTester loadtest executions. Locate this script in the ZebraTester Folderunder the MacTuning subFolder

## Automated Tuning of macOS <a href="#automated-tuning-of-macos" id="automated-tuning-of-macos"></a>

| **Step** | **Screenshot** |
| -------- | -------------- |

| **Step**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | **Screenshot**                                                                                                                                                                                                                                                                                                                                                                            |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <h4 id="locate-the-command-file">Locate the Command File:</h4><ul><li>In Finder, open <strong>ZebraTester</strong> Folder and <strong>MacTuning</strong> subfolder.</li><li>Double-Click the <strong>DoMacTuning.command</strong> script</li></ul>                                                                                                                                                                                                                                                                                                         | Open image-20210215-154949.png![](blob:https://apica-kb.atlassian.net/944177ce-9ae5-41cb-9783-01f94b6934fe#media-blob-url=true\&id=91f702ad-175f-4535-9d44-2b9f938ec0b7\&collection=contentId-4620836\&contextId=4620836\&mimeType=image%2Fpng\&name=image-20210215-154949.png\&size=148665\&width=1037\&height=416\&alt=)                                                                |
| **Review** the default (non-tuned) settings                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | <ul><li>Enter "<strong>ulimit -n</strong>". Typically you will see: 256</li><li>Enter "<strong>launchctl limit</strong>"</li><li><p>Typically, you will see:</p><ul><li>maxproc 709 1064</li><li>maxfiles 256 unlimited</li></ul></li></ul>                                                                                                                                               |
| <h4 id="execute-the-command-file">Execute the Command File:</h4><p>A terminal window appears.</p><ol start="1"><li>Press Return to continue</li><li>Enter the superuser password (sudo root password)</li><li>The settings are displayed with the new values. On this particular system, which has already been tuned, the values remain the same. These values will be set to smaller macOS defaults on systems that have never had ZT installed.</li><li><p>The tuning is complete.</p><ol start="1"><li>Reboot the system.</li></ol></li></ol><h4></h4> | <p>Open image-20201229-191406.png<img src="blob:https://apica-kb.atlassian.net/59d1d133-5409-4162-86bd-9418893440f3#media-blob-url=true&#x26;id=8086a47d-7137-4dc2-b01c-c69ea8087446&#x26;collection=contentId-4620836&#x26;contextId=4620836&#x26;mimeType=image%2Fpng&#x26;name=image-20201229-191406.png&#x26;size=70272&#x26;width=780&#x26;height=354&#x26;alt=" alt=""></p><p> </p> |
| <h4 id="verify-the-new-settings">Verify the New Settings</h4><ul><li>After the restart, open a terminal window and enter "<strong>ulimit -n</strong>" and "<strong>launchctl limit</strong>"</li></ul>                                                                                                                                                                                                                                                                                                                                                     | Open image-20201229-195848.png![](blob:https://apica-kb.atlassian.net/290a43a5-992a-46c1-aa33-8a549744ae7f#media-blob-url=true\&id=9fef98f0-c277-46a7-a68d-597ced478c18\&collection=contentId-4620836\&contextId=4620836\&mimeType=image%2Fpng\&name=image-20201229-195848.png\&size=29285\&width=200\&height=122\&alt=)                                                                  |

&#x20;

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.apica.io/platform-docs/zebratester-scripting/install-zebratester/macos-installation/system-tuning-macos.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
