-
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #271 from chdb-io/chv24.8.4.13-lts
Update ClickHouse engine to v24.8.4.13-lts
- Loading branch information
Showing
2,700 changed files
with
103,043 additions
and
56,908 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#include <base/Numa.h> | ||
|
||
#include "config.h" | ||
|
||
#if USE_NUMACTL | ||
# include <numa.h> | ||
#endif | ||
|
||
namespace DB | ||
{ | ||
|
||
std::optional<size_t> getNumaNodesTotalMemory() | ||
{ | ||
std::optional<size_t> total_memory; | ||
#if USE_NUMACTL | ||
if (numa_available() != -1) | ||
{ | ||
auto * membind = numa_get_membind(); | ||
if (!numa_bitmask_equal(membind, numa_all_nodes_ptr)) | ||
{ | ||
total_memory.emplace(0); | ||
auto max_node = numa_max_node(); | ||
for (int i = 0; i <= max_node; ++i) | ||
{ | ||
if (numa_bitmask_isbitset(membind, i)) | ||
*total_memory += numa_node_size(i, nullptr); | ||
} | ||
} | ||
|
||
numa_bitmask_free(membind); | ||
} | ||
|
||
#endif | ||
return total_memory; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#pragma once | ||
|
||
#include <optional> | ||
|
||
namespace DB | ||
{ | ||
|
||
/// return total memory of NUMA nodes the process is bound to | ||
/// if NUMA is not supported or process can use all nodes, std::nullopt is returned | ||
std::optional<size_t> getNumaNodesTotalMemory(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#pragma once | ||
|
||
#include <cstdlib> | ||
#include <memory> | ||
#include <string> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.