Overview
Performance optimization involves multiple layers:- Query and UI practices: How you interact with the dashboard
- Indexer considerations: Backend data storage and retrieval
- Client performance: Browser and network optimization
- Dashboard configuration: Server-side settings
- Resource allocation: System resources and capacity planning
Query and UI Practices
Time Range Management
Narrow time ranges when exploring data-heavy views:- Use shorter time windows (hours or days instead of weeks or months)
- Set specific date ranges rather than relative ranges when possible
- Avoid “All time” queries on large datasets
- Use time range presets for common analysis periods
Filter Before Loading
Use filters before opening high-cardinality tables:- Apply agent filters before loading event tables
- Filter by rule group or severity before exploring alerts
- Use field filters to reduce result sets
- Combine multiple filters to narrow results further
Limit Large Exports
Avoid exporting very large datasets:- Export filtered results rather than entire datasets
- Use pagination for large result sets
- Split large exports into smaller time ranges
- Consider using scheduled reports for regular exports
- Be aware of the CSV export row limit configuration
Dashboard and Visualization Optimization
Optimize dashboard loading:- Limit the number of visualizations per dashboard (8-12 recommended)
- Use saved searches instead of ad-hoc queries
- Avoid auto-refresh on dashboards with heavy queries
- Use appropriate visualization types for your data
- Disable unused visualizations
Search Query Optimization
Write efficient queries:- Use specific field queries instead of full-text search when possible
- Avoid wildcards at the beginning of search terms
- Use indexed fields for filtering
- Combine related conditions efficiently
- Cache frequently used queries
Indexer Considerations
Index Management
Ensure proper indexer sizing:- Size the Wazuh indexer appropriately for your data volume
- Plan storage capacity for data retention requirements
- Monitor index growth patterns
- Implement index lifecycle management (ILM)
- Regular index cleanup and rotation
Shard Management
Monitor shard counts and sizes:- Keep shard size between 10-50 GB for optimal performance
- Avoid too many small shards (over-sharding)
- Use appropriate shard allocation
- Monitor shard distribution across nodes
- Consider shard allocation awareness for multi-node clusters
Index Optimization
Optimize indices regularly:Force merge is resource-intensive. Run during low-usage periods.
Index Patterns and Mappings
Optimize field mappings:- Disable indexing for fields not used in searches
- Use appropriate field types
- Avoid dynamic mapping when possible
- Limit the number of fields per index
- Use doc_values efficiently
Query Performance
Monitor slow queries:Client Performance
Browser Optimization
Use modern browsers:- Chrome 90+ or Firefox 88+ recommended
- Keep browsers updated to the latest version
- Enable hardware acceleration
- Clear browser cache regularly
- Disable unnecessary browser extensions
- Clear cache after dashboard upgrades
- Use incognito mode for troubleshooting
- Monitor browser memory usage
- Close unused tabs
Network Considerations
Optimize network performance:- Prefer wired connections over wireless
- Use low-latency networks for large datasets
- Monitor bandwidth utilization
- Consider CDN for geographically distributed users
- Enable compression (handled by dashboard by default)
Client-Side Resource Management
Monitor client resources:- Watch browser memory consumption
- Close unused dashboard tabs
- Limit concurrent queries
- Avoid running multiple intensive operations simultaneously
- Use browser task manager to identify resource-heavy tabs
Dashboard Configuration
Server Settings
Optimize dashboard settings in/etc/wazuh-dashboard/opensearch_dashboards.yml:
Request Timeout
Operations Interval
Logging Level
Connection Pool
Response Size Limits
Memory Configuration
Adjust Node.js memory limits if needed:Advanced Settings UI
Configure performance-related settings through the UI:- Navigate to Dashboard Management > Advanced Settings
- Adjust these settings:
- Discover: Number of rows: Reduce default row count (default: 500)
- Discover: Sample size: Lower sample size for faster previews
- Histogram: Interval: Use appropriate time buckets
- Search: Timeout: Adjust query timeout values
Resource Allocation
System Requirements
Minimum requirements:- CPU: 2 cores
- RAM: 4 GB
- Disk: 10 GB (system) + storage for logs
- CPU: 4+ cores
- RAM: 8-16 GB
- Disk: SSD with sufficient IOPS
- Network: 1 Gbps or higher
Memory Management
Monitor memory usage:Disk I/O Optimization
Use SSD storage:- Significantly improves dashboard responsiveness
- Reduces query latency
- Better for log file access
CPU Optimization
Monitor CPU usage:Monitoring and Metrics
Dashboard Performance Metrics
Monitor dashboard health:- Navigate to Dashboard Management > Health Check
- Review all checks for issues
- Monitor API response times
- Check indexer connectivity
System Monitoring
Key metrics to track:- Dashboard response time
- API request latency
- Memory utilization
- CPU usage
- Disk I/O
- Network throughput
- Query execution time
Performance Baselines
Establish baselines:- Document typical query response times
- Record normal resource utilization
- Monitor trends over time
- Set alerts for anomalies
- Review baselines quarterly
Scaling Strategies
Vertical Scaling
Increase server resources:- Add more CPU cores
- Increase RAM
- Upgrade to faster disks (NVMe SSD)
- Improve network connectivity
Horizontal Scaling
Distribute load (for very large deployments):- Use multiple dashboard instances behind a load balancer
- Implement session affinity
- Scale indexer cluster appropriately
- Consider geo-distributed deployments
Load Balancing
Configure load balancer for multiple dashboard instances:Troubleshooting Performance Issues
Slow Dashboard Loading
Symptoms: Dashboard takes a long time to load initially. Solutions:- Clear browser cache
- Check network connectivity to indexer
- Review dashboard logs for errors
- Verify indexer cluster health
- Check API response times
Slow Query Execution
Symptoms: Queries take a long time to return results. Solutions:- Reduce time range
- Add more specific filters
- Check indexer shard health
- Review slow query logs
- Optimize index mappings
- Consider index lifecycle policies
High Memory Usage
Symptoms: Dashboard consumes excessive memory. Solutions:- Reduce number of open visualizations
- Limit concurrent operations
- Clear browser cache
- Increase Node.js memory limit
- Restart dashboard service
- Review for memory leaks in logs
Unresponsive Interface
Symptoms: UI becomes sluggish or unresponsive. Solutions:- Reduce data volume being queried
- Simplify complex visualizations
- Check browser resource usage
- Verify network stability
- Review system resource availability
- Check for JavaScript errors in browser console
Best Practices Summary
Query Optimization
- Use narrow time ranges
- Apply filters before loading data
- Limit export sizes
- Write efficient search queries
- Use saved searches
Infrastructure
- Size indexer appropriately
- Monitor and optimize shards
- Implement ILM policies
- Use SSD storage
- Allocate sufficient memory
Client Side
- Use modern, updated browsers
- Prefer wired networks
- Clear browser cache regularly
- Close unused tabs
- Monitor browser memory
Configuration
- Optimize timeout settings
- Adjust operations interval
- Configure connection pools
- Set appropriate limits
- Tune Node.js memory
Monitoring
- Track performance metrics
- Establish baselines
- Monitor resource usage
- Review logs regularly
- Set up alerts
Additional Resources
- OpenSearch performance tuning: https://opensearch.org/docs/latest/tuning-your-cluster/
- Index lifecycle management: Configure automated index management
- Hardware recommendations: Review system requirements documentation
- Monitoring guide: Set up comprehensive monitoring