docs: add scalability guidance#1413
Conversation
Signed-off-by: xueyuan <xueyuan@tode.com>
mgovers
left a comment
There was a problem hiding this comment.
Hi @william-xue,
It looks like you're using AI to help generate this code (I'm also looking at #1412). While it is OK to do so, please make sure to check whether the original question is actually resolved. This will help reduce the workload on maintainers. It is also strongly recommended to first resolve open PR's you're working on to reduce the simultaneous work.
| ## Scalability | ||
|
|
||
| The calculation workload generally depends on the number of connected grid elements and on the network topology. | ||
| For radial distribution grids, most calculation steps scale close to linearly with grid size. |
There was a problem hiding this comment.
| For radial distribution grids, most calculation steps scale close to linearly with grid size. | |
| For radial distribution grids, all calculation steps scale (amortized) linearly with grid size. |
It's probably also good to explicitly state that it is O(n_nodes + n_branches + ...)
|
|
||
| The calculation workload generally depends on the number of connected grid elements and on the network topology. | ||
| For radial distribution grids, most calculation steps scale close to linearly with grid size. | ||
| Meshed grids require more coupling between buses and branches, so some steps can scale less favorably. |
There was a problem hiding this comment.
| Meshed grids require more coupling between buses and branches, so some steps can scale less favorably. | |
| Meshed grids require more coupling between buses and branches and will result in quadratic scaling in the largest loop in the mesh (worst case: `O(n_nodes * n_branches)`) |
| In both cases, runtime and memory usage are also affected by the number of batch scenarios, the amount of update data per | ||
| scenario, and whether the topology can be reused between scenarios. | ||
|
|
||
| ```{note} |
There was a problem hiding this comment.
this note should not be part of this section; please restore the original order
| Meshed grids require more coupling between buses and branches, so some steps can scale less favorably. | ||
| In both cases, runtime and memory usage are also affected by the number of batch scenarios, the amount of update data per | ||
| scenario, and whether the topology can be reused between scenarios. | ||
|
|
There was a problem hiding this comment.
Since someone reading this is interested in scalabiltity, and we've already done the full analysis in https://github.com/orgs/PowerGridModel/discussions/24 , please:
- explicitly provide the scalings (i.e. it should be a summary/conclusion of https://github.com/orgs/PowerGridModel/discussions/24)
- explicitly refer to https://github.com/orgs/PowerGridModel/discussions/24 for reference + extensive details
|
Hello @william-xue, will you continue working on this PR? |
|
Thanks for the feedback. I checked this against #1096 again and agree the current short paragraph does not fully capture the discussion it was meant to summarize. To avoid leaving maintainers with an incomplete patch, I am going to close this PR rather than keep iterating on a partial version. |
|
Closing this because the current change does not fully resolve #1096. Thanks for reviewing. |
|
@william-xue If you ever want to come back to issue #1096, you are always welcome. Also, feel free to take a look at any of our other issues and work on them. If you need any help, don't hesitate to contact the maintainers. Thank you! |
Summary
Adds a short scalability section to the performance guide, covering radial versus meshed grid behavior and the batch-related factors that affect runtime and memory use.
Closes #1096.
Validation
git diff --check