diff --git a/docs/user-guides/capacity-plannig.md b/docs/user-guides/capacity-plannig.md index 64d3cceb2a..c5d4e87cab 100644 --- a/docs/user-guides/capacity-plannig.md +++ b/docs/user-guides/capacity-plannig.md @@ -23,7 +23,7 @@ For example, if you want to insert 1 million vectors with 900 dimensions and the (900 × 32 + 256 ) × 1,000,000 × 3 = 8,7168,000,000 (bit) = 10.896 (GB) ``` -It is just the minimum required RAM. +It is just the minimum required RAM for indexing. Considering the margin of RAM capacity, the minimum RAM capacity should be less than 60% of the actual RAM capacity. Therefore, the actual minimum RAM capacity will be: @@ -32,12 +32,10 @@ Therefore, the actual minimum RAM capacity will be: ```
-Memory usage is not enough in the minimum required RAM.
-E.g., there is a noisy problem, high memory usage for createIndex, high traffic needs more memory, etc... -There may be A noisy neighbor problem, High memory usage, +In the production usage, memory usage may be not enough in the minimum required RAM.
+E.g., there are a noisy problem, high memory usage for createIndex (indexing on memory), high traffic needs more memory, etc.
- ## Kubernetes cluster view ### Pod priority & QoS @@ -91,7 +89,7 @@ The below table shows the condition for each QoS. | QoS | request CPU | request Memory | limit CPU | request Memory | Sup. | | :--------: | :-------------: | :------------: | :-------------: | :-------------: | :---------------------------------- | | Guaranteed | :o: | :o: | :o: | :o: | All settings are required. | -| Guaranteed | :o: (:warning:) | :o: (:warning) | :o: (:warning:) | :o: (:warning:) | One to three settings are required. | +| Burstable | :o: (:warning:) | :o: (:warning) | :o: (:warning:) | :o: (:warning:) | One to three settings are required. | | BestEffort | :x: | :x: | :x: | :x: | No setting is required. | Vald requires many RAM resources because of on-memory indexing, so we highly recommend that you do not specify a limit, especially for the Vald Agent. @@ -124,7 +122,47 @@ It is easy to change by editing the `values.yaml` file and applying it. Please take care of pod priority and QoS. -### Component view +### Node & Pod affinity + +Kubernetes scheduler often applies Pods on Node based on resource availability. + +In production usage, other components sometimes work on the Kubernetes cluster where the Vald cluster runs. +Depending on the situation, you may want to deploy to a different Node: e.g., when running a machine learning component that requires high memory on an independent Node. + +In this situation, we recommend you to set the affinity/anti-affinity configuration for each Vald component. +It is easy to change by editing your `values.yaml`. + +```yaml +# e.g. Agent's affinity settings +... + agent: + ... + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: [] + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: [] + podAffinity: + preferredDuringSchedulingIgnoredDuringExecution: [] + requiredDuringSchedulingIgnoredDuringExecution: [] + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + topologyKey: kubernetes.io/hostname + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - vald-agent-ngt + requiredDuringSchedulingIgnoredDuringExecution: [] + ... +``` + +For more information about Kubernetes affinity, please refer to [here](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) + +## Component view Depending on the customization of each component for each user, there are some points to be aware of.