Comment 3 for bug 1704786

Revision history for this message
Arnon Yaari (arnony) wrote :

The problem with using max_over_subscription_ratio to calculate free virtual capacity based on free physical capacity is that this ratio is not constant and will not lead to the correct value.

Here are two examples, similar to what I wrote above:

1. Physical capacity: 1 TB. Virtual capacity: 1.2 TB. Provisioned capacity: 200 GB. Written data: 100 GB. In this case: free physical: 900 GB, free virtual: 1TB. ratio would be 1000/900 = 1.11
2. Same as above but now we write more data - 200 GB. Now free physical is 800 GB and free virtual is still 1 TB. Ratio is now 1.25.

i.e. we cannot calculate free virtual capacity based on free physical capacity with a constant ratio. The calculation in CapacityFilter is not correct, and it's not a matter of opinion of what we decide this ratio is.

Since we're using a constant ratio, this ratio *has* to be between totals and not between currently allocated and written. Cinder also treats it like that in every other place in the code.

I'm not sure how other data being stored on the same pool changes that (and isn't that what "reserved" is for?)