User Manual
StableBit DrivePool 2.X
A state of the art disk pooling application with file duplication.

About Balancing

(Build 906)

Back to Contents

Balancing is very much a power user feature. It exposes some of the under the hood inner workings of StableBit DrivePool and if you're looking for the simplest user experience then you can simply ignore any balancing aspects of StableBit DrivePool. Balancing comes with reasonable defaults out of the box and doesn't require any configuration to function properly.

You can open the balancing interface from the Pool Options menu.

Why is Balancing Necessary?

In StableBit DrivePool balancing is the act of reshuffling your existing pooled files among the physical disks that are part of the pool.

The original motivation for implementing balancing was to facilitate the optimal use of your disk space for protected files. For example, let's say that you have a pool that consists of a single 1 TB hard drive. You fill up 800 GB of that hard drive with your files. You then decide to expand your pool by adding another 1 TB hard drive to it. Now that you have 2 drives part of the pool, you would like to create a duplicated folder to store some important documents in it. Consider this, your first drive has 200 GB of free space and your second drive has 1 TB of free space. This means that you can at most write 200 GB of duplicated files into your new duplicated folder even though your pool has 1.2 TB of free space. In effect, 1 TB of your pool can't be used to store duplicated files.

The solution to this problem is to either add another drive to the pool or to move 400 GB (exactly half) of your original files from the first disk onto the disk that you've just added. And this is called balancing.

StableBit DrivePool detects and solves for cases where the current file distribution is causing some of your space to be unusable for duplicated files. This is the job of the Duplication Space Optimizer, which is one of many balancers that come by default with StableBit DrivePool.

How Does Balancing Work?

The balancing system consists of a number of components:

  • The file system keeps overall file size statistics in memory for each disk in the pool. This is called real-time file size tracking.

  • The system service periodically queries all of the loaded balancing plug-ins if any files need to be rebalanced on each pool. When this is happening you will see Calculating... in the Pool Organization Bar. This is a very quick operation because all of the file size statistics are already in memory.

    Based on how much data needs to be moved a balancing ratio is calculated. This is a number from 0 % to 100 %.

  • Given the calculated balancing ratio and how many bytes need to be moved, the balancing triggers are evaluated to see if balancing is necessary.

  • If balancing is necessary and permitted based on the balancing time settings, then a background balancing pass is queued up.

    If you've set up a particular time to balance, the balancing ratio is calculated at that time, the balancing triggers evaluated, and a balancing pass is queued up if necessary.

The actual balancing pass works like this:

  • A balancing model is build (how much data needs to get moved where) by asking each balancer from the bottom to the top. The balancers on top (in terms of priority) have the last say and thus the most control over the final balancing model.

  • For each disk in the pool that has some data that needs to get moved out, the service catalogs the files on that disk using an efficient data structure in memory.

    This part of the balancing process is designed to scale, so it would be impractical to catalog every single file on every disk prior to performing the balancing run. Such a system would limit the number of files that it would be able to work with.

  • Using this catalog, the service then constructs an optimal move set. It tries its best to come up with the best move set that it can within a reasonable amount of time, given the existing CPU resources.

  • Now the service starts the file mover, which is responsible for moving each file from disk to disk, in a completely transparent way. The files are moved using the Windows backup API, and so end up being complete clones of the originals.

    This is performed using Background I/O disk scheduling in order to minimize the impact on other disk I/O.

Continue to Balancing Settings...