How do I fix trapped space?

A huge portion (about 95%) of each disk managed by Swarm is devoted to storing object replicas. This "data region" has these metrics:

  • capacity - the size of the entire region

  • used - the portion consumed by objects

  • free - the portion immediately available for new object replicas

  • trapped - the data region space requiring processing to be freed

used + free + trapped = capacity

New writes exchange free space for used space because object replicas are written sequentially. Objects leave "holes" in the data region not immediately usable when they are deleted or relocated within the cluster, and these holes are termed trapped space.

Swarm has a background process to monitor trapped space and decide when it is worth converting trapped space to free space as part of the overall continuous health process (HP). HP computes the ratio of free to trapped space every hour. The HP works to defragment the disk until the 0.8 ratio is restored if the ratio falls below 0.8 by default. Defragmentation affects performance because it involves rearranging data on disk. Swarm is tuned to balance the need for free space (to accept new writes) with the load of this essential maintenance activity.

What to know and expect

  • Trapped space does not count against licensed capacity.
    Trapped space neither counts against licensed capacity nor indicate a problem; it is an inherent feature of Swarm clusters.

  • Non-trivial portions of disks may appear trapped.
    This is normal and is not cause for alarm. The HP is constantly monitoring to intervene if trapped space grows too large and it takes a long time to fill a cluster. Whatever space is trapped one week is free and available another week, with different trapped space being generated. It all depends on the cluster use.

  • As disks fill, defragmentation churn must increase
    Swarm seeks to maintain 20% of space free with the ideal ratio of 0.8. Nearly full disks have to defragment frequently to keep this ratio, creating a higher background load on the cluster.

  • A cluster filled to capacity can choke on trapped space.
    Swarm is designed to maintain and heal itself as long as it has free space to work with. Running near capacity defeats these mechanisms. Trapped space can generate faster than can be reclaimed rare use cases. Contact DataCore Support if this problem is encountered.

© DataCore Software Corporation. · https://www.datacore.com · All rights reserved.