Skip to content
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

Use DorisVector to avoid memory usage from not being traced #41557

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

mrhhsg
Copy link
Member

@mrhhsg mrhhsg commented Oct 8, 2024

Proposed changes

And merge hash table of agg in thread of pipeline tasks.

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@@ -23,8 +23,8 @@
template <class T, typename MemoryAllocator = Allocator<true>>
class CustomStdAllocator;

template <typename T>
using DorisVector = std::vector<T, CustomStdAllocator<T>>;
template <typename T, bool clean_memory = false>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to clear_memory

@@ -53,6 +53,9 @@ Status AggLocalState::init(RuntimeState* state, LocalStateInfo& info) {
_hash_table_size_counter =
ADD_COUNTER_WITH_LEVEL(Base::profile(), "HashTableSize", TUnit::UNIT, 1);

_container_memory_usage = ADD_COUNTER(profile(), "ContainerMemoryUsage", TUnit::BYTES);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to MemoryUsageContainer MemoryUsageArena

@mrhhsg mrhhsg force-pushed the spill_and_reserve branch 2 times, most recently from c79bf06 to b44b7a1 Compare October 9, 2024 03:05
}
}
Base::keys = input_keys.data();
}

size_t serialized_keys_size(bool is_build) const override {
return is_build ? build_arena.size() : Base::arena.size();
return is_build ? (build_stored_keys.size() * sizeof(StringRef))
: (stored_keys.size() * sizeof(StringRef));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感觉这个不对吧,这个计算的偏小了。应该加上arena

@yiguolei yiguolei merged commit f08a3bb into apache:spill_and_reserve Oct 9, 2024
12 of 15 checks passed
@mrhhsg mrhhsg deleted the spill_and_reserve branch October 9, 2024 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants