More information about L1 сache is available on the link : https://knowledgebase.starwindsoftware.com/explanation/starwind-virtual-san-l1-and-l2-caches-operational-principles/

Note: It is not recommended to configure cache in Write-Back mode on Standalone devices in order to avoid possible data corruption upon power outage or incorrect service shutdown.

Disabling cache

1. Stop the StarWind service.

2. Open the folder containing the *.swdsk StarWind device header file(s):

3. These are the lines to be removed from *.swdsk device header file(s):

       <caching>
         <cache type="write-back" size="128" units="MB" level="1">
           <storage_ref id="1"/>
         </cache>
       </caching>

and

       <storage id="1" name="RAM" type="RAM">
         <interval size="128" units="MB"/>
       </storage>

NOTE: Units and size values may differ from the ones provided in the above example.

4. Save the file(s).

5. Start the StarWind service.

Wait for synchronization to complete, then repeat the same steps on the other node(s).

Changing cache size and type

1. Stop the StarWind service.

2. Open the folder containing the *.swdsk header file(s):

3. These are the lines to be edited from *.swdsk header file(s):

       <caching>
         <cache type="write-back" size="128" units="MB" level="1">
           <storage_ref id="1"/>
         </cache>
       </caching>

and

       <storage id="1" name="RAM" type="RAM">
         <interval size="128" units="MB"/>
       </storage>

where:

Parameter Value Description
cache type write-through Storage method in which data is written into the cache and the corresponding main memory location at the same time. The cached data allows for fast retrieval on demand, while the same data in main memory ensures that nothing gets lost if a crash, power failure, or other system disruption occurs.
write-back During idle machine cycles, the data are written from the cache into memory or onto disk. Write back caches improve performance, because writing to the high-speed cache is faster than to normal RAM or disk. Using write-back cache for disks adds a slight amount of risk, because the data remain in volatile memory longer.
size {value} Cache size in the corresponding units “MB”, “GB”.
storage_ref id

storage id

{value}

{value}

“Storage id” and “storage_ref id” should be the same for device type, but differ from 1, because the main device storage has this reference index. You can set this number to 3 or 4, for example.

NOTE: Units and size values may differ from the ones provided in the above example.

4. Save the file(s).

5. Start the StarWind service.

Wait for synchronization to complete, then repeat the same steps on the other node(s).

Adding cache

1. Stop the StarWind service.

2. Open the folder containing the *.swdsk header file(s):

NOTE: “Storage id” and “storage_ref id” should be the same for device type, but differ from 1, because the main device storage has this reference index. You can set this number to 3 or 4.

These are the lines to be added to both .swdsk HA and image header files of the device:

  • After the closing </geometry> tag:
        <caching>
          <cache type="write-back" size="128" units="MB" level="1">
            <storage_ref id="4"/>
          </cache>
        </caching>
  • After the <storages> tag which is below the <resources> tag:
        <resources>
          <storages>
            <storage id="4" name="RAM" type="RAM">
              <interval size="128" units="MB"/>
            </storage>

where:

Parameter Value Description
cache type write-through Storage method in which data is written into the cache and the corresponding main memory location at the same time. The cached data allows for fast retrieval on demand, while the same data in main memory ensures that nothing gets lost if a crash, power failure, or other system disruption occurs.
write-back During idle machine cycles, the data are written from the cache into memory or onto disk. Write back caches improve performance, because writing to the high-speed cache is faster than to normal RAM or disk. Using write-back cache for disks adds a slight amount of risk, because the data remain in volatile memory longer.
size {value} Cache size in the corresponding units “MB”, “GB”.
storage_ref id

storage id

{value}

{value}

“Storage id” and “storage_ref id” should be the same for device type, but differ from 1, because the main device storage has this reference index. You can set this number to 3 or 4, for example.

NOTE: Units and size values may differ from the ones provided in the above example.

3. Save the file(s).

4. Start the StarWind service.

Wait for synchronization to complete, then repeat the same steps on the other node(s).

Instructions for devices originally created in StarWind VSAN 6.*

Disabling cache

1.Stop the StarWind service

2.Open folder where the StarWind.cfg file is located:

3. Search for entries for HA devices in StarWind.cfg like the one below :

4. Change CacheMode=”wt” to CacheMode=”none”:

5. Save the StarWind.cfg file.

6. Start the StarWind service.

Wait for synchronization to complete, then repeat the same on the other node

NOTE: Device name and other parameters may differ from the ones in the above example.

Changing cache size

1. Stop the StarWind service.

2.Open folder where the StarWind.cfg file is located:

3. Search for entries for HA devices in StarWind.cfg like the one below :

4. Change CacheSizeMB=”512″ to CacheSizeMB=”{value}” where {value} is the required L1 cache size:

5. Start the StarWind service.

Wait for synchronization to complete, then repeat the same on the other node

NOTE: Device name and other parameters may differ from the ones in the above example.

Request a Product Feature

To request a new product feature or to provide feedback on a StarWind product, please email to our support at [email protected] and put “Request a Product Feature” as the subject.

Back to Knowledge Base