# Performance Tuning

Here are some settings for performance tuning your servers

## Max Requests

This setting limits how many requests will be passed through the Undertow listener to your app server.  It defaults to 8 times the number of CPU cores. Please note that your web server connector and Adobe ColdFusion or Lucee may also have their own max request settings.

```bash
server set web.maxRequests=100
```

Or as a global setting for all servers:

```bash
config set server.defaults.web.maxRequests=100
```

{% hint style="danger" %}
Max Requests can NOT be set on a per-site basis since this setting controls the size of Undertow's worker task pool.  You can, however, use the `request-limit( 10 )` handler in a server rule that applies only to a specific site.  Keep in mind, the maxRequests setting will still enforce an overall total running threads for all sites on a server.
{% endhint %}


---

# 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://commandbox.ortusbooks.com/embedded-server/configuring-your-server/performance-tuning.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.
