Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memtx: introduce read view statistics #8510

Merged
merged 1 commit into from
Mar 30, 2023

Conversation

locker
Copy link
Member

@locker locker commented Mar 28, 2023

New entries have been added to box.stat.memtx() output:

tarantool> box.stat.memtx().data
---
- garbage: 0
  total: 24986
  read_view: 0
...

tarantool> box.stat.memtx().index
---
- read_view: 0
  total: 933888
...

data shows how much memory is allocated for memtx tuples:

  • data.total - total amount of memory allocated for data tuples. This includes data.read_view and data.garbage plus tuples that are actually stored in memtx spaces.
  • data.read_view - memory held for read views.
  • data.garbage - memory that is unused and scheduled to be freed (freed lazily on memory allocation).

index shows how much memory is allocated for memtx index extents:

  • index.total - total amount of memory allocated for indexing data. This includes index.read_view plus memory used for indexing tuples that are actually stored in memtx spaces.
  • index.read_view - memory held for read views.

All numbers are given in bytes.

data.read_view and index.read_view include memory allocated both for system read views (snapshot, replication) and user read views (EE-only). They should be non-zero only if there are open read views. To list all open read views, use box.read_view.list().

Closes #8501
Closes https://github.com/tarantool/tarantool-ee/issues/143

Closes tarantool#8501

@TarantoolBot document
Title: Document memtx read view statistics

New entries have been added to `box.stat.memtx()` output:

```
tarantool> box.stat.memtx().data
---
- garbage: 0
  total: 24986
  read_view: 0
...

tarantool> box.stat.memtx().index
---
- read_view: 0
  total: 933888
...
```

`data` shows how much memory is allocated for memtx tuples:
 - `data.total` - total amount of memory allocated for data tuples.
   This includes `data.read_view` and `data.garbage` plus tuples that
   are actually stored in memtx spaces.
 - `data.read_view` - memory held for read views.
 - `data.garbage` - memory that is unused and scheduled to be freed
   (freed lazily on memory allocation).

`index` shows how much memory is allocated for memtx index extents:
 - `index.total` - total amount of memory allocated for indexing data.
   This includes `index.read_view` plus memory used for indexing tuples
   that are actually stored in memtx spaces.
 - `index.read_view` - memory held for read views.

All numbers are given in bytes.

`data.read_view` and `index.read_view` include memory allocated both for
system read views (snapshot, replication) and user read views (EE-only).
They should be non-zero only if there are open read views. To list all
open read views, use `box.read_view.list()`.
@github-advanced-security
Copy link

You have successfully added a new CodeQL configuration /language:cpp. As part of the setup process, we have scanned this repository and found 21 existing alerts. Please check the repository Security tab to see all alerts.

@coveralls
Copy link

Coverage Status

Coverage: 85.641% (+0.01%) from 85.631% when pulling 7e8c593 on locker:memtx-read-view-stats into bd4c667
on tarantool:master
.

@alyapunov alyapunov assigned locker and unassigned alyapunov Mar 29, 2023
@locker locker added the full-ci Enables all tests for a pull request label Mar 29, 2023
@locker locker merged commit a75f4b7 into tarantool:master Mar 30, 2023
@locker locker deleted the memtx-read-view-stats branch March 30, 2023 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
full-ci Enables all tests for a pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Memtx read view statistics
3 participants