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

Introduce HybridSpillBuf #655

Open
zuston opened this issue Nov 23, 2024 · 2 comments
Open

Introduce HybridSpillBuf #655

zuston opened this issue Nov 23, 2024 · 2 comments

Comments

@zuston
Copy link
Contributor

zuston commented Nov 23, 2024

Is your feature request related to a problem? Please describe.

Digging into the OnHeapSpillManager, I found the two spill buf implementations of File based and memory based. From my sight, maybe we could introduce the HybridSpillBuf to use the memory + file based bufs in one spill buf, which will make full use of memory for best effort.

Describe the solution you'd like

Describe alternatives you've considered

Additional context

@richox
Copy link
Collaborator

richox commented Nov 24, 2024

there is another path that when on-heap memory is almost full, spill.rs will create FileSpill instead of OnHeapSpill, which spills data directly to disk file. and FileBasedSpillBuf is only used when it is spilled by other non-native operators.
so i suggest we keep OnHeapSpillManager simpler and easier to be maintained.

@zuston
Copy link
Contributor Author

zuston commented Nov 24, 2024

there is another path that when on-heap memory is almost full, spill.rs will create FileSpill instead of OnHeapSpill, which spills data directly to disk file. and FileBasedSpillBuf is only used when it is spilled by other non-native operators. so i suggest we keep OnHeapSpillManager simpler and easier to be maintained.

Yes, gotten it. But if the onHeapSpill is activated on requiring from native side when on heap memory is enough, the path mentioned above will be used that the file spill is still used if on heap is not enough when using at that time. Anyway, I think this is just a corner case improvement, that may not achieve significant improvement for performance

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

No branches or pull requests

2 participants