-
Notifications
You must be signed in to change notification settings - Fork 753
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
feat(query): Reduce serialisation memory usage when spilling to local disk #16580
Conversation
8a8b4c5
to
4d01ff4
Compare
Signed-off-by: coldWater <[email protected]>
Signed-off-by: coldWater <[email protected]>
Signed-off-by: coldWater <[email protected]>
Signed-off-by: coldWater <[email protected]>
Signed-off-by: coldWater <[email protected]>
4d01ff4
to
64488ec
Compare
Docker Image for PR
|
benchmark: dataset: tpch sf100 settings:
sql EXPLAIN ANALYZE SELECT
l_orderkey,
l_partkey,
l_quantity,
l_extendedprice,
ROW_NUMBER() OVER (PARTITION BY l_orderkey ORDER BY l_extendedprice DESC) AS row_num,
RANK() OVER (PARTITION BY l_orderkey ORDER BY l_extendedprice DESC) AS rank_num
FROM
lineitem ignore_result; remote only
local only
mix
The local spill is very sensitive to disk io performance. The local test environment is a dynamic vhdx over ssd, and as soon as the free disk space is reduced, the overall performance drops drastically, and the query time becomes 5 times that of the previous one. cloud dev (updated)
The cloud dev environment is weird
These are all things I haven't encountered in local testing. |
Signed-off-by: coldWater <[email protected]>
Signed-off-by: coldWater <[email protected]>
Docker Image for PR
|
disable dio when in the cloud: (update: buf io write, dio read)
After turning off dio although the write elapsed time was reduced, the read elapsed time increased dramatically. This should be determined by the underlying implementation of block storage in cloud environments. |
After disabling DIO, the local spill write speed is 30 times that of the remote spill, may be the data is written to the page cache. |
Signed-off-by: coldWater <[email protected]>
Signed-off-by: coldWater <[email protected]>
Docker Image for PR
|
buf io read and write
|
Signed-off-by: coldWater <[email protected]>
17799e3
to
f315c1e
Compare
Signed-off-by: coldWater <[email protected]>
8ec1cdf
to
49dde3e
Compare
Docker Image for PR
|
Signed-off-by: coldWater <[email protected]>
Docker Image for PR
|
remote spill
local spill dio
local spill buffer io
|
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.
LGTM !
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
Changes:
enable_dio
to disable direct io, i.e. use buffer io to read and write files.Tests
Type of change
This change is