Key Concepts
Slow Log
Threshold
slowlog-log-slower-than microseconds are logged.Execution Time
Log Size
slowlog-max-len configuration.Required Permissions
Duration Severity Levels
How to View Slow Log
Select Connection
Browse Entries
Filter Results
How to Search Commands
Enter Search Term
View Matches
How to Filter by Client
Enter Client Address
View Client Commands
How to Filter by Duration
Select Duration Threshold
- All: Show all slow log entries
- > 1ms: Commands slower than 1 millisecond
- > 5ms: Commands slower than 5 milliseconds
- > 10ms: Commands slower than 10 milliseconds
- > 50ms: Commands slower than 50 milliseconds
- > 100ms: Commands slower than 100 milliseconds
Review Filtered Results
Understanding Slow Log Entries
Each entry contains:Common Slow Commands
How to Configure Slow Log
The slow log is configured through Redis configuration parameters.Threshold Setting
Maximum Entries
How to Clear Slow Log
The slow log can be cleared using Redis CLI:Troubleshooting
Slow log is empty
Slow log is empty
- The threshold may be set too high (lower
slowlog-log-slower-than) - Slow log may have been recently reset
- Commands may genuinely be fast
- Check if slow log is disabled (
slowlog-log-slower-than -1)
Too many entries
Too many entries
- Increase threshold to capture only slower commands
- Use duration filter to focus on critical entries
- Check for problematic command patterns
- Consider application optimization
Same command appearing repeatedly
Same command appearing repeatedly
- Identify the calling application
- Check for inefficient loops or queries
- Consider caching results
- Optimize the command or data structure
KEYS command in slow log
KEYS command in slow log
- Replace with SCAN command
- KEYS blocks the server during execution
- Never use KEYS in production code
- Consider using key naming conventions for SCAN patterns
Large collection commands slow
Large collection commands slow
- Use SCAN variants (SSCAN, HSCAN, ZSCAN)
- Paginate with LIMIT when possible
- Consider breaking large collections into smaller ones
- Check if all data is actually needed
Write commands appearing slow
Write commands appearing slow
- Check persistence settings (AOF fsync)
- Monitor disk I/O
- Large values take longer to write
- Check replication lag if using replicas
FAQ
What counts as execution time?
What counts as execution time?
Does the slow log impact performance?
Does the slow log impact performance?
slowlog-log-slower-than 0 may see slight overhead.How long are entries retained?
How long are entries retained?
slowlog-max-len entries. Oldest entries are removed when new ones are added. The log is also cleared on server restart.Why is my fast command in the slow log?
Why is my fast command in the slow log?
Can I export slow log data?
Can I export slow log data?
SLOWLOG GET <count> in Redis CLI to retrieve entries. The UI displays entries for analysis; use CLI for programmatic export.What's a good threshold for production?
What's a good threshold for production?
Why is SCAN not a complete solution for KEYS?
Why is SCAN not a complete solution for KEYS?
How do I identify which application is causing slow commands?
How do I identify which application is causing slow commands?
Best Practices
Monitoring
- Review slow log regularly, not just during incidents
- Set up alerts for unusual slow log growth
- Track common slow commands over time
- Compare slow log patterns after deployments
Threshold Tuning
- Start with defaults, adjust based on requirements
- Lower threshold during optimization efforts
- Raise threshold if log fills too quickly
- Consider different thresholds for different environments
Command Optimization
- Replace KEYS with SCAN patterns
- Use pipeline for multiple commands
- Paginate large collection reads
- Consider data structure changes for frequent slow operations
Application Design
- Set CLIENT SETNAME for each service
- Cache frequently accessed data
- Batch operations when possible
- Monitor client-side latency alongside slow log