Skip to content

Conversation

patapenka-alexey
Copy link
Contributor

@patapenka-alexey patapenka-alexey commented Sep 15, 2025

This patch adds new tnt_memory metric.

Closes #TNTP-4363

@patapenka-alexey patapenka-alexey force-pushed the patapenka-alexey/tntp-4363-instance-memory branch from 4cd4c5c to c0dc385 Compare September 15, 2025 11:38
@patapenka-alexey patapenka-alexey force-pushed the patapenka-alexey/tntp-4363-instance-memory branch from c0dc385 to b04387a Compare September 15, 2025 13:32
@patapenka-alexey patapenka-alexey requested review from DifferentialOrange and removed request for oleg-jukovec September 16, 2025 06:51
:widths: 25 75
:header-rows: 0

* - ``tnt_instance_memory``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the documentation, each section is enabled/disabled separately. If you introduce instance section, its metrics should be in a separate section.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

--[[vinyl]]
local vinyl_stat = box.stat.vinyl()
if vinyl_stat ~= nil then
memory_stat = memory_stat + vinyl_stat.memory.tuple_cache
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that box.info.memory().cache and box.stat.vinyl().tuple_cache are the same, so they're counted twice

cache – the number of bytes used for caching user data. The memtx storage engine does not require a cache, so in fact this is the number of bytes in the cache for the tuples stored for the vinyl storage engine.
(https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_info/memory/)

The same goes for box.info.memory().data and box.info.memory().index

data – the number of bytes used for storing user data (the tuples) with the memtx engine and with level 0 of the vinyl engine, without taking memory fragmentation into account.
index – the number of bytes used for indexing user data, including memtx and vinyl memory tree extents, the vinyl page index, and the vinyl bloom filters.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

@patapenka-alexey patapenka-alexey force-pushed the patapenka-alexey/tntp-4363-instance-memory branch 6 times, most recently from ba6e1bf to 46efe82 Compare September 18, 2025 08:36
@patapenka-alexey patapenka-alexey force-pushed the patapenka-alexey/tntp-4363-instance-memory branch 5 times, most recently from 33d1617 to 2252b87 Compare September 18, 2025 11:59
This patch adds new `tnt_memory` metric.

Closes  #TNTP-4363
@patapenka-alexey patapenka-alexey force-pushed the patapenka-alexey/tntp-4363-instance-memory branch from 4ded5f2 to 9049a83 Compare September 22, 2025 15:25
@patapenka-alexey patapenka-alexey merged commit 01ca9dd into master Sep 23, 2025
16 checks passed
@patapenka-alexey patapenka-alexey deleted the patapenka-alexey/tntp-4363-instance-memory branch September 23, 2025 07:52
@patapenka-alexey patapenka-alexey mentioned this pull request Oct 14, 2025
patapenka-alexey added a commit to tarantool/tarantool that referenced this pull request Oct 17, 2025
Bump metric package submodule. Commits from PR[1-5] add
new metric to Tarantool.

1. tarantool/metrics#519
2. tarantool/metrics#521
3. tarantool/metrics#524
4. tarantool/metrics#525
5. tarantool/metrics#527
patapenka-alexey added a commit to tarantool/tarantool that referenced this pull request Oct 17, 2025
Bump metric package submodule. Commits from PR[1-5] add
new metric to Tarantool.

1. tarantool/metrics#519
2. tarantool/metrics#521
3. tarantool/metrics#524
4. tarantool/metrics#525
5. tarantool/metrics#527

@TarantoolBot document
Title: Document `new system memory metrics`

`'tnt_memory'`, `'tnt_memory_virt'`, `'schema_needs_upgrade'` are new
metrics, introduced in metrics 1.6.0, and enabled by default.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants