Skip to content
Snippets Groups Projects
Commit 4240860f authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Roman Tsisyk
Browse files

Add box.info.memory() to report aggregated memory statistics

This patch adds a new function, box.info.memory(). The functions returns
a table with the following fields:

 - data - size of memory in bytes used for storing user data (i.e.
   tuples) in memtx and in vinyl level 0, without taking into account
   memory fragmentation.

 - index - size of memory in bytes used for indexing user data. This
   includes memtx and vinyl memory tree extents, vinyl page index, vinyl
   bloom filters.

 - cache - size of memory in bytes used for caching user data. Memtx
   doesn't have cache so basically this is the size of the vinyl tuple
   cache.

 - tx - size of memory in bytes used up by active transactions. For
   vinyl it is the total size of all allocated struct txv, struct vy_tx,
   struct vy_read_interval, plus tuples pinned by those objects. For
   memtx it is going to be 0 for now as memtx transaction manager
   shouldn't consume much memory. We may want to account struct txn and
   struct txn_stmt there too in future.

 - net - size of memory in bytes used up by network input and output
   buffers.

 - lua - size of memory used by the Lua runtime.

It is supposed to be used by the admin to get a general knowledge about
what's going on with a particular tarantool instance. For more info, per
subsystem statistics are supposed to be used (e.g. box.info.vinyl()).

Closes #934
parent 8516cbc3
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment