-
Notifications
You must be signed in to change notification settings - Fork 1.4k
misc(memory) Allow exact buffer allocation #12594
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
Conversation
✅ Deploy Preview for meta-velox canceled.
|
This pull request was exported from Phabricator. Differential Revision: D70521769 |
This pull request was exported from Phabricator. Differential Revision: D70521769 |
Summary: By default buffers are allocated up to 50% headroom : https://www.internalfb.com/code/fbsource/[cbb63d0a88c6]/fbcode/velox/common/memory/MemoryPool.cpp?lines=397 In the simple tpch demo this reduced overall data sizes by about ~6% - this scales to encoded vectors at the moment (dictionaries) and there is likely an equally large win for flat vectors given they are copied (vector copy also uses this same default buffer allocation logic). For scenarios that need to maintain long lived data this is wasteful, Enabling an optional exact allocation (size + padding) reduces this waste. Reviewed By: xiaoxmeng Differential Revision: D70521769
This pull request was exported from Phabricator. Differential Revision: D70521769 |
Summary: By default buffers are allocated up to 50% headroom : https://www.internalfb.com/code/fbsource/[cbb63d0a88c6]/fbcode/velox/common/memory/MemoryPool.cpp?lines=397 In the simple tpch demo this reduced overall data sizes by about ~6% - this scales to encoded vectors at the moment (dictionaries) and there is likely an equally large win for flat vectors given they are copied (vector copy also uses this same default buffer allocation logic). For scenarios that need to maintain long lived data this is wasteful, Enabling an optional exact allocation (size + padding) reduces this waste. Reviewed By: xiaoxmeng Differential Revision: D70521769
This pull request was exported from Phabricator. Differential Revision: D70521769 |
Summary: By default buffers are allocated up to 50% headroom : https://www.internalfb.com/code/fbsource/[cbb63d0a88c6]/fbcode/velox/common/memory/MemoryPool.cpp?lines=397 In the simple tpch demo this reduced overall data sizes by about ~6% - this scales to encoded vectors at the moment (dictionaries) and there is likely an equally large win for flat vectors given they are copied (vector copy also uses this same default buffer allocation logic). For scenarios that need to maintain long lived data this is wasteful, Enabling an optional exact allocation (size + padding) reduces this waste. Reviewed By: xiaoxmeng Differential Revision: D70521769
This pull request was exported from Phabricator. Differential Revision: D70521769 |
This pull request has been merged in 88d5156. |
Summary: Pull Request resolved: facebookincubator#12594 By default buffers are allocated up to 50% headroom : https://www.internalfb.com/code/fbsource/[cbb63d0a88c6]/fbcode/velox/common/memory/MemoryPool.cpp?lines=397 In the simple tpch demo this reduced overall data sizes by about ~6% - this scales to encoded vectors at the moment (dictionaries) and there is likely an equally large win for flat vectors given they are copied (vector copy also uses this same default buffer allocation logic). For scenarios that need to maintain long lived data this is wasteful, Enabling an optional exact allocation (size + padding) reduces this waste. Reviewed By: xiaoxmeng Differential Revision: D70521769 fbshipit-source-id: 12e8192f95a10f4c16aca2bf79619ec11ff1ce64
Summary:
By default buffers are allocated up to 50% headroom :
velox/velox/common/memory/MemoryPool.cpp
Line 397 in 89afec8
In the simple tpch demo this reduced overall data sizes by about ~6% - this scales to encoded vectors at the moment (dictionaries) and there is likely an equally large win for flat vectors given they are copied (vector copy also uses this same default buffer allocation logic).
For scenarios that need to maintain long lived data this is wasteful, Enabling an optional exact allocation (size + padding) reduces this waste.
Reviewed By: xiaoxmeng
Differential Revision: D70521769