You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-5500 This patch adds cgroup v2 support with some sanity checks for (#2850)
values reported by cgroups v1
This commit is contained in:
@ -31,14 +31,17 @@ namespace utils
|
||||
class CGroupConfigurator
|
||||
{
|
||||
public:
|
||||
enum CGroupVersions
|
||||
{
|
||||
v1,
|
||||
v2,
|
||||
};
|
||||
CGroupConfigurator();
|
||||
virtual ~CGroupConfigurator();
|
||||
|
||||
uint32_t getNumCores();
|
||||
uint64_t getTotalMemory();
|
||||
uint64_t getFreeMemory();
|
||||
uint64_t getTotalSwapSpace();
|
||||
uint64_t getSwapInUse();
|
||||
|
||||
bool usingCGroup()
|
||||
{
|
||||
@ -52,20 +55,16 @@ class CGroupConfigurator
|
||||
uint64_t getTotalMemoryFromCGroup();
|
||||
uint64_t getFreeMemoryFromProc();
|
||||
uint64_t getMemUsageFromCGroup();
|
||||
uint64_t getTotalSwapFromSysinfo();
|
||||
int64_t getTotalMemAndSwapFromCGroup();
|
||||
uint64_t getSwapInUseFromSysinfo();
|
||||
int64_t getSwapInUseFromCGroup();
|
||||
|
||||
std::string memUsageFilename;
|
||||
std::string usedSwapFilename;
|
||||
|
||||
std::string cGroupName;
|
||||
std::string memUsageFilename;
|
||||
std::string memStatePrefix;
|
||||
bool cGroupDefined;
|
||||
config::Config* config;
|
||||
uint64_t totalMemory;
|
||||
uint64_t totalSwap;
|
||||
bool printedWarning;
|
||||
uint64_t totalMemory = 0;
|
||||
uint64_t totalSwap = 0;
|
||||
bool printedWarning = false;
|
||||
enum CGroupVersions cGroupVersion_;
|
||||
};
|
||||
|
||||
} // namespace utils
|
||||
|
Reference in New Issue
Block a user