Configuring Least Block Load Balancing Policy with MPIO


Consider the following scenario:
  • You have Multipath I/O (MPIO) enabled in Windows Server 2012 or Windows Server 2012 R2. 
  • You use Microsoft Device Specific Module (DSM) together with MPIO.
  • You select Least Blocks load balancing policy.
In this scenario, I/O is not distributed among the MPIO paths as expected. The DSM continues to use the same path for all I/O. Additionally, in Failover Cluster environments, nodes that are not the exclusive owner of a disk, continue to use un-optimized paths after a path failover occurs.


Starting with Windows Server 2012, the Least Blocks load balancing policy requires the use to two registry settings. These registry settings optimize the Least Blocks policy to take advantage of caching on the storage.


Registry Information

This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:

377256 How to back up and restore the registry in Windows

Add two registry values as described below.
  1. Start Registry Editor. To do this, type regedit from the Start Menu.
  2. Locate and then click the following registry key:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\msdsm\Parameters
  3. On the Edit menu, point to New, and then click Binary Value.
  4. Type DsmUseCacheForLeastBlocks, and press enter.
  5. On the Edit menu, click Modify.
  6. In the Value data box, type 1, and then click OK.
  7. On the Edit menu, point to New, and then click QWORD (64 bit) Value.
  8. Type DsmCacheSizeForLeastBlocks, and press enter.
  9. On the Edit menu, click Modify.
  10. In the Value data box, type 100000 (hexadecimal), and then click OK.

More Information

The DsmCacheSizeForLeastBlocks value is configurable to take advantage of caching on the storage controller. The setting above uses a default value of 1MB. This value dictates the amount of sequential write I/O sent down a path, before switching to another path.

Article ID: 2921836 - Last Review: 14 Feb 2014 - Revision: 1