You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2024/01/03 03:25:06 UTC
(doris) branch master updated: [fix](memory) Fix mem tracker web page notice #29361
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new be1d9c33589 [fix](memory) Fix mem tracker web page notice #29361
be1d9c33589 is described below
commit be1d9c335891a57b124a8fde55a96af992886ae7
Author: Xinyi Zou <zo...@gmail.com>
AuthorDate: Wed Jan 3 11:25:00 2024 +0800
[fix](memory) Fix mem tracker web page notice #29361
---
be/src/http/default_path_handlers.cpp | 26 +++++++++++++++++---------
be/src/runtime/memory/mem_tracker_limiter.cpp | 8 ++++----
2 files changed, 21 insertions(+), 13 deletions(-)
diff --git a/be/src/http/default_path_handlers.cpp b/be/src/http/default_path_handlers.cpp
index b997a3466c9..39a75b7ccab 100644
--- a/be/src/http/default_path_handlers.cpp
+++ b/be/src/http/default_path_handlers.cpp
@@ -160,15 +160,23 @@ void mem_tracker_handler(const WebPageHandler::ArgumentMap& args, std::stringstr
MemTrackerLimiter::Type::EXPERIMENTAL);
}
} else {
- (*output) << "<h4>*Note: (see documentation for details)</h4>\n";
- (*output) << "<h4> 1.`/mem_tracker?type=global` to view the memory statistics of each "
- "type, `global`life cycle is the same as the process, e.g. each Cache, "
- "StorageEngine, each Manager.</h4>\n";
- (*output) << "<h4> 2.`/mem_tracker` counts virtual memory, which is equal to `Actual "
- "memory used` in `/memz`</h4>\n";
- (*output) << "<h4> 3.`process` is equal to the sum of all types of memory, "
- "`/mem_tracker` can be logically divided into 4 layers: 1)`process` 2)`type` "
- "3)`query/load/compation task etc.` 4)`exec node etc.`</h4>\n";
+ (*output) << "<h4>*Notice:</h4>\n";
+ (*output) << "<h4> 1. MemTracker only counts the memory on part of the main execution "
+ "path, "
+ "which is usually less than the real process memory.</h4>\n";
+ (*output) << "<h4> 2. each `type` is the sum of a set of tracker values, "
+ "`sum of all trackers` is the sum of all trackers of all types, .</h4>\n";
+ (*output) << "<h4> 3. `process resident memory` is the physical memory of the process, "
+ "from /proc VmRSS VmHWM.</h4>\n";
+ (*output) << "<h4> 4. `process virtual memory` is the virtual memory of the process, "
+ "from /proc VmSize VmPeak.</h4>\n";
+ (*output) << "<h4> 5.`/mem_tracker?type=<type name>` to view the memory details of each "
+ "type, for example, `/mem_tracker?type=query` will list the memory of all "
+ "queries; "
+ "`/mem_tracker?type=global` will list the memory of all Cache, metadata and "
+ "other "
+ "global life cycles.</h4>\n";
+ (*output) << "<h4>see documentation for details.";
MemTrackerLimiter::make_process_snapshots(&snapshots);
}
diff --git a/be/src/runtime/memory/mem_tracker_limiter.cpp b/be/src/runtime/memory/mem_tracker_limiter.cpp
index 60ad66bfbdd..a4a8d61928d 100644
--- a/be/src/runtime/memory/mem_tracker_limiter.cpp
+++ b/be/src/runtime/memory/mem_tracker_limiter.cpp
@@ -148,7 +148,7 @@ void MemTrackerLimiter::make_process_snapshots(std::vector<MemTracker::Snapshot>
all_tracker_mem_sum += it.second->current_value();
}
- snapshot.type = "tc/jemalloc_free_memory";
+ snapshot.type = "tc/jemalloc cache";
snapshot.label = "";
snapshot.limit = -1;
snapshot.cur_consumption = MemInfo::allocator_cache_mem();
@@ -156,21 +156,21 @@ void MemTrackerLimiter::make_process_snapshots(std::vector<MemTracker::Snapshot>
(*snapshots).emplace_back(snapshot);
all_tracker_mem_sum += MemInfo::allocator_cache_mem();
- snapshot.type = "all_tracker_sum (is virtual memory)";
+ snapshot.type = "sum of all trackers"; // is virtual memory
snapshot.label = "";
snapshot.limit = -1;
snapshot.cur_consumption = all_tracker_mem_sum;
snapshot.peak_consumption = -1;
(*snapshots).emplace_back(snapshot);
- snapshot.type = "process resident memory (from /proc VmRSS VmHWM)";
+ snapshot.type = "process resident memory"; // from /proc VmRSS VmHWM
snapshot.label = "";
snapshot.limit = -1;
snapshot.cur_consumption = PerfCounters::get_vm_rss();
snapshot.peak_consumption = PerfCounters::get_vm_hwm();
(*snapshots).emplace_back(snapshot);
- snapshot.type = "process virtual memory (from /proc VmSize VmPeak)";
+ snapshot.type = "process virtual memory"; // from /proc VmSize VmPeak
snapshot.label = "";
snapshot.limit = -1;
snapshot.cur_consumption = PerfCounters::get_vm_size();
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org