mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 10:25:47 +02:00
chore: measure rss memory and track its peak (#2054)
Up until know we did not have cached rss metric in the process. This PR consolidates caching of all values together inside the EngineShard periodic fiber code. Also, we know expose rss_mem_current that can be used internally for identifying memory pressuring periods during the process run. Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
parent
d9cb7453fb
commit
15f54be762
4 changed files with 45 additions and 31 deletions
|
@ -175,6 +175,9 @@ const char* RdbTypeName(unsigned type);
|
|||
// Cached values, updated frequently to represent the correct state of the system.
|
||||
extern std::atomic_uint64_t used_mem_peak;
|
||||
extern std::atomic_uint64_t used_mem_current;
|
||||
extern std::atomic_uint64_t rss_mem_current;
|
||||
extern std::atomic_uint64_t rss_mem_peak;
|
||||
|
||||
extern size_t max_memory_limit;
|
||||
|
||||
// malloc memory stats.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue