Repository navigation
Apply max_network_bandwidth_for_{user,all_users} to remote filesystem reads/writes - #103080
Conversation
|
Workflow [PR], commit [b832d8c] Summary: ❌
AI ReviewSummaryThis PR wires Tests
ClickHouse Rules
Final Verdict
|
8fc2f83 to
4858ab5
Compare
4858ab5 to
f888d47
Compare
f888d47 to
63955a8
Compare
63955a8 to
0094150
Compare
Attribute throttling performed by `max_network_bandwidth_for_user` and
`max_network_bandwidth_for_all_users` to dedicated profile events
(`UserThrottler{Bytes,SleepMicroseconds}` and
`AllUsersThrottler{Bytes,SleepMicroseconds}`), so that their contribution
is visible in `system.query_log.ProfileEvents` next to the existing
per-query / per-server throttlers.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
0094150 to
d3ad257
Compare
…rites `max_network_bandwidth_for_user` and `max_network_bandwidth_for_all_users` used to limit only the distributed network layer. Extend them so that the same per-user / per-all-users bandwidth caps also apply to reads from and writes to remote filesystems (e.g. S3), in addition to any per-query `max_remote_read_network_bandwidth` / `max_remote_write_network_bandwidth` on top. Local filesystem IO is unaffected, since this setting is about network bandwidth. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
d3ad257 to
8251291
Compare
…lection Files like `ProfileEvents.cpp`, `Settings.cpp`, `SettingsChangesHistory.cpp`, `ErrorCodes.cpp`, and `CurrentMetrics.cpp` are pure declaration registries — every query emits profile events and reads settings, so coverage for any changed line in these files matches thousands of tests. A typical PR only adds a new `extern const Event ...` line, yet the targeted check picks up every `profile_events` / `system_processes` / `system_events` test in the suite. Example: #103080 added 4 lines to `src/Common/ProfileEvents.cpp` and dozens of unrelated profile-events tests were selected via the broad-tier2 path. Skip these files in the coverage, sibling, indirect, and keyword-fallback passes. The real signal for such PRs lives in the other files they touch (e.g. `Context.cpp`, `ProcessList.cpp`), which remain fully analyzed.
7d31f44 to
4ebd99b
Compare
|
Actually this implementation (and non global throttling in general) may not work, since with current implementation it can lead to blocking thread pool that is used for reads, so if some user will throttle, others may be blocked by it (if the thread pool will not be big enough), ideally, we need something better then just sleep before read. Though the same problem we have everywhere... |
Yes, this is a problem but it is unrelated problem, I would say. For now, the best thing we can rely on is that number of queries can be limited for user. And number of IO threads is limited per query. And yes, indeed this PR will not help to resolve it. Independent per user limits will only create more waiting threads. |
Cherry pick #103080 to 26.1: Apply max_network_bandwidth_for_{user,all_users} to remote filesystem reads/writes
…sers} to remote filesystem reads/writes
Cherry pick #103080 to 26.2: Apply max_network_bandwidth_for_{user,all_users} to remote filesystem reads/writes
…sers} to remote filesystem reads/writes
Cherry pick #103080 to 26.3: Apply max_network_bandwidth_for_{user,all_users} to remote filesystem reads/writes
…sers} to remote filesystem reads/writes
|
Backports will include #103387 as well |
Backport #103080 to 26.1: Apply max_network_bandwidth_for_{user,all_users} to remote filesystem reads/writes
Backport #103080 to 26.3: Apply max_network_bandwidth_for_{user,all_users} to remote filesystem reads/writes
Backport #103080 to 26.2: Apply max_network_bandwidth_for_{user,all_users} to remote filesystem reads/writes
Backport #103080 to 26.4: Apply max_network_bandwidth_for_{user,all_users} to remote filesystem reads/writes
…user,all_users} to remote filesystem reads/writes
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Apply
max_network_bandwidth_for_user/max_network_bandwidth_for_all_usersto remote filesystem reads/writesmax_network_bandwidth_for_userandmax_network_bandwidth_for_all_usersused to limit only the distributed network layer. Extend them so that the same per-user / per-all-users bandwidth caps also apply to reads/writes from remote filesystems (e.g. S3), in addition to any per-querymax_remote_read_network_bandwidthlimit on top.Note: historically we use separate settings for limiting reading from remote, but I did not want to introduce more extra settings, curious what your opinion on this
Version info
26.5.1.13(included in26.5and later)26.4.5.108,26.3.10.32