Skip to main content

FixedDestMultiMove

Move Type: Fixed Complexity: O(bundles × bundle_size) with parallel evaluation Primary Use: RAS stackable solve

Move bundles of related objects from hot container to a specific fixed destination. The multi-object version of FixedDest, designed for RAS local search.

Overview

FixedDestMultiMove (also known as FIXED_DEST_MULTIPLE) evaluates moving bundles of related objects from the hot container to a single predetermined destination container. Unlike FixedDest which moves one object at a time, this move type moves entire object bundles together.

Use when:

  • Using RAS stackable solve
  • Moving bundles of related objects together
  • Know exactly which destination to target
  • Objects must move as coordinated groups
  • Want parallel evaluation of move sets

Avoid when:

  • Not using RAS local search
  • Objects can move independently (use FixedDest)
  • Don't know destination (use Single)
  • Need to explore multiple destinations
  • Want solver to find best destination

Quick Example

# Move object bundles from hot container to specific destination
solver.addSolver(
SolverSpecs(
localSearchSolverSpec=LocalSearchSolverSpec(
moveTypeList=[
FixedDestMultiMoveTypeSpec(
specialContainer="new_server", # Fixed destination
),
]
)
)
)

Parameters

ParameterTypeRequiredDefaultDescription
specialContainerstringYesnullFixed destination container name
maxSamplesPerEquivSetintNo5Max move sets to consider per equivalent set
rasLocalSearchMetadataRasLocalSearchMetadataNonullMetadata for RAS local search

Parameter Details

specialContainer:

  • Name of the specific destination container
  • All object bundles will target this container only
  • Must be a valid container name

maxSamplesPerEquivSet:

  • Limits move sets evaluated per equivalent set
  • Equivalent sets are groups identical from local search perspective
  • Higher values = better quality, more computation
  • Default: 5 samples per equivalent set

rasLocalSearchMetadata:

  • Metadata specific to RAS stackable solve
  • Optional configuration for RAS local search behavior
  • Only relevant for RAS use cases

How It Works

Given a hot container (most broken):

  1. Select bundle: Pick object bundle from hot container
  2. Evaluate move: Test moving all objects in bundle to specialContainer
  3. Parallel evaluation: All move sets evaluated in parallel (multi-threading)
  4. Sample: Consider up to maxSamplesPerEquivSet per equivalent set
  5. Repeat: Try all bundles in hot container
  6. Apply best: Apply the bundle move that improves objective most

Visual Example

Before move:                          After bundle move to specialContainer:
┌──────────────┐ ┌──────────────┐
│ Hot │ │ Hot │
│ Container │ ───────────> │ Container │
│ Bundle1 ────┼──┐ obj1, obj2 │ Bundle2 │
│ • obj1 │ │ │ • obj3 │
│ • obj2 ────┼──┘ │ • obj4 │
│ Bundle2 │ └──────────────┘
│ • obj3 │
│ • obj4 │ ┌──────────────┐
└──────────────┘ │ Special │
│ Container │
┌──────────────┐ │ • objA │
│ Special │ │ • objB │
│ Container │ │ Bundle1 ←───┼── Entire bundle moved!
│ • objA │ │ • obj1 │
│ • objB <───┼──┐ │ • obj2 │
└──────────────┘ └─ Bundle dest └──────────────┘

Entire bundle moves together to specialContainer

Comparison with FixedDest

AspectFixedDestFixedDestMultiMove
Move unitSingle objectBundle of objects
Use caseGeneral single movesRAS stackable solve
EvaluationSequentialParallel
ComplexityO(N)O(B × S) where B=bundles, S=bundle_size
CoordinationIndependent objectsRelated object groups

Complexity

Per iteration: O(B × S)

Where:

  • B = number of bundles in hot container
  • S = average bundle size (objects per bundle)

Sampling: Limited by maxSamplesPerEquivSet per equivalent set

Example - RAS stackable:

  • Hot container bundles: 20
  • Average bundle size: 4 objects
  • maxSamplesPerEquivSet: 5
  • Evaluations: ~20 bundles (limited by sampling), 4 objects each
  • Benefit: Parallel evaluation across bundles

Usage Patterns

RAS Migration

Move RAS bundles to new server:

# Migrate RAS task bundles to new server
solver.addSolver(
SolverSpecs(
localSearchSolverSpec=LocalSearchSolverSpec(
moveTypeList=[
FixedDestMultiMoveTypeSpec(
specialContainer="new_ras_server", # New server
),
]
)
)
)

Fill Specific Container

Target specific underutilized container with bundles:

# Fill specific underutilized container with object bundles
solver = ProblemSolver(service_name="example", service_scope="test")

