Skip to content

Commit

Permalink
📝 add affinity section
Browse files Browse the repository at this point in the history
Signed-off-by: vankichi <[email protected]>
  • Loading branch information
vankichi committed Jul 8, 2022
1 parent e54b555 commit 1a7964d
Showing 1 changed file with 45 additions and 7 deletions.
52 changes: 45 additions & 7 deletions docs/user-guides/capacity-plannig.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -32,12 +32,10 @@ Therefore, the actual minimum RAM capacity will be:
```
<div class="warn">
Memory usage is not enough in the minimum required RAM.<BR>
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.<BR>
E.g., there are a noisy problem, high memory usage for createIndex (indexing on memory), high traffic needs more memory, etc.
</div>
## Kubernetes cluster view
### Pod priority & QoS
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
</div>
### 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.
Expand Down

0 comments on commit 1a7964d

Please sign in to comment.