Skip to content

Commit 05f4b25

Browse files
authored
Add info re new vinyl counter box.stat.vinyl().memory.tuple (#5064)
Closes gh-4365.
1 parent 52e3ae2 commit 05f4b25

File tree

1 file changed

+73
-70
lines changed
  • doc/reference/reference_lua/box_stat

1 file changed

+73
-70
lines changed

doc/reference/reference_lua/box_stat/vinyl.rst

Lines changed: 73 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -19,44 +19,6 @@ box.stat.vinyl()
1919
- 1047632
2020
...
2121
22-
.. _box_introspection-box_stat_vinyl_regulator:
23-
24-
box.stat.vinyl().regulator
25-
--------------------------
26-
The vinyl regulator decides when to take or delay actions for
27-
disk IO, grouping activity in batches so that it is
28-
consistent and efficient. The regulator is invoked by
29-
the vinyl scheduler, once per second, and updates
30-
related variables whenever it is invoked.
31-
32-
* ``box.stat.vinyl().regulator.dump_bandwidth`` is
33-
the estimated average rate at which dumps are done.
34-
Initially this will appear as 10485760 (10 megabytes per second).
35-
Only significant dumps (larger than one megabyte) are used for estimating.
36-
37-
* ``box.stat.vinyl().regulator.dump_watermark``
38-
is the point when dumping must occur.
39-
The value is slightly smaller than the amount of memory
40-
that is allocated for vinyl trees, which is the
41-
:ref:`vinyl_memory <cfg_storage-vinyl_memory>` parameter.
42-
43-
* ``box.stat.vinyl().regulator.write_rate``
44-
is the actual average rate at which recent writes to disk are done.
45-
Averaging is done over a 5-second time window, so if there has
46-
been no activity for 5 seconds then ``regulator.write_rate = 0``.
47-
The ``write_rate`` may be slowed when a dump is in progress
48-
or when the user has set
49-
:ref:`snap_io_rate_limit <cfg_binary_logging_snapshots-snap_io_rate_limit>`.
50-
51-
* ``box.stat.vinyl().regulator.rate_limit`` is the write rate limit,
52-
in bytes per second, imposed on transactions by
53-
the regulator based on the observed dump/compaction performance.
54-
55-
* ``box.stat.vinyl().regulator.blocked_writers`` is the number of fibers
56-
currently blocked waiting for vinyl :ref:`L0 memory <engines-algorithm_filling_lsm>`
57-
quota.
58-
59-
6022
.. _box_introspection-box_stat_vinyl_disk:
6123

6224
box.stat.vinyl().disk
@@ -88,7 +50,10 @@ Although the vinyl storage engine is not "in-memory", Tarantool does
8850
need to have memory for write buffers and for caches:
8951

9052
* ``box.stat.vinyl().memory.tuple_cache``
91-
is the number of bytes that are being used for tuples (data).
53+
is the size of memory (in bytes) occupied by tuples stored in the cache.
54+
* ``box.stat.vinyl().memory.tuple``
55+
is the size of memory (in bytes) occupied by all allocated tuples.
56+
This includes cached tuples and tuples that are referenced in Lua.
9257
* ``box.stat.vinyl().memory.tx``
9358
is transactional memory. This will usually be 0.
9459
* ``box.stat.vinyl().memory.level0``
@@ -110,38 +75,44 @@ bloom filter predicts their presence in a run file) --
11075
that statistic can be found with
11176
:doc:`/reference/reference_lua/box_index/stat`.
11277

113-
.. _box_introspection-box_stat_vinyl_tx:
78+
.. _box_introspection-box_stat_vinyl_regulator:
11479

115-
box.stat.vinyl().tx
116-
-------------------
117-
This is about requests that affect transactional activity
118-
("tx" is used here as an abbreviation for "transaction"):
80+
box.stat.vinyl().regulator
81+
--------------------------
82+
The vinyl regulator decides when to take or delay actions for
83+
disk IO, grouping activity in batches so that it is
84+
consistent and efficient. The regulator is invoked by
85+
the vinyl scheduler, once per second, and updates
86+
related variables whenever it is invoked.
11987

