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 4 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 7 slots, allocated 7 slots.
Consumer B has demand for 5 slots, allocated 5 slots.
Consumer C now has demand for 1 slot.
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 3 slots, consumer B is overallocated by 1 slot. As a result, the system reclaims 1 slot from consumer A 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 has demand for 500 and is now allocated 20 slots. Consumer B1 has demand for 500 and is allocated 80 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 A’s ratio is 1, consumer B’s ratio is 4, so out of 100 slots in the share pool, consumer A should get 20, consumer B, 80. Currently, consumer A and consumer B are allocated according to share ratio.
Consumer B1’s ratio is 25, Consumer B2’s ratio is 75. As a result, consumer B1 should get 20, consumer B2 60. Consumer B1 is allocated 80 slots. As a result, 60 slots are reclaimed from B1 and allocated to B2.