Discussion:
[pve-devel] [PATCH manager] Raise the default pg_num to 128
Alwin Antreich
2018-11-28 09:26:39 UTC
Permalink
PGCalc and the ceph recommendation say 128 PGs for up to 5 OSDs

Signed-off-by: Alwin Antreich <***@proxmox.com>
---
PVE/API2/Ceph.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PVE/API2/Ceph.pm b/PVE/API2/Ceph.pm
index d74bd016..f5b3a859 100644
--- a/PVE/API2/Ceph.pm
+++ b/PVE/API2/Ceph.pm
@@ -1639,7 +1639,7 @@ __PACKAGE__->register_method ({
pg_num => {
description => "Number of placement groups.",
type => 'integer',
- default => 64,
+ default => 128,
optional => 1,
minimum => 8,
maximum => 32768,
@@ -1684,7 +1684,7 @@ __PACKAGE__->register_method ({
if !PVE::JSONSchema::parse_storage_id($pool);
}

- my $pg_num = $param->{pg_num} || 64;
+ my $pg_num = $param->{pg_num} || 128;
my $size = $param->{size} || 3;
my $min_size = $param->{min_size} || 2;
my $application = $param->{application} // 'rbd';
--
2.11.0
Alwin Antreich
2018-11-28 09:26:40 UTC
Permalink
Signed-off-by: Alwin Antreich <***@proxmox.com>
---
pveceph.adoc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pveceph.adoc b/pveceph.adoc
index 4132545..695af7e 100644
--- a/pveceph.adoc
+++ b/pveceph.adoc
@@ -284,10 +284,10 @@ A pool is a logical group for storing objects. It holds **P**lacement
**G**roups (PG), a collection of objects.

When no options are given, we set a
-default of **64 PGs**, a **size of 3 replicas** and a **min_size of 2 replicas**
+default of **128 PGs**, a **size of 3 replicas** and a **min_size of 2 replicas**
for serving objects in a degraded state.

-NOTE: The default number of PGs works for 2-6 disks. Ceph throws a
+NOTE: The default number of PGs works for 2-5 disks. Ceph throws a
"HEALTH_WARNING" if you have too few or too many PGs in your cluster.

It is advised to calculate the PG number depending on your setup, you can find
--
2.11.0
Thomas Lamprecht
2018-11-29 11:39:27 UTC
Permalink
Post by Alwin Antreich
PGCalc and the ceph recommendation say 128 PGs for up to 5 OSDs
missed the CephTools, CephFS and the WebUI ;)
So applied with followup..
Post by Alwin Antreich
---
PVE/API2/Ceph.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/PVE/API2/Ceph.pm b/PVE/API2/Ceph.pm
index d74bd016..f5b3a859 100644
--- a/PVE/API2/Ceph.pm
+++ b/PVE/API2/Ceph.pm
@@ -1639,7 +1639,7 @@ __PACKAGE__->register_method ({
pg_num => {
description => "Number of placement groups.",
type => 'integer',
- default => 64,
+ default => 128,
optional => 1,
minimum => 8,
maximum => 32768,
@@ -1684,7 +1684,7 @@ __PACKAGE__->register_method ({
if !PVE::JSONSchema::parse_storage_id($pool);
}
- my $pg_num = $param->{pg_num} || 64;
+ my $pg_num = $param->{pg_num} || 128;
my $size = $param->{size} || 3;
my $min_size = $param->{min_size} || 2;
my $application = $param->{application} // 'rbd';
Loading...