-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add disk usage limit configuration to datafusion-cli #15586
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
Add disk usage limit configuration to datafusion-cli #15586
Conversation
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.
Thank you, it looks good to me.
A small clarification: if this config is not explicitly set, DataFusion defaults to 100 GB rather than unlimited.
Test result:
yongting@Mac ~/C/d/datafusion-cli (pr-15586) [1]> cargo run --profile release-nonlto -- --mem-pool-type fair --memory-limit 100M --disk-limit 10M -c 'select * from generate_series(1, 1000000000) as t1(v1) order by v1'
Finished `release-nonlto` profile [optimized] target(s) in 0.12s
Running `/Users/yongting/Code/datafusion/target/release-nonlto/datafusion-cli --mem-pool-type fair --memory-limit 100M --disk-limit 10M -c 'select * from generate_series(1, 1000000000) as t1(v1) order by v1'`
DataFusion CLI v46.0.1
Error: Resources exhausted: The used disk space during the spilling process has exceeded the allowable limit of 10.0 MB. Try increasing the `max_temp_directory_size` in the disk manager configuration.
datafusion-cli/src/main.rs
Outdated
#[clap( | ||
short = 'd', | ||
long, | ||
help = "Available disk space for spilling queries (e.g. '10g'), default to None (no limit)", |
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.
help = "Available disk space for spilling queries (e.g. '10g'), default to None (no limit)", | |
help = "Available disk space for spilling queries (e.g. '10g'), default to None (use DataFusion's default value of '100g')", |
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.
updated!
docs/source/user-guide/cli/usage.md
Outdated
Specify the memory pool type 'greedy' or 'fair', default to 'greedy' | ||
|
||
-d, --disk-limit <DISK_LIMIT> | ||
Available disk space for spilling queries (e.g. '10g'), default to None (no limit) |
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.
Available disk space for spilling queries (e.g. '10g'), default to None (no limit) | |
Available disk space for spilling queries (e.g. '10g'), default to None (use DataFusion's default value of '100g') |
* added disk limit option * run prettier and cargo fmt * help line update
Which issue does this PR close?
Closes #15553.
Rationale for this change
Allows users to specify a disk limit for spill queries.
What changes are included in this PR?
A CLI option for users to specify a disk limit.
Are these changes tested?
Are there any user-facing changes?
Yes, new CLI option in
datafusion-cli
.