Sourcegraph DocsSourcegraph Docs
  • Code Intelligence

    • Cody
    • Code Search
  • Code Management

    • Batch Changes
    • Code Navigation
    • Code Monitoring
    • Code Ownership
    • Code Insights
    • Notebooks
  • Platform

    • Sourcegraph Admin
    • Sourcegraph Cloud
    • Integrations
    • Development
  • CLI & API

    • Sourcegraph CLI
    • Sourcegraph GraphQL API
    • Sourcegraph Stream API
  • Help & Support

    • SLAs & Premium Support
    • Tutorials
    • Sourcegraph Accounts
    • Changelog
  1. Docs
  2. admin
  3. deploy
  4. instance-size

Instance Size

When sizing your Sourcegraph deployment, it is important to take into account the number of users and repositories in your environment. Below is our sizing chart with our sizing recommendations for different size environments.

Size chart

If you fall between two sizes, choose the larger of the two. For examples:

  1. If you have 8,000 users with 80,000 repositories, your instance size would be L.
  2. If you have 1,000 users with 80,000 repositories, your instance size would still be L.
XSSMLXL
UsersUp to 500Up to 1,000Up to 5,000Up to 10,000Up to 20,000
RepositoriesUp to 5,000Up to 10,000Up to 50,000Up to 100,000Up to 250,000
vCPU816324896
Memory (GB)3264128192384
SSD RequiredYesYesYesYesYes

Instance type

Single Node

We recommend the following instance type for the cloud providera listed below.

XSSMLXL
AWSm6a.2xlargem6a.4xlargem6a.8xlargem6a.12xlargem6a.24xlarge
AzureD8_v3D16_v3D32_v3D48_v3D64_v3
GCPn2-standard-8n2-standard-16n2-standard-32n2-standard-48n2-standard-96

Kubernetes

WARNING: If you intend to set this up as a production instance, we recommend you create the cluster in a VPC or other secure network that restricts unauthenticated access from the public Internet. You can later expose the necessary ports via an Internet Gateway or equivalent mechanism. Note that SG must expose port 443 for outbound traffic to codehosts and to enable telemetry with Sourcegraph.com. Additionally port 22 may be opened to enable git SSH cloning by Sourcegraph. Take care to secure your cluster in a manner that meets your organization's security requirements.

Follow the instructions linked in the table below to provision a Kubernetes cluster for the infrastructure provider of your choice, using the recommended node and list types in the table.

ProviderNode typeBoot/ephemeral disk size
Amazon EKS (better than plain EC2)m5.4xlarge100 GB (SSD preferred)
AWS EC2m5.4xlarge100 GB (SSD preferred)
Google Kubernetes Engine (GKE)n2-standard-16100 GB (default)
AzureD16 v3100 GB (SSD preferred)
Other16 vCPU, 60 GiB memory per node100 GB (SSD preferred)

NOTE: Sourcegraph can run on any Kubernetes cluster, so if your infrastructure provider is not listed, see the "Other" row. Pull requests to add rows for more infrastructure providers are welcome!

WARNING: If you are deploying on Azure, you must ensure that your cluster is created with support for CSI storage drivers. This can not be enabled after the fact.

Resources

Please refer to our resource estimator for more information regarding resources allocation for your Sourcegraph deployment.

On this page

  1. Instance Size

    1. Size chart
    1. Instance type
    1. Resources