Sourcegraph can scale to accommodate large codebases and many users.
Increase resources according to the Scaling Overview per Service if you notice slower search or navigation.
Cluster resource guidelinesFor production environments, we recommend allocate resources based on your instance size. See our resource estimator for estimates.
Improving performance with a large number of repositoriesHere is a simplified list of the key parameters to tune when scaling Sourcegraph to many repositories:
sourcegraph-frontend
CPU/memory resource allocationssearcher
replica count and CPU/memory resource allocationsindexedSearch
replica count and CPU/memory resource allocationsgitserver
replica countgitMaxConcurrentClones
, because git clone
and git fetch
operations are IO and CPU-intensiverepoListUpdateInterval
(in minutes), because each interval triggers git fetch
operations for all repositoriesNotes:
gitserver
pods and they are rescheduled to other nodes, they may go offline briefly (showing a Multi-Attach
error). This is due to volume detach/reattach. Contact us for mitigation steps depending on your cloud provider.Here is a simplified list of key parameters to tune when scaling Sourcegraph to large monorepos:
sourcegraph-frontend
CPU/memory resource allocationssearcher
CPU/memory resource allocations (allocate enough memory to hold all non-binary files in your repositories)indexedSearch
CPU/memory resource allocations (for the zoekt-indexserver
pod, allocate enough memory to hold all non-binary files in your largest repository; for the zoekt-webserver
pod, allocate enough memory to hold ~2.7x the size of all non-binary files in your repositories)gitserver
CPU/memory resource allocations (allocate enough memory to hold your Git packed bare repositories)Many parts of Sourcegraph's infrastructure benefit from using SSDs for caches. This is especially important for search performance. By default, disk caches will use the Kubernetes hostPath and will be the same IO speed as the underlying node's disk. Even if the node's default disk is a SSD, however, it is likely network-mounted rather than local.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4