Skip to content

Commit 189227c

Browse files
committed
Document thread number increase in NIO mode
[#159130745] References #106
1 parent aa83867 commit 189227c

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/docs/asciidoc/usage-advanced.adoc

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,17 @@ to handle the I/O. That's what the
188188
--producer-scheduler-threads 10
189189
--nio-threads 10
190190

191-
PerfTest will use 2 extra threads for internal bookkeeping needs, so the total will be 12 threads
192-
for I/O over all the connections. With the default blocking I/O mode, each producer (or consumer)
191+
This way PerfTest will use 12 threads for I/O over all the connections.
192+
With the default blocking I/O mode, each producer (or consumer)
193193
uses a thread for the I/O loop, that is 2000 threads to simulate 1000 producers and
194-
1000 consumers.
194+
1000 consumers. Using NIO in PerfTest can dramatically reduce the resources used
195+
to simulate workloads with a large number of connections with appropriate tuning.
196+
197+
Note that in NIO mode the number of threads used can increase temporarily when connections close
198+
unexpectedly and connection recovery kicks in. This is due to the NIO mode dispatching
199+
connection closing to non-I/O threads to avoid deadlocks. Connection recovery can be disabled
200+
with the `--disable-connection-recovery` flag.
195201

196-
Using NIO in PerfTest can dramatically reduce the resources used to simulate workloads with a large
197-
number of connections with appropriate tuning.
198202

199203
== Running Producers and Consumers on Different Machines
200204

0 commit comments

Comments
 (0)