This directory contains training data and configuration templates for the Linux Swap Optimizer system. These files provide pre-configured settings and reference data for different system types and use cases.
- ai-workload-config.json - Configuration for AI/ML development workstations
- low-end-system-config.json - Configuration for low-end systems with limited resources
- gaming-config.json - Configuration for gaming systems with low latency focus
- server-config.json - Configuration for production servers with stability focus
- performance-baselines.json - Performance targets and optimization results for different system types
- process-priority-mappings.json - Default process categorization and priority settings
- kernel-parameter-presets.json - Pre-configured kernel parameter sets for different scenarios
- Copy the appropriate configuration template to your system:
cp tranning/ai-workload-config.json config.json-
Modify the configuration as needed for your specific requirements
-
Restart the swap optimizer service:
sudo systemctl restart swap-optimizerEdit the process-priority-mappings.json file to add custom process patterns:
{
"custom_mappings": {
"mappings": [
{
"name": "my-application",
"patterns": ["myapp", "my-process"],
"tier": "ai",
"nice_value": -10
}
]
}
}Choose from the available presets in kernel-parameter-presets.json:
- conservative - Minimize swap usage, prioritize RAM
- balanced - Balance between RAM and swap usage
- aggressive - Maximize swap usage for better RAM utilization
- performance - Minimize latency, prioritize responsiveness
- server - Prioritize stability and throughput
- Hardware: 32GB RAM, 16 CPU cores, 16GB swap
- Optimization: Aggressive AI process prioritization
- Expected Results: 60% CPU reduction, 40% memory efficiency
- Hardware: 4GB RAM, 2 CPU cores, 8GB swap
- Optimization: Conservative memory management
- Expected Results: 30% CPU reduction, 25% memory efficiency
- Hardware: 16GB RAM, 8 CPU cores, 16GB swap
- Optimization: Low latency and responsiveness
- Expected Results: 45% CPU reduction, 35% memory efficiency
- Hardware: 64GB RAM, 32 CPU cores, 32GB swap
- Optimization: Stability and throughput
- Expected Results: 35% CPU reduction, 30% memory efficiency
Use the performance baselines to compare your system's performance against expected results:
# Check current system performance
python3 swap_optimizer.py --status
# Compare with baseline
python3 swap_optimizer.py --benchmark- Systems with sufficient RAM: Use conservative preset
- Systems with limited RAM: Use aggressive preset
- Balanced approach: Use balanced preset
- AI/ML workloads: Prioritize AI tier processes
- Development work: Prioritize IDE tier processes
- Gaming: Prioritize interactive tier processes
- Server: Prioritize normal tier processes
- Always test kernel parameter changes in a safe environment
- Monitor system performance after applying changes
- Revert to default settings if issues occur
- AI Tier (-10 nice): Highest priority for AI/ML processes
- IDE Tier (-5 nice): High priority for development tools
- Interactive Tier (0 nice): Normal priority for user applications
- Normal Tier (10 nice): Lower priority for system services
- Background Tier (19 nice): Lowest priority for maintenance tasks
- Start with conservative settings
- Gradually adjust based on system performance
- Monitor swap usage and memory pressure
- Adjust swappiness based on available RAM
- Use regex patterns for flexible process matching
- Test patterns before deployment
- Consider process name variations
- Account for different Linux distributions
- Verify JSON syntax is correct
- Check file permissions
- Ensure configuration file path is correct
- Review system logs for errors
- Compare against performance baselines
- Check system resource usage
- Verify process priority assignments
- Review kernel parameter settings
- Ensure Linux kernel version compatibility
- Check systemd service status
- Verify Python version requirements
- Review system dependencies
When adding new configurations or data:
- Follow the existing JSON structure
- Include descriptive comments
- Test configurations before submission
- Document expected performance results
- Update this README with new information
For additional support:
- Check the main project README
- Review the documentation in the wiki
- Open an issue on GitHub
- Consult the performance reports
- Training Data Version: 1.0.0
- Compatible with: Linux Swap Optimizer v2.0.0
- Last Updated: 2026-07-04