Translated message

A translation of this page exists in English.

Ceph:如何在 Ceph 集群中增加 PG 数

Solution In Progress - Updated -

Issue

备注:

  • 这是在 Ceph 集群上执行的最密集的操作,如果不以缓慢且有条不紊的方式执行,可能会对性能产生重大影响。
  • 一旦数据为一组 Placement Groups (PGs) 开始移动(在增加 pgp_num 部分),相关过程将无法停止或撤销,必须允许其完成。
  • 建议在非业务高峰时段执行此过程,并提醒所有客户端可能会受到性能影响。

概述:

拥有正确的 PG 数是确保 Ceph 集群获得顶级性能和最佳数据分布的关键。

  • 应使用 Ceph PG calc 工具以确定最佳值。
  • 应小心谨慎,将每个 OSD 的 PG 比例保持在 100 到 200 个之间,如 Ceph PG calc 工具中所述。
    • 当前每个 OSD 的 PG 数可以在 ceph osd df tree 命令的 PGS 列中查看。
  • 如果您希望通过增加 OSD 来扩展集群(这导致每个 OSD 的 PG 数下降接近于 100 或低于 100),或者初始的 PG 数量规划不当时,才需要增加 PG 数量。
  • 由于此操作影响较大,应仔细规划。如果需要增加 PG 数量,需要将数量增加到能够满足在可预见的未来内任何可能的集群扩展。

Environment

所有版本的 Red Hat Ceph Storage

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content