solver.addSolver(
SolverSpecs(
localSearchSolverSpec=LocalSearchSolverSpec(
moveTypeList=[
FixedDestMultiMoveTypeSpec(
specialContainer="underutilized_server",
),
]
)
)
)

Sampling Control

Control sampling of equivalent sets:

# Limit evaluations by sampling equivalent sets
solver = ProblemSolver(service_name="example", service_scope="test")

solver.addSolver(
SolverSpecs(
localSearchSolverSpec=LocalSearchSolverSpec(
moveTypeList=[
FixedDestMultiMoveTypeSpec(
specialContainer="destination_server",
maxSamplesPerEquivSet=10, # Evaluate up to 10 per equiv set
),
]
)
)
)

With RAS Metadata

Configure with RAS local search metadata:

# RAS stackable solve with metadata
solver = ProblemSolver(service_name="example", service_scope="test")

from rebalancer.interface.thrift.v2.SolverSpecs.thrift_types import (
RasLocalSearchMetadata,
)

solver.addSolver(
SolverSpecs(
localSearchSolverSpec=LocalSearchSolverSpec(
moveTypeList=[
FixedDestMultiMoveTypeSpec(
specialContainer="ras_destination",
maxSamplesPerEquivSet=5,
rasLocalSearchMetadata=RasLocalSearchMetadata(),
),
]
)
)
)

Performance Characteristics

Speedup Analysis

BundlesBundle SizeFixedDestMultiMoveSingleSpeedup
20480100K~1250×
5084001M~2500×
100101K10M~10000×

Benefits:

  • Parallel evaluation: All move sets evaluated concurrently
  • Bundle efficiency: Move related objects together
  • Sampling control: maxSamplesPerEquivSet limits computation
  • Fixed destination: No destination exploration overhead

When Does It Help?

FixedDestMultiMove helps when:

  • RAS stackable solve: Designed for RAS local search
  • Bundle coordination: Objects must move together
  • Known destination: Exactly where bundles should go
  • Parallel benefits: Can leverage multi-threading
  • Large bundles: Moving groups is more efficient than individuals

FixedDestMultiMove does NOT help when:

  • Not RAS: Use FixedDest for single objects
  • Independent objects: Objects can move separately
  • Unknown destination: Need solver to find best destination
  • Exploring options: Want to try multiple destinations

Comparison with Variants

Move TypeDestinationSourceMove UnitUse Case
FixedDestFixed specificHot containerSingle objectGeneral moves
FixedDestMultiMoveFixed specificHot containerObject bundleRAS stackable
FixedSourceMultiMoveMultiple destsFixed specificObject bundleRAS pull from source
FixedDestSwapMultiMoveFixed specificHot containerBundle swapRAS swaps

Decision tree:

  1. RAS stackable + know dest?FixedDestMultiMove
  2. RAS stackable + know source?FixedSourceMultiMove
  3. Single objects + know dest?FixedDest
  4. Neither?Single

Troubleshooting

Problem: No improving moves found

Diagnosis: Bundles can't beneficially move to special container

Solutions:

  • Verify specialContainer is correct destination
  • Check capacity constraints on special container
  • Bundle sizes may be too large for destination
  • May already be optimal for this destination
  • Try different destination or Single

Problem: Wrong bundles moving

Diagnosis: Bundle formation or objective function issue

Solutions:

  • Verify bundle formation logic is correct
  • Check objective function rewards correct bundle moves
  • Review equivalent set definitions
  • May need different objective or constraints
  • Examine which bundles the solver is selecting

Problem: Too many evaluations

Diagnosis: Too many bundles or large equivalent sets

Solutions:

  • Reduce maxSamplesPerEquivSet (default: 5)
  • Start with smaller sample (e.g., 2-3 per set)
  • Review bundle formation to reduce bundle count
  • Check if bundles can be simplified

Problem: Missing good bundle moves

Diagnosis: maxSamplesPerEquivSet too small, sampling misses best bundles

Solutions:

  • Increase maxSamplesPerEquivSet (e.g., 10, 20)
  • Review equivalent set definitions
  • May need to evaluate all bundles (remove sampling)
  • Run multiple times with different random seeds

When to Use FixedDestMultiMove

DO use when:

  • Using RAS stackable solve
  • Moving bundles of related objects
  • Know exactly which destination to target
  • Objects must move as coordinated groups
  • Want to benefit from parallel evaluation

DO NOT use when:

  • Not using RAS local search
  • Objects can move independently (use FixedDest)
  • Don't know destination
  • Need to explore multiple destinations
  • General optimization (use Single)

Fixed bundle variants:

RAS move types:

  • All three above are used exclusively for RAS stackable solve
  • Work together in RAS local search strategies

General alternatives:

  • FixedDest - Single objects to fixed destination
  • Single - Explore all destinations

Source Code

Next Steps