Replication Role Balancer
The replication role balancer manages containers to optimize network bandwidth during the
replication process. The replication role balancer switches the replication roles of name
and data containers to balance them across each storage pool in a volume. You can modify
the cldb.role.balancer.strategy
parameter from the
maprcli
to change how the role balancer manages the containers, either by size
or count. You can also run the dump rolebalancerinfo
command to see the
status of active role switches or how container roles are balanced across each storage pool
for a particular volume.
Replicated Containers
The name container is the first container created in every volume. Name containers can have either a master or a replica role. Data containers can have a master, intermediate, or tail role. By default, each name and data container is replicated across the cluster three times, with the master being the first container written. The master is sequentially replicated two more times, into a container with either an intermediate or a tail container role. If too many master or intermediate containers exist on a storage pool or if the master and intermediate containers are too large, the role balancer switches some of these containers to tail containers.
By default, the role balancer compares the size of the master and tail
containers to determine if containers within a storage pool are balanced. For the best
performance, the size of the master containers should be evenly distributed across all
storage pools in a volume. The role balancer maintains the balance such that each type
of container (master, intermediate, and tail) accounts for
1/ReplicationFactor
of the total container size in a volume. If
configured to manage containers by count, the role balancer compares the number of
master and tail containers and balances the roles such that each type of container
accounts for 1/ReplicationFactor
of the total number of containers in a
volume. For example, if the replication factor is set to 3, the role balancer maintains
a balance of ⅓ master, ⅓ intermediate, and ⅓ tail containers in each volume.
Assign Cache
The assign cache is a list of reserved containers on a particular fileserver node that are allocated by the CLDB (container location database). The replication role balancer does not balance the containers in the assign cache and does not include them when balancing the roles. See the maprcli dump rolebalancerinfo command for assign cache values and details.
Replication Role Balancer Status
You can use the maprcli
dump rolebalancerinfo
command to see the number of active
replication role switches. During a replication role switch, the replication role
balancer selects a master or intermediate data container and switches its replication
role to that of a tail data container.
# maprcli dump rolebalancerinfo -json
{
"timestamp":1335835436698,
"status":"OK",
"total":1,
"data":[
{
"containerid": 36659,
"Tail IP:Port":"10.50.60.123:5660-",
"Updates blocked Since":"Wed May 23 05:48:15 PDT 2012"
}
]
}