Let us use the same example used for when the feature is not enabled.
There are three consumers: A, B, C. There are no subconsumers.
All consumers have demand for 6 slots.
Behavior is exactly the same as when resource reclaim based on share ratio is not enabled.
Behavior is exactly the same as when resource reclaim based on share ratio is not enabled.
Building on the previous example:
Consumer A has demand for 10 slots, allocated 9 slots.
Consumer B has demand for 10 slots, allocated 9 slots.
Consumer C now has demand for 2 slots.
To determine from which consumer slots should be reclaimed, the system looks at the share ratio across the entire consumer tree. The share ratio is 1:1:1.
So, to distribute slots according to share ratio, the sytem identifies which consumer is the most overallocated. In this case, consumer A is overallocated by 1 slot and consumer B is also overallocated by 1 slot. As a result, the system reclaims 1 slot from each consumer (A and B) to allocate to consumer C.
There are two top-level consumers: Consumer A and Consumer B. The share ratio is Consumer A: 1, Consumer B: 4
In Consumer B, we have leaf consumers B1 and B2. The share ratio is: Consumer B1:25, Consumer B2: 75.
Consumer A has demand for 100 slots. Only consumer A has demand, so the total share pool is distributed 100% to Consumer A.
Building on the previous example, consumer A is now allocated 100 slots.
B1 now has demand for 500 slots.
Since consumer B1 has demand, consumer B is considered to have demand by the system.
The system considers the share ratio across the entire tree to reclaim slots. Consumer A’s ratio is 1, consumer B’s ratio is 4, so out of 100 slots, consumer A should get 20, consumer B, 80.
80 slots are reclaimed from consumer A and allocated to consumer B. Consumer B is a top-level consumer, so its leaf consumers are considered.
Consumer B1 has demand. Consumer B2 has no demand. As a result, consumer B1 gets 100% of the slots (80 slots).
Building on the previous example, consumer A now has no demand. Consumer B1 has demand for 500 and is allocated 100 slots.
B2 now has demand for 100 slots.
As a result, slots need to be reclaimed. The system evaluates the share ratio of the entire consumer tree. There is demand across all consumers.
Consumer B1’s ratio is 25, Consumer B2’s ratio is 75. As a result, consumer B1 should get 25, consumer B2 75. Consumer B1 is currently allocated 100 slots. As a result, 75 slots are reclaimed from B1 and allocated to B2.