You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use the :ref:`small <configuration_reference_memtx_allocator>` type of allocator, you can set the granularity of
98
98
memory allocation in it.
@@ -115,10 +115,10 @@ In the example below, the value is increased to store different-sized tuples:
115
115
116
116
.. _configuration_memtx-slab-alloc-factor:
117
117
118
-
Specify the slab allocation factor
119
-
----------------------------------
118
+
Slab allocation factor
119
+
----------------------
120
120
121
-
The size and number of memory pools depends on allocation factor and granularity.
121
+
The size and number of memory pools depend on the allocation factor and granularity.
122
122
The allocation factor is a multiplier used to calculate the sizes of memory chunks that tuples are stored in.
123
123
To configure the allocation factor, use the :ref:`memtx.slab_alloc_factor <configuration_reference_memtx_slab_alloc_factor>`
124
124
configuration option.
@@ -148,86 +148,3 @@ In the example, the maximum number of threads is used (256):
148
148
:start-at: sort_threads:
149
149
:end-at: 256
150
150
:dedent:
151
-
152
-
.. _configuration_memtx-statistics:
153
-
154
-
Check the database statistics
155
-
-----------------------------
156
-
157
-
Tarantool provides the statistics about memory consumption for the given space or specific tuples.
158
-
Available statistics:
159
-
160
-
* The amount of memory used for the :ref:`data of the specified space <configuration_memtx-statistics-space>`.
161
-
* The amount of :ref:`additional memory <configuration_memtx-statistics-additional>` used for the supplementary information.
162
-
* The :ref:`total memory usage <configuration_memtx-statistics-total>`.
163
-
164
-
.. _configuration_memtx-statistics-space:
165
-
166
-
Space
167
-
~~~~~
168
-
169
-
To get the get the amount of memory in bytes occupied by the specified space, use the :ref:`space_object:bsize() <box_space-bsize>` method.
170
-
The function returns the total number of bytes in all tuples.
171
-
172
-
.. code-block:: console
173
-
174
-
memtx:instance001> box.space.books:bsize()
175
-
---
176
-
- 70348673
177
-
...
178
-
179
-
.. _configuration_memtx-statistics-additional:
180
-
181
-
Additional memory
182
-
~~~~~~~~~~~~~~~~~
183
-
184
-
To check the usage of the additional memory, use the ``space_object:stat()`` method.
185
-
The following information is provided:
186
-
187
-
- ``header_size`` and ``field_map_size``: the size of service information.
188
-
- ``data_size``: the actual size of data, which equals to ``space_object:bsize()``.
189
-
- ``waste_size``: the size of memory wasted due to internal fragmentation in the `slab allocator <https://github.com/tarantool/small>`_.
190
-
191
-
.. code-block:: console
192
-
193
-
memtx:instance001> box.space.books:stat()
194
-
---
195
-
- tuple:
196
-
memtx:
197
-
waste_size: 1744011
198
-
data_size: 70348673
199
-
header_size: 2154132
200
-
field_map_size: 0
201
-
malloc:
202
-
waste_size: 0
203
-
data_size: 0
204
-
header_size: 0
205
-
field_map_size: 0
206
-
...
207
-
208
-
To get the usage of the additional memory (5 Mb) for the specified tuple, use ``tuple_object:info()``:
0 commit comments