# Server host requirements and recommendations

This section describes the general requirements and recommendations for the machine running SonarQube Server for the Community, Developer, and Enterprise Editions, in case of a ZIP, Docker, or Kubernetes installation. Additional requirements specific to an installation type may be mentioned in the respective installation section.

## Hardware requirements <a href="#hardware" id="hardware"></a>

In the table below:

* A small-scale installation is typically a Community Edition / Developer Edition installation that supports up to 1M lines of code.
* A large-scale installation is typically a single-node installation of Enterprise Edition that supports up to 50M lines of code.

{% hint style="info" %}
The requirements below should be considered a starting point for new installations. As usage patterns vary across installations, it is important that SonarQube instances are monitored for CPU, memory, and storage usage. Periodic adjustments may be necessary based on [Instance monitoring](/sonarqube-server/10.5/instance-administration/monitoring/instance.md).
{% endhint %}

| **Category** | **Requirement**                                                                                                                                                                                                                                             |
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| RAM          | <p>For a small-scale installation\*\*:\*\*</p><p>• 4GB of RAM</p><p>For a large-scale installation:</p><p>• 16 GB of RAM</p>                                                                                                                                |
| Processor    | <p>64-bit system.</p><p>For a small-scale installation:</p><p>• 2 cores</p><p>For a large-scale installation:</p><p>• 8 cores</p><p>In addition, for a server installation from a Docker image:</p><p>• amd64 architecture or arm64-based Apple Silicon</p> |
| Disk space   | <p>Depends on how much code you analyze with SonarQube.</p><p>For a small-scale installation:</p><p>• 30 GB</p>                                                                                                                                             |

{% hint style="warning" %}
SonarQube will not run on Linux hosts where FIPS (Federal Information Processing Standard) is enforced.
{% endhint %}

## Hardware configuration recommendations <a href="#hardware-recommendations" id="hardware-recommendations"></a>

[Elasticsearch](https://www.elastic.co/) is used by SonarQube in the background. To ensure good performance of your SonarQube, you need to follow these recommendations that are linked to Elasticsearch usage.

| **Category**          | **Recommendation**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Disk                  | <p>• Free disk space is an absolute requirement. Elasticsearch implements a safety mechanism to prevent the disk from being flooded with index data that locks all indices in read-only mode when a 95% disk usage watermark is reached.</p><p>• Disk access can easily become the bottleneck of Elasticsearch. If you can afford SSDs, they are by far superior to any spinning media. SSD-backed nodes see boosts in both query and indexing performance. If you use spinning media, try to obtain the fastest disks possible (high-performance server disks 15,000 RPM drives).</p><p>• Using RAID 0 is an effective way to increase disk speed, for both spinning disks and SSD. There is no need to use mirroring or parity variants of RAID because of Elasticsearch replicas and database primary storage.</p><p>• Do not use remote-mounted storage, such as NFS, SMB/CIFS, or network-attached storage (NAS). They are often slower, display larger latencies with a wider deviation in average latency, and are a single point of failure.</p><p>• You may put \<sonarqubeHome>/Data (where sonarqubeHome is the SonarQube installation directory; it is recommended to use /opt/sonarqube for this directory) into a separate partition to help alleviate the single point of failure mentioned above.</p> |
| RAM                   | <p>It is <a href="https://www.elastic.co/guide/en/elasticsearch/guide/current/heap-sizing.html#_give_less_than_half_your_memory_to_lucene">recommended</a> that you give 50% of the available memory to Elasticsearch heap while leaving the other 50% free. The reason is that Lucene (used by Elasticsearch) is designed to leverage the underlying OS for caching in-memory data structures.</p><p>• Don’t allocate more than 32GB.</p><p>See the following Elasticsearch articles for more details:</p><p>• Elasticsearch Guide: Heap Sizing</p><p>• A Heap of Trouble</p><p>• Elasticsearch Reference: JVM heap size</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| CPU                   | <p>If you need to choose between faster CPUs or more cores, then choose more cores. The extra concurrency that multiple cores offer will far outweigh a slightly faster clock speed.</p><p>By nature, data is distributed on multiple nodes, so execution time depends on the slowest node. It’s better to have multiple medium boxes than one fast and one slow.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| I/O scheduler for SSD | <p>If you use SSD, do not use the CFQ (Completely Fair Queuing) I/O scheduler (this is the defaul I/O scheduler under most Unix distributions). Use either the deadline or the NOOP scheduler instead.</p><p>When you write data to disk, the I/O Scheduler decides when that data is actually sent to the disk. The CFQ allocates "time slices" to each process, and then optimizes the delivery of these various queues to the disk. It is optimized for spinning media: the nature of rotating platters means it is more efficient to write data to disk based on physical layout. The deadline scheduler optimizes based on how long writes have been pending, while NOOP is just a simple FIFO queue.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Hard drives           | <p>They should have excellent read and write performance.</p><p>Most importantly, the "data" folder houses the Elasticsearch indices on which a huge amount of I/O will be done when the server is up and running. Read and write hard drive performance will therefore have a big impact on the overall SonarQube server performance.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |

## Software requirements <a href="#software-requirements" id="software-requirements"></a>

| **Category** | **Requirement**                                                                                                                                                                                                                                                                                                         |
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Web browser  | <p>• Microsoft Edge: latest version</p><p>• Mozilla Firefox: latest version</p><p>• Google Chrome: latest version</p><p>• Safari: latest version</p>                                                                                                                                                                    |
| Java         | <p>Applies only to a server installation from the ZIP file.</p><p>• Oracle JRE or OpenJDK</p><p>• Java version 17</p><p>• Recommendation: Use Java CPU (critical patch update) releases.</p><p>Note: SonarQube is able to analyze any kind of Java source files regardless of the version of Java they comply with.</p> |


---

# 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.sonarsource.com/sonarqube-server/10.5/setup-and-upgrade/installation-requirements/server-host.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.
