You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
global-sort: reduce number of SST ingested into TiKV #59962
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
currently, global sort always split data into ranges of 96M, but TiKV already increased the default region size to 256M now, so we will ingest 3 SST files per region.
for import-into see
This is the size of ingest job. And the reason why it's different with region size is to increase the concurency. In historical feature development TiKV can set ~10GB per region (dynamic region feature), and lightning must choose a smaller value to increase concurrency. At that time I chose the traditional default value 96MB. So if now it's a bottleneck of import performance, the value can be adjusted again. The value should not be too large to keep a proper overall concurrency.
Activity
D3Hunter commentedon Mar 7, 2025
local sort, including lightning, add-index local sort, import-into local sort, all have similar issue
lance6716 commentedon Mar 7, 2025
tidb/pkg/disttask/importinto/planner.go
Lines 550 to 551 in bf21e59
This is the size of ingest job. And the reason why it's different with region size is to increase the concurency. In historical feature development TiKV can set ~10GB per region (dynamic region feature), and lightning must choose a smaller value to increase concurrency. At that time I chose the traditional default value 96MB. So if now it's a bottleneck of import performance, the value can be adjusted again. The value should not be too large to keep a proper overall concurrency.
D3Hunter commentedon Mar 7, 2025
actually, the ingest job data size is determined by min(this
range size,region split size)see the link PR too
kennedy8312 commentedon Mar 10, 2025
Related to issue/feature: tikv/tikv#17309
Related to PR: tikv/tikv#17311
globalsort: reduce number of SST ingested into TiKV (#59870)
globalsort: reduce number of SST ingested into TiKV (pingcap#59870)
globalsort: reduce number of SST ingested into TiKV (pingcap#59870)
D3Hunter commentedon Mar 18, 2025
with region-size=256M, after #60045, the
sst-count:region-countafter ingest is about 1.6, there is still space to optimizeglobalsort: reduce number of SST ingested into TiKV (pingcap#59870) (p…
globalsort: reduce number of SST ingested into TiKV (pingcap#59870) (p…
globalsort: reduce number of SST ingested into TiKV (#59870) (#60045) (…
globalsort: reduce number of SST ingested into TiKV (pingcap#59870) (p…