New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[native] Add reserved memory capacity configs #22593
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,8 @@ | |
* limitations under the License. | ||
*/ | ||
|
||
#include "presto_cpp/main/common/ConfigReader.h" | ||
#include "presto_cpp/main/common/Configs.h" | ||
#include "presto_cpp/main/common/ConfigReader.h" | ||
#include "presto_cpp/main/common/Utils.h" | ||
#include "velox/core/QueryConfig.h" | ||
|
||
|
@@ -185,6 +185,7 @@ SystemConfig::SystemConfig() { | |
BOOL_PROP(kUseMmapAllocator, true), | ||
STR_PROP(kMemoryArbitratorKind, ""), | ||
NUM_PROP(kQueryMemoryGb, 38), | ||
NUM_PROP(kQueryReservedMemoryGb, 4), | ||
BOOL_PROP(kEnableVeloxTaskLogging, false), | ||
BOOL_PROP(kEnableVeloxExprSetLogging, false), | ||
NUM_PROP(kLocalShuffleMaxPartitionBytes, 268435456), | ||
|
@@ -462,12 +463,22 @@ int32_t SystemConfig::queryMemoryGb() const { | |
return optionalProperty<int32_t>(kQueryMemoryGb).value(); | ||
} | ||
|
||
int32_t SystemConfig::queryReservedMemoryGb() const { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this 32 bit vs 64 bit usage in other places ? Might be good to keep it uniform. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is just to be the same type as queryMemoryGb. We could uniform these config settings in followup. Thanks! |
||
return optionalProperty<int32_t>(kQueryReservedMemoryGb).value(); | ||
} | ||
|
||
uint64_t SystemConfig::memoryPoolInitCapacity() const { | ||
static constexpr uint64_t kMemoryPoolInitCapacityDefault = 128 << 20; | ||
return optionalProperty<uint64_t>(kMemoryPoolInitCapacity) | ||
.value_or(kMemoryPoolInitCapacityDefault); | ||
} | ||
|
||
uint64_t SystemConfig::memoryPoolReservedCapacity() const { | ||
static constexpr uint64_t kMemoryPoolReservedCapacityDefault = 64 << 20; | ||
return optionalProperty<uint64_t>(kMemoryPoolReservedCapacity) | ||
.value_or(kMemoryPoolReservedCapacityDefault); | ||
} | ||
|
||
uint64_t SystemConfig::memoryPoolTransferCapacity() const { | ||
static constexpr uint64_t kMemoryPoolTransferCapacityDefault = 32 << 20; | ||
return optionalProperty<uint64_t>(kMemoryPoolTransferCapacity) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uint32_t ?