Skip to content

Commit

Permalink
configuration: fix resource configuration (#1704)
Browse files Browse the repository at this point in the history
* fix resource configuration

* fix

* fix

* adjust the doc

* small fix

* small change
  • Loading branch information
xiaojingchen authored and lilin90 committed Aug 7, 2019
1 parent 79e2691 commit c334aee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Expand Up @@ -120,9 +120,11 @@ TiDB Operator 使用 Helm 部署和管理 TiDB 集群。通过 Helm 获取的配

## 资源配置说明

部署前需要根据实际情况和需求,为 TiDB 集群各个组件配置资源,上面列表中所述每个组件的资源配置包括 requests 和 limits,分别指资源的最低要求和最大限额,资源的 limits 要大于等于 requests,建议 limits 等于 requests,这样可以保证服务获得 Guaranteed 级别的 QoS
部署前需要根据实际情况和需求,为 TiDB 集群各个组件配置资源,其中 PD、TiKV、TiDB 是 TiDB 集群的核心服务组件,在生产环境下它们的资源配置还需要按组件要求指定,具体参考:[资源配置推荐](/how-to/deploy/hardware-recommendations.md)

其中 PD/TiKV/TiDB 是 TiDB 集群的核心服务组件,在生产环境下它们的资源配置需要按组件要求指定,具体参考:[资源配置推荐](/how-to/deploy/hardware-recommendations.md)。如果是测试环境,可以无需配置资源直接使用 `values.yaml` 中默认的配置。
为了保证 TiDB 集群的组件在 Kubernetes 中合理的调度和稳定的运行,建议为其设置 Guaranteed 级别的 QoS,通过在配置资源时让 limits 等于 requests 来实现, 具体参考:[配置 QoS](https://kubernetes.io/docs/tasks/configure-pod-container/quality-service-pod/)

如果使用 NUMA 架构的 CPU,为了获得更好的性能,需要在节点上开启 `Static` 的 CPU 管理策略。为了 TiDB 集群组件能独占相应的 CPU 资源,除了为其设置上述 Guaranteed 级别的 QoS 外,还需要保证 CPU 的配额必须是大于或等于 1 的整数。具体参考: [CPU 管理策略](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies)

## 容灾配置说明

Expand Down
@@ -1,7 +1,6 @@
---
title: Kubernetes 上的 TiDB 集群配置
category: reference
aliases: ['/docs-cn/v3.0/reference/configuration/tidb-in-kubernetes/cluster-configuration/']
---

# Kubernetes 上的 TiDB 集群配置
Expand Down Expand Up @@ -121,9 +120,11 @@ TiDB Operator 使用 Helm 部署和管理 TiDB 集群。通过 Helm 获取的配

## 资源配置说明

部署前需要根据实际情况和需求,为 TiDB 集群各个组件配置资源,上面列表中所述每个组件的资源配置包括 requests 和 limits,分别指资源的最低要求和最大限额,资源的 limits 要大于等于 requests,建议 limits 等于 requests,这样可以保证服务获得 Guaranteed 级别的 QoS
部署前需要根据实际情况和需求,为 TiDB 集群各个组件配置资源,其中 PD、TiKV、TiDB 是 TiDB 集群的核心服务组件,在生产环境下它们的资源配置还需要按组件要求指定,具体参考:[资源配置推荐](/how-to/deploy/hardware-recommendations.md)

其中 PD/TiKV/TiDB 是 TiDB 集群的核心服务组件,在生产环境下它们的资源配置需要按组件要求指定,具体参考:[资源配置推荐](/how-to/deploy/hardware-recommendations.md)。如果是测试环境,可以无需配置资源直接使用 `values.yaml` 中默认的配置。
为了保证 TiDB 集群的组件在 Kubernetes 中合理的调度和稳定的运行,建议为其设置 Guaranteed 级别的 QoS,通过在配置资源时让 limits 等于 requests 来实现, 具体参考:[配置 QoS](https://kubernetes.io/docs/tasks/configure-pod-container/quality-service-pod/)

如果使用 NUMA 架构的 CPU,为了获得更好的性能,需要在节点上开启 `Static` 的 CPU 管理策略。为了 TiDB 集群组件能独占相应的 CPU 资源,除了为其设置上述 Guaranteed 级别的 QoS 外,还需要保证 CPU 的配额必须是大于或等于 1 的整数。具体参考: [CPU 管理策略](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies)

## 容灾配置说明

Expand Down

0 comments on commit c334aee

Please sign in to comment.