120-
* ``box.stat.vinyl().tx.conflict``
121-
counts conflicts that caused a transaction to roll back.
122-
* ``box.stat.vinyl().tx.commit``
123-
is the count of commits (successful transaction ends).
124-
It includes implicit commits, for example any insert causes a commit unless
125-
it is within a begin-end block.
126-
* ``box.stat.vinyl().tx.rollback``
127-
is the count of rollbacks (unsuccessful transaction ends).
128-
This is not merely a count of explicit
129-
:doc:`/reference/reference_lua/box_txn_management/rollback` requests --
130-
it includes requests that ended in errors.
131-
For example, after an attempted insert request that causes
132-
a "Duplicate key exists in unique index" error, ``tx.rollback``
133-
is incremented.
134-
* ``box.stat.vinyl().tx.statements``
135-
will usually be 0.
136-
* ``box.stat.vinyl().tx.transactions``
137-
is the number of transactions that are currently running.
138-
* ``box.stat.vinyl().tx.gap_locks``
139-
is the number of gap locks that are outstanding during execution of a request.
140-
For a low-level description of Tarantool's implementation of gap locking, see
141-
`Gap locks in Vinyl transaction manager <https://github.com/tarantool/tarantool/issues/2671>`_.
142-
* ``box.stat.vinyl().tx.read_views``
143-
shows whether a transaction has entered a read-only state
144-
to avoid conflict temporarily. This will usually be 0.
88+
* ``box.stat.vinyl().regulator.dump_bandwidth`` is
89+
the estimated average rate at which dumps are done.
90+
Initially this will appear as 10485760 (10 megabytes per second).
91+
Only significant dumps (larger than one megabyte) are used for estimating.
92+
93+
* ``box.stat.vinyl().regulator.dump_watermark``
94+
is the point when dumping must occur.
95+
The value is slightly smaller than the amount of memory
96+
that is allocated for vinyl trees, which is the
97+
:ref:`vinyl_memory <cfg_storage-vinyl_memory>` parameter.
98+
99+
* ``box.stat.vinyl().regulator.write_rate``
100+
is the actual average rate at which recent writes to disk are done.
101+
Averaging is done over a 5-second time window, so if there has
102+
been no activity for 5 seconds then ``regulator.write_rate = 0``.
103+
The ``write_rate`` may be slowed when a dump is in progress
104+
or when the user has set
105+
:ref:`snap_io_rate_limit <cfg_binary_logging_snapshots-snap_io_rate_limit>`.
106+
107+
* ``box.stat.vinyl().regulator.rate_limit`` is the write rate limit,
108+
in bytes per second, imposed on transactions by
109+
the regulator based on the observed dump/compaction performance.
110+
111+
* ``box.stat.vinyl().regulator.blocked_writers`` is the number of fibers
112+
currently blocked waiting for vinyl :ref:`L0 memory <engines-algorithm_filling_lsm>`
113+
quota.
114+
115+
.. _box_introspection-box_stat_vinyl_scheduler:
145116

146117
box.stat.vinyl().scheduler
147118
--------------------------
@@ -190,4 +161,36 @@ for dumping or compaction:
190161

191162
A dump will also occur during a
192163
:doc:`snapshot </reference/reference_lua/box_snapshot>` operation.
193-
164+
165+
.. _box_introspection-box_stat_vinyl_tx:
166+
167+
box.stat.vinyl().tx
168+
-------------------
169+
This is about requests that affect transactional activity
170+
("tx" is used here as an abbreviation for "transaction"):
171+
172+
* ``box.stat.vinyl().tx.conflict``
173+
counts conflicts that caused a transaction to roll back.
174+
* ``box.stat.vinyl().tx.commit``
175+
is the count of commits (successful transaction ends).
176+
It includes implicit commits, for example any insert causes a commit unless
177+
it is within a begin-end block.
178+
* ``box.stat.vinyl().tx.rollback``
179+
is the count of rollbacks (unsuccessful transaction ends).
180+
This is not merely a count of explicit
181+
:doc:`/reference/reference_lua/box_txn_management/rollback` requests --
182+
it includes requests that ended in errors.
183+
For example, after an attempted insert request that causes
184+
a "Duplicate key exists in unique index" error, ``tx.rollback``
185+
is incremented.
186+
* ``box.stat.vinyl().tx.statements``
187+
will usually be 0.
188+
* ``box.stat.vinyl().tx.transactions``
189+
is the number of transactions that are currently running.
190+
* ``box.stat.vinyl().tx.gap_locks``
191+
is the number of gap locks that are outstanding during execution of a request.
192+
For a low-level description of Tarantool's implementation of gap locking, see
193+
`Gap locks in Vinyl transaction manager <https://github.com/tarantool/tarantool/issues/2671>`_.
194+
* ``box.stat.vinyl().tx.read_views``
195+
shows whether a transaction has entered a read-only state
196+
to avoid conflict temporarily. This will usually be 0.

0 commit comments

Comments
 (0)