Skip to content

Commit 67e18e7

Browse files
committed
Integrate tech feedback
1 parent cf08ca2 commit 67e18e7

File tree

1 file changed

+26
-47
lines changed
  • doc/reference/reference_lua/box_stat

1 file changed

+26
-47
lines changed

doc/reference/reference_lua/box_stat/memtx.rst

Lines changed: 26 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -20,61 +20,41 @@ box.stat.memtx().tx
2020

2121
* ``box.stat.memtx().tx.txn`` shows memory allocation related to transactions.
2222

23-
* ``box.stat.memtx().tx.txn.statements`` are *transaction statements*.
23+
It consists of the following sections:
24+
25+
* ``statements`` are *transaction statements*.
2426
As an example, consider a user starting a transaction with
2527
``space:replace{0, 1}`` within this transaction. Under the hood,
2628
this operation becomes a statement for this transaction.
27-
Tarantool reports the following statistics for statements:
28-
29-
* ``box.stat.memtx().tx.txn.statements.max`` is the maximal number of bytes
30-
that a single transaction uses for statements.
31-
* ``box.stat.memtx().tx.txn.statements.avg`` is the average number of bytes
32-
that a single transaction uses for statements (equals
33-
`box.stat.memtx().tx.txn.statements.total`` / number of open transactions).
34-
* ``box.stat.memtx().tx.txn.statements.total`` is the number of bytes that are
35-
currently allocated for statements of all transactions in memtx.
36-
37-
* ``box.stat.memtx().tx.txn.user`` is the memory that a user allocated within
29+
* ``user`` is the memory that a user allocated within
3830
the current transaction using the Tarantool C API function
3931
:ref:`box_txn_alloc() <txn-box_txn_alloc>`.
40-
Tarantool reports the following statistics for this kind of transactions:
32+
* ``system`` is the memory allocated for internal needs
33+
(for example, logs) and savepoints.
4134

42-
* ``box.stat.memtx().tx.txn.user.max`` is the maximal number of bytes
43-
within a transaction allocated using ``box_txn_alloc()``.
44-
* ``box.stat.memtx().tx.txn.user.avg`` is the average number of bytes within
45-
a transaction allocated using ``box_txn_alloc()`` (equals
46-
``box.stat.memtx().tx.txn.user.total`` / number of transaction).
47-
* ``box.stat.memtx().tx.txn.user.total`` is the number of bytes allocated
48-
using ``box_txn_alloc()`` for all transactions in memtx.
35+
For each section, Tarantool reports the following statistics:
4936

50-
* ``box.stat.memtx().tx.txn.system`` is the memory allocated for internal needs
51-
(for example, logs) and savepoints.
52-
Like in the previous sections, Tarantool reports the maximal, average and
53-
total number of allocated bytes.
37+
* ``total`` is the number of bytes that are currently allocated in memtx
38+
for all transactions within the section scope.
39+
* ``avg`` is the average number of bytes that a single transaction uses
40+
(equals ``total`` / number of open transactions).
41+
* ``max`` is the maximal number of bytes that a single transaction uses.
5442

5543
* ``box.stat.memtx().tx.mvcc`` shows memory allocation related to multiversion
56-
concurrency control (MVCC). MVCC is reposible for isolating transactions.
44+
concurrency control (MVCC). MVCC is reponsible for isolating transactions.
5745
It reveals conflicts and makes sure that tuples that do not belong to a particular
5846
space but were (or could be) read by some transaction were not deleted.
5947

60-
* ``box.stat.memtx().tx.mvcc.trackers`` is the memory allocated for *trackers*
61-
of transaction reads.
62-
Tarantool reports the following statistics for trackers:
63-
64-
* ``box.stat.memtx().tx.mvcc.trackers.max`` is the maximal number of bytes
65-
allocated for trackers per a single transaction.
66-
* ``box.stat.memtx().tx.mvcc.trackers.avg`` is the average number of bytes
67-
allocated for trackers per a single transaction (equals
68-
``box.stat.memtx().tx.mvcc.trackers.total`` / number of transactions).
69-
* ``box.stat.memtx().tx.mvcc.trackers.total`` is the number of bytes that are
70-
currently allocated for all trackers in memtx.
48+
It consists of the following sections:
7149

72-
* ``box.stat.memtx().tx.mvcc.conflicts`` is the memory allocated for *conflicts*
50+
* ``trackers`` is the memory allocated for *trackers* of transaction reads.
51+
Like in the previous sections, Tarantool reports the total, average
52+
and maximum number of bytes allocated for trackers per a single transaction.
53+
* ``conflicts`` is the memory allocated for *conflicts*
7354
which are entities created when transactional conflicts occur.
74-
Like in the previous sections, Tarantool reports the maximal, average and
75-
total number of allocated bytes.
76-
77-
* ``box.stat.memtx().tx.mvcc.tuples`` is the memory allocated for storing tuples.
55+
Like in the previous sections, Tarantool reports the total, average
56+
and maximum number of allocated bytes.
57+
* ``tuples`` is the memory allocated for storing tuples.
7858
With MVCC, tuples are stored using the *stories* mechanism. Nearly every
7959
tuple has its story. Even tuples in an index may have their stories, so
8060
it may be useful to differentiate memory allocated for tuples and memory
@@ -83,12 +63,11 @@ box.stat.memtx().tx
8363
All stored tuples fall into three categories, with memory statistics
8464
reported for each category:
8565

86-
* ``box.stat.memtx().tx.mvcc.tuples.tracking`` is for tuples that are not used
87-
by any transactions directly, but MVCC uses them for tracking transaction reads.
88-
* ``box.stat.memtx().tx.mvcc.tuples.used`` is for tuples that are used
89-
by active read-write transactions.
90-
* ``box.stat.memtx().tx.mvcc.tuples.read_view`` is for tuples that are not used
91-
by active read-write transactions, but are used by read-only transactions.
66+
* ``tracking`` is for tuples that are not used by any transactions directly,
67+
but MVCC uses them for tracking transaction reads.
68+
* ``used`` is for tuples that are used by active read-write transactions.
69+
* ``read_view`` is for tuples that are not used by active read-write transactions,
70+
but are used by read-only transactions.
9271

9372
For each of the three categories, Tarantool reports two statistical blocks:
9473

0 commit comments

Comments
 (0)