Skip to content

Commit 15e3ee7

Browse files
committed
fix(rabbitmq): right-size the default preset to s1.nano
Review asked to either report the peak memory that motivates a 1Gi default or right-size it. The observed working set peaked at 125.8Mi against the 128Mi t1.nano ceiling, so a default-sized broker sits at 98% of its limit in steady state and cgroup accounting crosses it under load. s1.nano is 250m CPU / 512Mi: the same CPU as t1.nano, four times the memory. That is a 4x margin over the observed peak instead of the 8x u1.nano reserved, and it leaves the CPU reservation unchanged.
1 parent d5ff93b commit 15e3ee7

6 files changed

Lines changed: 10 additions & 10 deletions

File tree

‎api/apps/v1alpha1/rabbitmq/types.go‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/apps/rabbitmq/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The service utilizes official RabbitMQ operator. This ensures the reliability an
2121
| `resources` | Explicit CPU and memory configuration for each RabbitMQ replica. When omitted, the preset defined in `resourcesPreset` is applied. | `object` | `{}` |
2222
| `resources.cpu` | CPU available to each replica. | `quantity` | `""` |
2323
| `resources.memory` | Memory (RAM) available to each replica. | `quantity` | `""` |
24-
| `resourcesPreset` | Default sizing preset used when `resources` is omitted. | `string` | `u1.nano` |
24+
| `resourcesPreset` | Default sizing preset used when `resources` is omitted. | `string` | `s1.nano` |
2525
| `size` | Persistent Volume Claim size available for application data. | `quantity` | `10Gi` |
2626
| `storageClass` | StorageClass used to store the data. | `string` | `""` |
2727
| `external` | Enable external access from outside the cluster. | `bool` | `false` |
@@ -56,4 +56,4 @@ resources:
5656
`resourcesPreset` sets named CPU and memory configurations for each replica.
5757
This setting is ignored if the corresponding `resources` value is set.
5858

59-
The default `u1.nano` preset supplies 250m CPU and 1Gi of memory per replica. See the [resource preset matrix](../../../docs/operations/resource-presets.md) for all instance types and legacy-name compatibility.
59+
The default `s1.nano` preset supplies 250m CPU and 512Mi of memory per replica. See the [resource preset matrix](../../../docs/operations/resource-presets.md) for all instance types and legacy-name compatibility.

‎packages/apps/rabbitmq/tests/resources_test.yaml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ templates:
44
- templates/rabbitmq.yaml
55

66
tests:
7-
- it: defaults each RabbitMQ replica to the u1.nano preset
7+
- it: defaults each RabbitMQ replica to the s1.nano preset
88
release:
99
name: rabbitmq-test
1010
namespace: tenant-test
@@ -14,13 +14,13 @@ tests:
1414
value: 250m
1515
- equal:
1616
path: spec.resources.limits.memory
17-
value: 1Gi
17+
value: 512Mi
1818
- equal:
1919
path: spec.resources.requests.cpu
2020
value: "0.025"
2121
- equal:
2222
path: spec.resources.requests.memory
23-
value: "1073741824"
23+
value: "536870912"
2424

2525
- it: preserves t1.nano as an explicit backward-compatible override
2626
release:

‎packages/apps/rabbitmq/values.schema.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"resourcesPreset": {
4444
"description": "Default sizing preset used when `resources` is omitted.",
4545
"type": "string",
46-
"default": "u1.nano",
46+
"default": "s1.nano",
4747
"enum": [
4848
"t1.nano",
4949
"t1.micro",

‎packages/apps/rabbitmq/values.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ replicas: 3
6161
## @param {Resources} [resources] - Explicit CPU and memory configuration for each RabbitMQ replica. When omitted, the preset defined in `resourcesPreset` is applied.
6262
resources: {}
6363

64-
## @param {ResourcesPreset} resourcesPreset="u1.nano" - Default sizing preset used when `resources` is omitted.
65-
resourcesPreset: "u1.nano"
64+
## @param {ResourcesPreset} resourcesPreset="s1.nano" - Default sizing preset used when `resources` is omitted.
65+
resourcesPreset: "s1.nano"
6666

6767
## @param {quantity} size - Persistent Volume Claim size available for application data.
6868
size: 10Gi

‎packages/system/rabbitmq-rd/cozyrds/rabbitmq.yaml‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)