Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Info

SonarQube Official Doc Link: Benchmark



Panel
borderColor#C3CCD7
bgColor#FCFCFC

Table of Contents

Table of Contents
indent16px


Context

다음은 대부분의 중간 규모의 조직에서 활용 가능한 공통적인 하드웨어 권장 사항입니다:

App ESXi Server Configuration

DB ESXi Server Configuration

  • 2 x Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz (32 VCPUs)
  • 128 GB RAM
  • 1.9 TB 용량의 저장장치 (300GB SAS 15K의 하드 8개로 구성된 RAID5)
  • 2 x 1 GB 테트워크 인터페이스 카드
  • ESXi 6.0
  • 2 x Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz (32 VCPUs)

  • 128GB RAM

  • 1.9 TB 용량의 저장장치 (300GB SAS 15K의 하드 8개로 구성된 RAID5)
  • 2 x 1 GB 테트워크 인터페이스 카드
  • ESXi 6.0


다음과 같은 2개의 가상버신(Virtual Machine, VM)을 생성해서 생성한 뒤, 1개의 VM은 SonarQube Server, 다른 1개의 VM은 두개의 ESXi 6.0 서버에서 SonarQube 데이터베이스로 사용합니다:

App VM Server Configuration

DB VM Server Configuration

  • 8 VCPUs
  • 16 GB RAM 
  • 20 GB storage for system + 200 GB storage for data (LVM) (RAID5 of 8 hard drives of 300GB SAS 15k)
  • 1 GB NIC
  • CentOS 7 64bits
  • 4 VCPUs
  • 8 GB RAM
  • 20 GB storage for system + 200 GB storage for data (LVM)
  • 1 GB NIC
  • CentOS 7 64bits

MySQL 5.6.27 (Oracle Community Edition)

Goals

목적

With SonarQube 5.2 + there is no longer Source Lines indexation done by the SearchServer, so quantity of code you are going to analyze will not affect the performance of the SearchServer.

By running this benchmark, we wanted to validate the number of Millions of Issues a given hardware hosting SonarQube can support. 

  • can SonarQube digest millions of Issues and how many time does it take ?
  • can we still use the UI of SonarQube with these millions of Issues into it ?

Results

Indexation Throughput

Issues Indexation done by the Search Server is not linear :

Millions of Issues

Indexation Time (in hours

이상의 경우, SearchServer가 소스 라인 인덱싱Source Line Indexation을 수행하지 않으므로, 소스 코드의 양이 많더라도 SearchServer의 성능이 저하되지 않습니다.

이 벤치마크를 통해, SonarQube를 호스팅하는 서버가 지원할 수 있는 수백만 개의 이슈를 검증하고자 합니다:

  • SonarQube가 수백만 개의 이슈를 처리할 수 있는지? 또는 처리하는 데 얼마나 많은 시간이 소요되는지?
  • 수백만 개의 이슈가 존재하는 경우에도 SonarQube UI를 정상적으로 사용할 수 있는지?

결과

인덱싱 처리량Indexation Throughput

SearchServer에 의한 이슈 인덱세이션 처리 시간은 이슈 수에 따라 리니어하게 증가하지 않습니다:

이슈 수(단위: 백만)

인덱싱 타임 (단위: 시간)

251
602-3
1006-7

SearchServer RAM

to Allocate to SearchServer

RAM to allocate to the SearchServer so to ElastSearch is linear according to the number of Issues :

Millions of Issues

SearchServer RAM in GB

할당

SearchServer, 즉 ElasticSearch에 할당하는 RAM 용량은 이슈 수에 따라 리니어하게 증가합니다:

이슈 수(단위: 백만)

SearchServer RAM(단위: GB)

254
607
10012

SearchServer's RAM can be configured in SearchServer에 할당하는 RAM 용량은 sonar.properties using : sonar파일에서 sonar.search.javaOpts

SearchServer’s RAM has to be more or less equal to : Size of ‘es' directory + 1 GB

CPU Allocation

With 속성을 통해 조절할 수 있습니다.

SearchServer에 할당하는 RAM 용량은 'es' 디렉토리 사이즈 + 1GB 이상이어야 합니다.

CPU 할당

SonarQube 5.2 +, the SearchServer is configured to use 5 버전 이상에서, SearchServer는 기본적으로 5개의 ElasticSearch Primary Shards. This allows SonarQube to handle by default 50 Millions of Issues on a server having at least 4 CPU Cores dedicated to the SearchServer.

Millions of Issues

# Shards

# Cores

를 사용하도록 설정되어 있습니다. 결과적으로 SonarQube는 4개의 CPU 코어를 전적으로 할당한 SearchServer를 사용해 5천 만개의 이슈를 처리할 수 있습니다.

이슈 슈(단위: 백만)

샤드 수

코어 수


 
5054default configuration기본 설정
3032 

Shards configuration must be adjusted according to the quantity of Issues you have to manage. The rule is to have 1 Shard by block of 10M Issues. So for 100M Issues, you need 10 Shards, so at least 9 Cores샤드 설정은 다루어야하는 이슈의 을 기반으로 조정되어야 합니다. 1개의 샤드 당 백만개의 이슈를 처리하는 것을 기준으로 합니다. 즉 1억 개의 이슈를 처리해야 한다면 10개의 샤드, 9개 이상의 코어를 할당해야 합니다.