CorfedoCorfedoDocs

Sizing and search nodes

What search nodes and indexers keep on their volumes on Kubernetes, local NVMe disks on EKS and AKS, and how memory, copies and pools are sized with the Helm chart.

Indexes are stored in an S3-compatible bucket, see Object storage. The default memory limits are those of a development stack, so set them and the volume sizes for your index.

Search node volumes

The volume holds a cache of the index copies the node serves. A missing copy is downloaded from the bucket again, so the volume needs speed, not durability. Searches read what is not in memory from it, fastest from local NVMe disks.

The class and size of a pool's volumes can't change. To use others, add a pool.

Use local NVMe disks

Use nodes with NVMe instance store volumes, such as the I families or m8id, and bootstrap commands that format and mount the disks. This StorageClass creates no volumes, so run the Kubernetes local volume static provisioner to publish the mounted disks as filesystem volumes of the class. Without it the search pods stay Pending.

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: fast-disks
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: Delete
search:
  volume:
    storageClassName: fast-disks
    size: 800Gi
  maxDisk: 700Gi

A claim binds a whole disk of at least volume.size. After a node is replaced, delete the claim, such as data-corfedo-search-default-0, and the pod.

Indexer volumes

The volume holds the builds in progress and the pod's repository cache: a shallow copy of each repository the indexer built, so that a later build fetches only the difference.

The cache exists while indexer.repositoryCache.maxIdleHours is set, from 1 to 8760 hours. A pool's repositoryCache replaces the whole map.

Memory and disk budgets

Without a value, a budget follows the memory limit or the volume, as the table shows. Without a memory limit, set the memory budgets.

ValueBoundsWhen unset
search.maxMemoryThe memory a search node loads index copies into, less headroom for searches and compaction3/4 of the memory limit
search.maxDiskThe cache4/5 of the volume
indexer.maxBuildMemoryThe memory of the indexer.slots builds that run at once. A build that needs more fails.3/4 of the memory limit
indexer.repositoryCache.maxSizeThe repository cache1/2 of the volume
indexer.repositoryCache.minFreeDiskSpace the cache leaves free1/4 of the volume

Copies and search nodes

The chart runs two search nodes (search.replicas) and serves two copies of each repository, so a node restarts without a gap. The number of copies can't exceed the number of search nodes. To prefer capacity, serve one copy, and a repository cannot be searched while its node restarts and loads it again:

servingPolicy:
  replicaCount: 1

servingPolicy.retentionSeconds is how long a replaced build still answers reads that began on it.

Pools

A pool is a group of search nodes or indexers that are alike. The values under search and indexer are every pool's defaults, and a pool set to null is not created.

  • Search nodes: one pool per zone, named by zone and placed by nodeSelector. A repository's copies prefer different zones and share one when no other has a healthy node with room.
  • Indexers: one pool per node size.
search:
  updateStrategy:
    type: OnDelete
  pools:
    default: null
    zone-a:
      zone: eu-central-1a
      nodeSelector:
        topology.kubernetes.io/zone: eu-central-1a
    zone-b:
      zone: eu-central-1b
      nodeSelector:
        topology.kubernetes.io/zone: eu-central-1b

search.replicas counts per pool: these two run four search nodes with four claims unless a pool sets replicas.

Pools update independently, so two can stop nodes that hold copies of the same repository. Update one search pool at a time: with OnDelete, delete its pods, and with RollingUpdate, lower its rollingUpdate.partition, because a deleted pod below the partition returns at the old revision. Before the next pool, confirm with the serving-status operator command that copies serve again, because a pod can be Ready after failed loads.

On this page