Skip to content
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 over provision factor #229

Merged
merged 2 commits into from
Nov 10, 2023
Merged

Add over provision factor #229

merged 2 commits into from
Nov 10, 2023

Conversation

WanzenBug
Copy link
Member

Adds a new overprovision parameter that calculates the capacity of a given
storage pool based on the existing reserved space.

While we would like to use LINSTOR directly for that, it does not seem to
be implemented: the "query-size-info" call seems to return inconsistent
results.

The advantage of the new parameter is that people can opt-in to this new
calculation by setting the parameter.

This also adds a cache for the call to Resources.GetResourceView(), as the CapacityBytes() is one of the "hottest" code paths, and we don't actually need to monitor the usage that closely.

@WanzenBug WanzenBug force-pushed the over-provision-factor branch from 0a16f92 to 6cc3906 Compare November 9, 2023 13:38
Adds a new overprovision parameter that calculates the capacity of a given
storage pool based on the existing reserved space.

While we would like to use LINSTOR directly for that, it does not seem to
be implemented: the "query-size-info" call seems to return inconsistent
results.

The advantage of the new parameter is that people can opt-in to this new
calculation by setting the parameter.

Signed-off-by: Moritz Wanzenböck <[email protected]>
@WanzenBug WanzenBug force-pushed the over-provision-factor branch from 6cc3906 to dca9d70 Compare November 9, 2023 13:43
@WanzenBug WanzenBug requested a review from rck November 9, 2023 13:47
Copy link
Member

@rck rck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 comment and in general: hm, and that can not be changed or fixed in LINSTOR?

pkg/linstor/highlevelclient/high_level_client.go Outdated Show resolved Hide resolved
With the addition of the overprovision parameter, we potentially start a lot
of requests for the resource view. So we add a cache for this call, in the
same way we have a cache for the node state and storage pools.

Signed-off-by: Moritz Wanzenböck <[email protected]>
@WanzenBug WanzenBug force-pushed the over-provision-factor branch from dca9d70 to add38c4 Compare November 9, 2023 14:32
@WanzenBug
Copy link
Member Author

that can not be changed or fixed in LINSTOR?

Yes and no. There are multiple issue along the way:

  • The query-size-info call returns unexpected results, not taking into account the overprovision factor
  • When CapacityBytes is called, there is not necessarily a RG available
  • The way the results are generated by query-size-info (i.e. available space on each node) is not compatible with the way the information is queried by LINSTOR CSI: limiting the result to just one node is not possible AFAIK

In general, I would like to see this moved to LINSTOR, but I fear it will take a LINSTOR v2 to get around to it. Perhaps then we also have an AutoPlacer that supports all the requirements one can already specify in LINSTOR CSI :-)

@rck rck merged commit 9737c1a into master Nov 10, 2023
5 checks passed
@rck rck deleted the over-provision-factor branch November 10, 2023 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants