|
529 | 529 | <div id="header"> |
530 | 530 | <h1>RabbitMQ PerfTest</h1> |
531 | 531 | <div class="details"> |
532 | | -<span id="revnumber">version 2.24.0-SNAPSHOT</span> |
| 532 | +<span id="revnumber">version 2.25.0-SNAPSHOT</span> |
533 | 533 | </div> |
534 | 534 | <div id="toc" class="toc2"> |
535 | 535 | <div id="toctitle">Table of Contents</div> |
@@ -1418,7 +1418,7 @@ <h2 id="simulating-high-loads"><a class="anchor" href="#simulating-high-loads">< |
1418 | 1418 | exceptions is to tune the number of file descriptors allowed per process |
1419 | 1419 | at the OS level, as some distributions use very low limits. |
1420 | 1420 | Here the recommendations are the same as for the broker, so you |
1421 | | -can refer to our <a href="https://www.rabbitmq.com/networking.html#os-tuning">networking guide</a>.</p> |
| 1421 | +can refer to our <a href="https://www.rabbitmq.com/docs/networking#os-tuning">networking guide</a>.</p> |
1422 | 1422 | </div> |
1423 | 1423 | </div> |
1424 | 1424 | </div> |
@@ -1549,38 +1549,30 @@ <h2 id="workloads-with-a-large-number-of-clients"><a class="anchor" href="#workl |
1549 | 1549 | </div> |
1550 | 1550 | <div class="paragraph"> |
1551 | 1551 | <p>By default, PerfTest uses blocking network socket I/O to communicate with |
1552 | | -the broker. This mode works fine for clients in many cases but the RabbitMQ Java client |
1553 | | -also supports an <a href="https://www.rabbitmq.com/api-guide.html#java-nio">asynchronous I/O mode</a>, |
1554 | | -where resources like threads can be easily tuned. The goal here is to use as few |
1555 | | -resources as possible to simulate as much load as possible with a single PerfTest instance. |
| 1552 | +the broker. |
| 1553 | +This mode works fine for clients in many cases but the RabbitMQ Java client can also use Netty for its network layer. |
| 1554 | +Netty uses a multithreaded event loop to handle I/O operation and the number of threads can be easily tuned. |
| 1555 | +The goal here is to use as few resources as possible to simulate as much load as possible with a single PerfTest instance. |
1556 | 1556 | In the slow publisher example above, a handful of threads should be enough |
1557 | | -to handle the I/O. That’s what the |
1558 | | -<code>--nio-threads</code> flag is for:</p> |
| 1557 | +to handle the I/O. |
| 1558 | +That’s what the <code>--netty-threads</code> flag is for:</p> |
1559 | 1559 | </div> |
1560 | 1560 | <div class="listingblock"> |
1561 | | -<div class="title">Reducing the number of IO threads by enabling the NIO mode with <code>--nio-threads</code></div> |
| 1561 | +<div class="title">Reducing the number of I/O threads by using Netty with <code>--netty-threads</code></div> |
1562 | 1562 | <div class="content"> |
1563 | 1563 | <pre class="CodeRay highlight"><code data-lang="bash">java -jar perf-test.jar --queue-pattern 'perf-test-%d' \ |
1564 | 1564 | --queue-pattern-from 1 --queue-pattern-to 1000 \ |
1565 | 1565 | --producers 1000 --consumers 1000 \ |
1566 | | - --heartbeat-sender-threads 10 \ |
1567 | 1566 | --publishing-interval 60 --producer-random-start-delay 1800 \ |
1568 | 1567 | --producer-scheduler-threads 10 \ |
1569 | | - --nio-threads 10</code></pre> |
1570 | | -</div> |
| 1568 | + --consumers-thread-pools 10 \ |
| 1569 | + --netty-threads 10</code></pre> |
1571 | 1570 | </div> |
1572 | | -<div class="paragraph"> |
1573 | | -<p>This way PerfTest will use 12 threads for I/O over all the connections. |
1574 | | -With the default blocking I/O mode, each producer (or consumer) |
1575 | | -uses a thread for the I/O loop, that is 2000 threads to simulate 1000 producers and |
1576 | | -1000 consumers. Using NIO in PerfTest can dramatically reduce the resources used |
1577 | | -to simulate workloads with a large number of connections with appropriate tuning.</p> |
1578 | 1571 | </div> |
1579 | 1572 | <div class="paragraph"> |
1580 | | -<p>Note that in NIO mode the number of threads used can increase temporarily when connections close |
1581 | | -unexpectedly and connection recovery kicks in. This is due to the NIO mode dispatching |
1582 | | -connection closing to non-I/O threads to avoid deadlocks. Connection recovery can be disabled |
1583 | | -with the <code>--disable-connection-recovery</code> flag.</p> |
| 1573 | +<p>This way PerfTest will use 10 threads for I/O over all the connections. |
| 1574 | +With the default blocking I/O mode, each producer (or consumer) uses a thread for the I/O loop, that is 2000 threads to simulate 1000 producers and 1000 consumers. |
| 1575 | +Using Netty in PerfTest can dramatically reduce the resources used to simulate workloads with a large number of connections with appropriate tuning.</p> |
1584 | 1576 | </div> |
1585 | 1577 | </div> |
1586 | 1578 | </div> |
@@ -2139,8 +2131,8 @@ <h3 id="expected-and-exposed-metrics"><a class="anchor" href="#expected-and-expo |
2139 | 2131 | </div> |
2140 | 2132 | <div id="footer"> |
2141 | 2133 | <div id="footer-text"> |
2142 | | -Version 2.24.0-SNAPSHOT<br> |
2143 | | -Last updated 2025-07-22 13:13:49 UTC |
| 2134 | +Version 2.25.0-SNAPSHOT<br> |
| 2135 | +Last updated 2025-08-06 09:57:56 UTC |
2144 | 2136 | </div> |
2145 | 2137 | </div> |
2146 | 2138 | </body> |
|
0 commit comments