From d89aa1f9ffc69b21e56a82db917ac6dc16253ce9 Mon Sep 17 00:00:00 2001 From: Pavel Semyonov Date: Mon, 23 May 2022 10:50:33 +0700 Subject: [PATCH 1/5] Add STREAMS net stats --- doc/reference/reference_lua/box_stat/net.rst | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/doc/reference/reference_lua/box_stat/net.rst b/doc/reference/reference_lua/box_stat/net.rst index 5878075732..f8fe664924 100644 --- a/doc/reference/reference_lua/box_stat/net.rst +++ b/doc/reference/reference_lua/box_stat/net.rst @@ -15,23 +15,24 @@ box.stat.net() second in the last 5 seconds * ``SENT.total`` and ``RECEIVED.total`` -- total number of bytes sent/received since the server started + * ``CONNECTIONS.current`` -- number of open connections * ``CONNECTIONS.rps`` -- number of connections opened per second in the last 5 seconds * ``CONNECTIONS.total`` -- total number of connections opened since the server started * ``REQUESTS.current`` -- number of requests in progress, which can be limited by :ref:`box.cfg.net_msg_max ` * ``REQUESTS.rps`` -- number of requests processed per second in the last 5 seconds * ``REQUESTS.total`` -- total number of requests processed since startup + * ``STREAMS.current`` -- number of open :doc:`streams ` + * ``STREAMS.rps`` -- number of streams opened per second in the last 5 seconds + * ``STREAMS.total`` -- total number of streams opened since the server started **Example:** .. code-block:: tarantoolsession - tarantool> box.stat.net() -- 4 tables + tarantool> box.stat.net() -- 5 tables --- - - SENT: - total: 0 - rps: 0 - CONNECTIONS: + - CONNECTIONS: current: 0 rps: 0 total: 0 @@ -39,6 +40,13 @@ box.stat.net() current: 0 rps: 0 total: 0 + SENT: + total: 0 + rps: 0 + STREAMS: + current: 0 + rps: 0 + total: 0 RECEIVED: total: 0 rps: 0 From e197c218503578fa703370848bdee2e5d24d866c Mon Sep 17 00:00:00 2001 From: Pavel Semyonov Date: Mon, 23 May 2022 12:51:54 +0700 Subject: [PATCH 2/5] Improve wording --- doc/reference/reference_lua/box_stat/net.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/reference/reference_lua/box_stat/net.rst b/doc/reference/reference_lua/box_stat/net.rst index f8fe664924..243e3d33b0 100644 --- a/doc/reference/reference_lua/box_stat/net.rst +++ b/doc/reference/reference_lua/box_stat/net.rst @@ -6,7 +6,7 @@ box.stat.net() .. function:: net() Shows network activity: the number of bytes sent - and received, the number of connections, and the number of active requests + and received, the number of connections, streams, and requests (current, average, and total). :return: in the tables that ``box.stat.net()`` returns: @@ -22,7 +22,7 @@ box.stat.net() limited by :ref:`box.cfg.net_msg_max ` * ``REQUESTS.rps`` -- number of requests processed per second in the last 5 seconds * ``REQUESTS.total`` -- total number of requests processed since startup - * ``STREAMS.current`` -- number of open :doc:`streams ` + * ``STREAMS.current`` -- number of active :doc:`streams ` * ``STREAMS.rps`` -- number of streams opened per second in the last 5 seconds * ``STREAMS.total`` -- total number of streams opened since the server started From 4265603ea3375ead1229702a0d20d97fe61423c5 Mon Sep 17 00:00:00 2001 From: Pavel Semyonov Date: Wed, 25 May 2022 11:29:31 +0700 Subject: [PATCH 3/5] Add detailed request metrics --- doc/reference/reference_lua/box_stat/net.rst | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/doc/reference/reference_lua/box_stat/net.rst b/doc/reference/reference_lua/box_stat/net.rst index 243e3d33b0..bbccf65754 100644 --- a/doc/reference/reference_lua/box_stat/net.rst +++ b/doc/reference/reference_lua/box_stat/net.rst @@ -16,15 +16,22 @@ box.stat.net() * ``SENT.total`` and ``RECEIVED.total`` -- total number of bytes sent/received since the server started * ``CONNECTIONS.current`` -- number of open connections - * ``CONNECTIONS.rps`` -- number of connections opened per second in the last 5 seconds + * ``CONNECTIONS.rps`` -- average number of connections opened per second in the last 5 seconds * ``CONNECTIONS.total`` -- total number of connections opened since the server started * ``REQUESTS.current`` -- number of requests in progress, which can be limited by :ref:`box.cfg.net_msg_max ` - * ``REQUESTS.rps`` -- number of requests processed per second in the last 5 seconds - * ``REQUESTS.total`` -- total number of requests processed since startup + * ``REQUESTS.rps`` -- average number of requests processed per second in the last 5 seconds + * ``REQUESTS.total`` -- total number of requests processed since the server started + * ``REQUESTS_IN_PROGRESS.current`` -- number of requests being currently processed by the :ref:`TX thread ` + * ``REQUESTS_IN_PROGRESS.rps`` -- average number of requests processed by the TX thread per second in the last 5 seconds + * ``REQUESTS_IN_PROGRESS.total`` -- total number of requests processed by the TX thread since the server started * ``STREAMS.current`` -- number of active :doc:`streams ` - * ``STREAMS.rps`` -- number of streams opened per second in the last 5 seconds + * ``STREAMS.rps`` -- average number of streams opened per second in the last 5 seconds * ``STREAMS.total`` -- total number of streams opened since the server started + * ``REQUESTS_IN_STREAM_QUEUE.current`` -- number requests waiting in the streams' queues + * ``REQUESTS_IN_STREAM_QUEUE.rps`` -- average number of requests in the streams' queues per second in the last 5 seconds + * ``REQUESTS_IN_STREAM_QUEUE.total`` -- total number of requests placed in the streams' queues since the server started + **Example:** From 32d3253334a8af885300ff288337409efb55fd53 Mon Sep 17 00:00:00 2001 From: Pavel Semyonov Date: Wed, 25 May 2022 14:43:34 +0700 Subject: [PATCH 4/5] Update box.stat.net() example --- doc/reference/reference_lua/box_stat/net.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/reference/reference_lua/box_stat/net.rst b/doc/reference/reference_lua/box_stat/net.rst index bbccf65754..f2ed31ae58 100644 --- a/doc/reference/reference_lua/box_stat/net.rst +++ b/doc/reference/reference_lua/box_stat/net.rst @@ -47,9 +47,17 @@ box.stat.net() current: 0 rps: 0 total: 0 + REQUESTS_IN_PROGRESS: + current: 0 + rps: 0 + total: 0 SENT: total: 0 rps: 0 + REQUESTS_IN_STREAM_QUEUE: + current: 0 + rps: 0 + total: 0 STREAMS: current: 0 rps: 0 From 2e7c6e166acba8d7c32914ba738a296709fc07f2 Mon Sep 17 00:00:00 2001 From: Pavel Semyonov Date: Wed, 25 May 2022 17:44:38 +0700 Subject: [PATCH 5/5] Update doc/reference/reference_lua/box_stat/net.rst Co-authored-by: Patience Daur --- doc/reference/reference_lua/box_stat/net.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/reference/reference_lua/box_stat/net.rst b/doc/reference/reference_lua/box_stat/net.rst index f2ed31ae58..73caf85bd0 100644 --- a/doc/reference/reference_lua/box_stat/net.rst +++ b/doc/reference/reference_lua/box_stat/net.rst @@ -28,9 +28,9 @@ box.stat.net() * ``STREAMS.current`` -- number of active :doc:`streams ` * ``STREAMS.rps`` -- average number of streams opened per second in the last 5 seconds * ``STREAMS.total`` -- total number of streams opened since the server started - * ``REQUESTS_IN_STREAM_QUEUE.current`` -- number requests waiting in the streams' queues - * ``REQUESTS_IN_STREAM_QUEUE.rps`` -- average number of requests in the streams' queues per second in the last 5 seconds - * ``REQUESTS_IN_STREAM_QUEUE.total`` -- total number of requests placed in the streams' queues since the server started + * ``REQUESTS_IN_STREAM_QUEUE.current`` -- number of requests waiting in stream queues + * ``REQUESTS_IN_STREAM_QUEUE.rps`` -- average number of requests in stream queues per second in the last 5 seconds + * ``REQUESTS_IN_STREAM_QUEUE.total`` -- total number of requests placed in stream queues since the server started **Example:**