Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include <mem-info.h>
Static Public Member Functions | |
static void | Init () |
Initialize MemInfo. More... | |
static int64_t | physical_mem () |
Get total physical memory in bytes (ignores cgroups memory limits). More... | |
static int32_t | vm_overcommit () |
Returns the systems memory overcommit settings, typically the values are 0,1, and 2. More... | |
static int64_t | commit_limit () |
static std::string | DebugString () |
Static Private Member Functions | |
static void | ParseOvercommit () |
Static Private Attributes | |
static bool | initialized_ = false |
static int64_t | physical_mem_ = -1 |
static int32_t | vm_overcommit_ = -1 |
Indicating the kernel overcommit settings. More... | |
static int64_t | commit_limit_ = -1 |
If overcommit is turned off the maximum allocatable memory. More... | |
Provides the amount of physical memory available. Populated from /proc/meminfo. TODO: Allow retrieving of cgroup memory limits, e.g., by checking /sys/fs/cgroup/memory/groupname/impala/memory.limit_in_bytes TODO: Combine mem-info, cpu-info and disk-info into hardware-info?
Definition at line 30 of file mem-info.h.
|
inlinestatic |
Returns the systems memory commit limit. This value is only of importance if the memory overcommit setting is set to 2.
Definition at line 49 of file mem-info.h.
References commit_limit_, and initialized_.
Referenced by impala::ExecEnv::StartServices(), and impala::TEST().
|
static |
Definition at line 96 of file mem-info.cc.
References initialized_, physical_mem_, and impala::PrettyPrinter::Print().
Referenced by impala::Webserver::RootHandler().
|
static |
Initialize MemInfo.
Definition at line 54 of file mem-info.cc.
References commit_limit_, initialized_, impala::ParseMemString(), ParseOvercommit(), and physical_mem_.
|
staticprivate |
|
inlinestatic |
Get total physical memory in bytes (ignores cgroups memory limits).
Definition at line 36 of file mem-info.h.
References initialized_, and physical_mem_.
Referenced by impala::QuerySchedule::GetPerHostMemoryEstimate(), impala::MemTracker::GetQueryMemTracker(), ParseMemValue(), impala::RequestPoolService::RequestPoolService(), impala::ExecEnv::StartServices(), and impala::TEST().
|
inlinestatic |
Returns the systems memory overcommit settings, typically the values are 0,1, and 2.
Definition at line 42 of file mem-info.h.
References initialized_, and vm_overcommit_.
Referenced by impala::ExecEnv::StartServices(), and impala::TEST().
|
staticprivate |
If overcommit is turned off the maximum allocatable memory.
Definition at line 73 of file mem-info.h.
Referenced by commit_limit(), and Init().
|
staticprivate |
Definition at line 60 of file mem-info.h.
Referenced by commit_limit(), DebugString(), Init(), physical_mem(), and vm_overcommit().
|
staticprivate |
Definition at line 61 of file mem-info.h.
Referenced by DebugString(), Init(), and physical_mem().
|
staticprivate |
Indicating the kernel overcommit settings.
See https://www.kernel.org/doc/Documentation/filesystems/proc.txt for more details on the specific meaning of the below variables and https://www.kernel.org/doc/Documentation/vm/overcommit-accounting for more details on overcommit accounting.
Definition at line 70 of file mem-info.h.
Referenced by ParseOvercommit(), and vm_overcommit().