Code Change Request

# 27720

Back to Code Changes

Christopher
Technical Support
StableBit DrivePool
2.2.0.881+
Windows 10 (64 bit)
Public
Alex

* [Issue #27720] Added explicit trace messages when pool part rebalancing or file placement rebalancing is performed.
* [Issue #27720] Got rid of the excessive and misleading "Balance not critical" log messages. That message will now be logged once and 
                 only when balancing is skipped due to it not being critical.
* [Issue #27720] When manually rebalancing, the last known model state is reset.
* [Issue #27720] Added the FileBalance_CalculateRatioInterval advanced setting which controls how often the balancing ratio is recalculated, 
                 regardless of how much data has changed on the pool.
* [Issue #27720] Added FileBalance_CalculateRatioNotMoreOftenThan which throttles balancing ratio calculations when a lot of data changes on 
                 the pool all at once.
Public
Alex

I've gone through the balancing code and did some testing, and I can't reproduce this issue.

For example:


DrivePool is set to immediately rebalance with no throttle, but because we have a balancing model that cannot be fulfilled perfectly due to the large file sizes involved, even though the balancing ratio is below "critical", balancing is not taking place.

Here's what's shown in the log:


Note that it's perfectly normal to see this message repeat because immediate balancing is periodically re-evaluating whether it should fire up a full balancing pass. Without this, your pool would balance constantly.

Now here's what happens if we create some new files on the pool:


Notice that the pool is rebalanced and goes back into a "Model already rebalanced" state, because we have some very large files that can't satisfy the model exactly.

But I did make a few changes to the code:
  • Added explicit trace messages when pool part rebalancing or file placement rebalancing is performed.
  • Got rid of the excessive and misleading "Balance not critical" log messages. That message will now be logged once and only when balancing is skipped due to it not being critical.
  • When manually rebalancing, the last known model state is reset.
  • Added FileBalance_CalculateRatioInterval which controls how often the balancing ratio is recalculated, regardless of how much data has changed on the pool.
  • Added FileBalance_CalculateRatioNotMoreOftenThan which throttles balancing ratio calculations when a lot of data changes on the pool all at once.
I'll make a new build with these changes.

Also, "Cannot balance. Model already re-balanced" can never be triggered if you're forcing a rebalance from the UI. That is always a full pool part balancing pass. (this is not new)