@@ -9,6 +9,64 @@ box.stat.memtx()
99
1010 Shows ``memtx `` storage engine activity.
1111
12+ .. _box_introspection-box_stat_memtx_data :
13+
14+ box.stat.memtx().data
15+ ---------------------
16+
17+ ``data `` shows how much memory (in bytes) is allocated for memtx tuples:
18+
19+ * ``data.garbage `` is the amount of memory that is unused and scheduled to be freed
20+ (freed lazily on memory allocation).
21+
22+ * ``data.total `` is the total amount of memory allocated for data tuples.
23+ This includes ``data.read_view `` and ``data.garbage `` plus tuples that are
24+ actually stored in memtx spaces.
25+
26+ * ``data.read_view `` is the amount of memory held for read views.
27+ This includes memory allocated both for system read views (snapshot, replication)
28+ and user read views (EE-only). This should be non-zero only if there are open read views.
29+
30+ To list all open read views, use :ref: `box.read_view.list() <reference_lua-box_read_view_list >`.
31+
32+ **Example: **
33+
34+ .. code-block :: tarantoolsession
35+
36+ tarantool> box.stat.memtx().data
37+ ---
38+ - garbage: 0
39+ total: 25334
40+ read_view: 0
41+ ...
42+
43+ .. _box_introspection-box_stat_memtx_index :
44+
45+ box.stat.memtx().index
46+ ----------------------
47+
48+ ``index `` shows how much memory (in bytes) is allocated for indexing memtx tuples:
49+
50+ * ``index.read_view `` is the amount of memory held for read views.
51+ This includes memory allocated both for system read views (snapshot, replication)
52+ and user read views (EE-only). This should be non-zero only if there are open read views.
53+
54+ To list all open read views, use :ref: `box.read_view.list() <reference_lua-box_read_view_list >`.
55+
56+ * ``index.total `` is the total amount of memory allocated for
57+ indexing data. This includes ``index.read_view `` plus memory used for indexing
58+ tuples that are actually stored in memtx spaces.
59+
60+ **Example: **
61+
62+ .. code-block :: tarantoolsession
63+
64+ tarantool> box.stat.memtx().index
65+ ---
66+ - read_view: 0
67+ total: 1032192
68+ ...
69+
1270 .. _box_introspection-box_stat_memtx_tx :
1371
1472box.stat.memtx().tx
@@ -124,52 +182,52 @@ Calling ``box.stat.memtx.tx()`` now returns the following result:
124182.. code-block :: tarantoolsession
125183 :emphasize-lines: 33-39
126184
127- tarantool> box.stat.memtx.tx()
128- ---
129- - txn:
130- statements:
131- max: 720
132- avg: 720
133- total: 720
134- user:
135- max: 0
136- avg: 0
137- total: 0
138- system:
139- max: 916
140- avg: 916
141- total: 916
142- mvcc:
143- trackers:
144- max: 0
145- avg: 0
146- total: 0
147- conflicts:
148- max: 0
149- avg: 0
150- total: 0
151- tuples:
152- tracking:
153- stories:
154- count: 0
155- total: 0
156- retained:
157- count: 0
158- total: 0
159- used:
160- stories:
161- count: 6
162- total: 944
163- retained:
164- count: 2
165- total: 119
166- read_view:
167- stories:
168- count: 0
169- total: 0
170- retained:
171- count: 0
172- total: 0
173- ...
185+ tarantool> box.stat.memtx.tx()
186+ ---
187+ - txn:
188+ statements:
189+ max: 720
190+ avg: 720
191+ total: 720
192+ user:
193+ max: 0
194+ avg: 0
195+ total: 0
196+ system:
197+ max: 916
198+ avg: 916
199+ total: 916
200+ mvcc:
201+ trackers:
202+ max: 0
203+ avg: 0
204+ total: 0
205+ conflicts:
206+ max: 0
207+ avg: 0
208+ total: 0
209+ tuples:
210+ tracking:
211+ stories:
212+ count: 0
213+ total: 0
214+ retained:
215+ count: 0
216+ total: 0
217+ used:
218+ stories:
219+ count: 6
220+ total: 944
221+ retained:
222+ count: 2
223+ total: 119
224+ read_view:
225+ stories:
226+ count: 0
227+ total: 0
228+ retained:
229+ count: 0
230+ total: 0
231+ ...
174232
175233 Pay attention to highlighted lines -- it's the memory allocated for `used ` tuples.
0 commit comments