- Newest
- Most votes
- Most comments
Your SageMaker auto scaling configuration isn't distributing requests evenly across all available endpoints, which is causing performance issues. There are several potential issues to address:
-
Request Distribution: The uneven distribution of requests across your endpoints suggests that some models may be cached in memory while others are experiencing cold starts. This is common in multi-model endpoints where SageMaker removes models from memory when they're not frequently used.
-
Memory Configuration: Your JVM settings are limiting memory usage to only 8-10% of available RAM (InitialRAMPercentage=8.0, MaxRAMPercentage=10.0). This is likely too restrictive for a multi-model endpoint and could be causing memory pressure.
-
Auto Scaling Metric: You're using "SageMaker Variant Invocations PerInstance" as your scaling metric, but for multi-model endpoints, "MemoryUtilization" might be more appropriate since model loading/unloading is memory-intensive.
-
Workers Configuration: You have only 1 worker per model (default_workers_per_model=1), which may be insufficient for your 15 celery workers sending parallel requests.
Consider these improvements:
- Increase the MaxRAMPercentage to allow more models to stay in memory
- Change your scaling metric to MemoryUtilization with a target value around 80%
- Increase default_workers_per_model to handle more concurrent requests
- Consider using a larger instance type with more memory if you're experiencing frequent cold starts
- Check CloudWatch metrics like ModelCacheHit and ModelLoadingWaitTime to better understand your endpoint's performance
If your model is time-sensitive, you might want to consider using real-time inference with a single model instead of a multi-model endpoint to avoid cold start latency.
Sources
Troubleshoot SageMaker AI multi-modal endpoint issues | AWS re:Post
Automatic scaling of Amazon SageMaker AI models - Amazon SageMaker AI
Auto scaling policy overview - Amazon SageMaker AI
answered a year ago
Relevant content
asked 3 years ago
- AWS OFFICIALUpdated 2 years ago
