Skip to content

Using Dry-Run Mode

Dry-run mode lets you preview compression impact without making any changes to your index.

When you set dry_run=True, Gilial:

  • Analyzes your vectors
  • Calculates which vectors would be deleted
  • Reports estimated savings
  • Does NOT delete anything
Terminal window
curl -X POST http://localhost:8000/compress \
-H "Content-Type: application/json" \
-d '{"strategy": "balanced", "dry_run": true}'

The response includes:

{
"original_vectors": 10000,
"compressed_vectors": 9739,
"original_size_mb": 29.30,
"compressed_size_mb": 28.53,
"compression_ratio": 0.974,
"savings_pct": 2.61
}
  • original_vectors - Starting vector count
  • compressed_vectors - Vectors after compression
  • savings_pct - Percentage of space saved
  • compression_ratio - New size / original size
Terminal window
# Step 1: Estimate savings
curl http://localhost:8000/estimate?strategy=balanced
# Step 2: Dry-run to confirm
curl -X POST http://localhost:8000/compress \
-H "Content-Type: application/json" \
-d '{"strategy": "balanced", "dry_run": true}'
# Step 3: Apply if happy (if savings > 2%)
curl -X POST http://localhost:8000/compress \
-H "Content-Type: application/json" \
-d '{"strategy": "balanced", "dry_run": false}'
  1. Always dry-run first - Never jump to dry_run=False
  2. Review the numbers - Check if savings justify the deletion
  3. Use for testing - Test compression strategies on a copy before applying
  4. Monitor queries - Run dry-run before and after to spot impact
  5. Document changes - Keep records of compression runs

Always dry-run first before applying:

Terminal window
# Dry-run
curl -X POST http://localhost:8000/compress \
-d '{"strategy": "balanced", "dry_run": true}' | jq '.savings_pct'
# Only apply if savings look good
curl -X POST http://localhost:8000/compress \
-d '{"strategy": "balanced", "dry_run": false}'

Test both strategies to see which gives better results:

Terminal window
# Test balanced
curl -X POST http://localhost:8000/compress \
-d '{"strategy": "balanced", "dry_run": true}' | jq '.savings_pct'
# Test aggressive
curl -X POST http://localhost:8000/compress \
-d '{"strategy": "aggressive", "dry_run": true}' | jq '.savings_pct'