Skip to content

Commit f5ab9eb

Browse files
Fixes #2293
1 parent cda5c98 commit f5ab9eb

File tree

3 files changed

+36
-18
lines changed

3 files changed

+36
-18
lines changed

docs/runtime.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,19 @@ This can be compared to a factory with multiple conveyor belts. When one belt ru
121121
it can be stopped. However, once more work is there for it to do, restarting it will take time.
122122
Alternatively the conveyor can be speculatively kept running for a period of time.
123123

124-
By default, RabbitMQ nodes configure runtime schedulers to speculatively wait for a short period
125-
of time before going to sleep. Workloads where there can be prolonged periods of inactivity
126-
can choose to turn off this speculative busy waiting using the [`+sbwt` and related runtime flags](https://erlang.org/doc/man/erl.html):
124+
By default, RabbitMQ nodes configure runtime schedulers to disable the speculatively waiting.
125+
This benefits the workloads where there can be periods of inactivity on a given connection,
126+
channel, session, queue or stream replica.
127+
128+
Speculative busy waiting is controlled using the [`+sbwt` and related runtime flags](https://erlang.org/doc/man/erl.html):
127129

128130
```bash
131+
# This is the default used by modern RabbitMQ versions: it disables speculative
132+
# busy waiting.
129133
RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS="+sbwt none +sbwtdcpu none +sbwtdio none"
130134
```
131135

132-
This can also reduce CPU usage on systems with limited or burstable CPU resources.
136+
Disabled speculative waiting reduces CPU usage on systems with limited or burstable CPU resources.
133137

134138
In order to determine how much time schedulers spend in busy wait, consult [thread activity metrics](#thread-stats).
135139
Busy waiting will usually be accounted as system time in the output of tools such as `top` and `pidstat`.
@@ -189,13 +193,15 @@ is spent. This is a critically important step for making informed decisions.
189193

190194
#### Turn off Speculative Scheduler Busy Waiting
191195

192-
Turn off speculative [scheduler busy waiting](#busy-waiting) using the [`+sbwt` and related runtime flags](https://erlang.org/doc/man/erl.html):
196+
If speculative [scheduler busy waiting](#busy-waiting) is customized,
197+
disable it using the [`+sbwt` and related runtime flags](https://erlang.org/doc/man/erl.html):
193198

194199
```bash
200+
# This is the default used by modern RabbitMQ versions: it disables speculative
201+
# busy waiting.
195202
RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS="+sbwt none +sbwtdcpu none +sbwtdio none"
196203
```
197204

198-
Speculative busy waiting is usually not productive on moderately loaded systems.
199205

200206
#### Reduce Statistics Emission Frequency (Increase the Statistics Emission Interval)
201207

versioned_docs/version-4.0/runtime.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,19 @@ This can be compared to a factory with multiple conveyor belts. When one belt ru
121121
it can be stopped. However, once more work is there for it to do, restarting it will take time.
122122
Alternatively the conveyor can be speculatively kept running for a period of time.
123123

124-
By default, RabbitMQ nodes configure runtime schedulers to speculatively wait for a short period
125-
of time before going to sleep. Workloads where there can be prolonged periods of inactivity
126-
can choose to turn off this speculative busy waiting using the [`+sbwt` and related runtime flags](https://erlang.org/doc/man/erl.html):
124+
By default, RabbitMQ nodes configure runtime schedulers to disable the speculatively waiting.
125+
This benefits the workloads where there can be periods of inactivity on a given connection,
126+
channel, session, queue or stream replica.
127+
128+
Speculative busy waiting is controlled using the [`+sbwt` and related runtime flags](https://erlang.org/doc/man/erl.html):
127129

128130
```bash
131+
# This is the default used by modern RabbitMQ versions: it disables speculative
132+
# busy waiting.
129133
RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS="+sbwt none +sbwtdcpu none +sbwtdio none"
130134
```
131135

132-
This can also reduce CPU usage on systems with limited or burstable CPU resources.
136+
Disabled speculative waiting reduces CPU usage on systems with limited or burstable CPU resources.
133137

134138
In order to determine how much time schedulers spend in busy wait, consult [thread activity metrics](#thread-stats).
135139
Busy waiting will usually be accounted as system time in the output of tools such as `top` and `pidstat`.
@@ -189,13 +193,15 @@ is spent. This is a critically important step for making informed decisions.
189193

190194
#### Turn off Speculative Scheduler Busy Waiting
191195

192-
Turn off speculative [scheduler busy waiting](#busy-waiting) using the [`+sbwt` and related runtime flags](https://erlang.org/doc/man/erl.html):
196+
If speculative [scheduler busy waiting](#busy-waiting) is customized,
197+
disable it using the [`+sbwt` and related runtime flags](https://erlang.org/doc/man/erl.html):
193198

194199
```bash
200+
# This is the default used by modern RabbitMQ versions: it disables speculative
201+
# busy waiting.
195202
RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS="+sbwt none +sbwtdcpu none +sbwtdio none"
196203
```
197204

198-
Speculative busy waiting is usually not productive on moderately loaded systems.
199205

200206
#### Reduce Statistics Emission Frequency (Increase the Statistics Emission Interval)
201207

versioned_docs/version-4.1/runtime.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,19 @@ This can be compared to a factory with multiple conveyor belts. When one belt ru
121121
it can be stopped. However, once more work is there for it to do, restarting it will take time.
122122
Alternatively the conveyor can be speculatively kept running for a period of time.
123123

124-
By default, RabbitMQ nodes configure runtime schedulers to speculatively wait for a short period
125-
of time before going to sleep. Workloads where there can be prolonged periods of inactivity
126-
can choose to turn off this speculative busy waiting using the [`+sbwt` and related runtime flags](https://erlang.org/doc/man/erl.html):
124+
By default, RabbitMQ nodes configure runtime schedulers to disable the speculatively waiting.
125+
This benefits the workloads where there can be periods of inactivity on a given connection,
126+
channel, session, queue or stream replica.
127+
128+
Speculative busy waiting is controlled using the [`+sbwt` and related runtime flags](https://erlang.org/doc/man/erl.html):
127129

128130
```bash
131+
# This is the default used by modern RabbitMQ versions: it disables speculative
132+
# busy waiting.
129133
RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS="+sbwt none +sbwtdcpu none +sbwtdio none"
130134
```
131135

132-
This can also reduce CPU usage on systems with limited or burstable CPU resources.
136+
Disabled speculative waiting reduces CPU usage on systems with limited or burstable CPU resources.
133137

134138
In order to determine how much time schedulers spend in busy wait, consult [thread activity metrics](#thread-stats).
135139
Busy waiting will usually be accounted as system time in the output of tools such as `top` and `pidstat`.
@@ -189,13 +193,15 @@ is spent. This is a critically important step for making informed decisions.
189193

190194
#### Turn off Speculative Scheduler Busy Waiting
191195

192-
Turn off speculative [scheduler busy waiting](#busy-waiting) using the [`+sbwt` and related runtime flags](https://erlang.org/doc/man/erl.html):
196+
If speculative [scheduler busy waiting](#busy-waiting) is customized,
197+
disable it using the [`+sbwt` and related runtime flags](https://erlang.org/doc/man/erl.html):
193198

194199
```bash
200+
# This is the default used by modern RabbitMQ versions: it disables speculative
201+
# busy waiting.
195202
RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS="+sbwt none +sbwtdcpu none +sbwtdio none"
196203
```
197204

198-
Speculative busy waiting is usually not productive on moderately loaded systems.
199205

200206
#### Reduce Statistics Emission Frequency (Increase the Statistics Emission Interval)
201207

0 commit comments

Comments
 (0)