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
Showing
- src/box/engine.c 9 additions, 0 deletionssrc/box/engine.c
- src/box/engine.h 21 additions, 0 deletionssrc/box/engine.h
- src/box/lua/info.c 50 additions, 4 deletionssrc/box/lua/info.c
- src/box/memtx_engine.c 22 additions, 0 deletionssrc/box/memtx_engine.c
- src/box/memtx_tuple.h 3 additions, 0 deletionssrc/box/memtx_tuple.h
- src/box/sysview_engine.c 9 additions, 0 deletionssrc/box/sysview_engine.c
- src/box/vinyl.c 24 additions, 0 deletionssrc/box/vinyl.c
- src/lib/small 1 addition, 1 deletionsrc/lib/small
- test/box/info.result 1 addition, 0 deletionstest/box/info.result
Loading
Please register or sign in to comment