-
Notifications
You must be signed in to change notification settings - Fork 0
Home
giganutt edited this page Jul 4, 2026
·
2 revisions
Welcome to the Linux Swap Optimizer documentation wiki. This system is designed to reduce CPU and system load during AI development and general application usage on low-end systems, with the goal of eliminating application lagging through intelligent swap management and process prioritization.
- Architecture and Design - System architecture and technical details
- Configuration Guide - Complete configuration reference
- Process Priority Tiers - Process categorization and priority management
- Performance Tuning - Advanced tuning strategies
- Troubleshooting - Common issues and solutions
- FAQ - Frequently asked questions
- Changelog - Version history and release notes
sudo bash install.sh# Start the service
sudo systemctl start swap-optimizer
# Enable at boot
sudo systemctl enable swap-optimizer
# Check status
sudo python3 /opt/swap-optimizer/swap_optimizer.py --status- AI-Aware Swap Management: Optimized specifically for AI/IDE workloads
- General Application Optimization: Optimizes all running applications with intelligent priority tiers
- IDE-Aware Optimization: Automatically optimizes system when any IDE is detected
- OS-Level Optimization: Applies kernel-level optimizations for better system responsiveness
- Adaptive Monitoring: Real-time adjustment based on system load
- Process Prioritization: Automatic prioritization across 5 categories (AI, IDE, interactive, normal, background)
- Low-End Optimization: Tuned for systems with limited resources
- Safe Operation: Automatic backup and easy rollback
- README.md - Project overview and quick start
- FAQ.md - Common questions and answers
- Configuration Guide - How to configure the system
- Process Priority Tiers - Understanding process categorization
- Installation - Deployment and setup
- Troubleshooting - Issue resolution
- Performance Tuning - Optimization strategies
- Architecture - System design and components
- Configuration Guide - Parameter reference
- Performance Tuning - Advanced techniques
- Process Priority Tiers - Priority management implementation
- OS: Linux (kernel 3.10+)
- RAM: Minimum 2GB, recommended 4GB+
- CPU: Minimum 2 cores, recommended 4+ cores
- Storage: 100MB free space
- Python: 3.6+
- Privileges: Root access required
- Conservative swap settings
- Aggressive memory management
- Frequent monitoring
- No aggressive mode
- General application optimization enabled
- Balanced settings
- Adaptive monitoring
- Standard optimization
- Disabled aggressive mode
- General application optimization enabled
- Relaxed swap settings
- Less frequent monitoring
- Aggressive mode enabled
- Maximum performance
- General application optimization enabled
- Python process optimization
- Jupyter notebook performance
- Model training/inference
- GPU memory coordination
- Node.js optimization
- Build tool performance
- Browser tab management
- Docker container optimization
- IDE responsiveness
- Compilation performance
- Database operations
- Testing framework optimization
- Web browser optimization
- Media player performance
- Communication app responsiveness
- General system responsiveness
Typical improvements on low-end systems:
- Swap Activity: 40-60% reduction
- CPU Usage: 15-25% reduction during workloads
- Application Responsiveness: Elimination of stuttering
- Memory Efficiency: Better RAM utilization
- System Latency: Reduced context switching
- I/O Performance: Better disk scheduling
- Automatic backup of original settings
- Conservative default values
- Graceful error handling
- One-command rollback
- Safe parameter ranges
- Dry-run mode for testing
- README.md - Main project documentation
- Architecture.md - Technical details
- Configuration-Guide.md - Configuration reference
- Process-Priority-Tiers.md - Priority management
- Performance-Tuning.md - Optimization guide
- Troubleshooting.md - Issue resolution
- FAQ.md - Common questions
-
swap_optimizer.py- Main optimizer script -
config.json- Default configuration -
install.sh- Installation script -
UNINSTALL.sh- Removal script -
requirements.txt- Python dependencies
-
/opt/swap-optimizer/- Installation directory -
/etc/swap-optimizer/- Configuration directory -
wiki/- Documentation wiki
Contributions are welcome! Please:
- Test thoroughly on low-end systems
- Follow existing code style
- Update documentation
- Include tests for new features
MIT License - Free to modify and distribute
- General application optimization for all processes
- Process categorization into 5 priority tiers
- OS-level kernel optimizations
- Enhanced adaptive management
- Interactive and background process detection
- Improved status reporting
- AI-aware swap management
- Adaptive monitoring
- Process prioritization
- Configuration system
- Systemd service integration
- Machine learning-based prediction
- Per-process memory cgroups
- GPU memory optimization
- Distributed system support
# Install
sudo bash install.sh
# Start
sudo systemctl start swap-optimizer
# Enable
sudo systemctl enable swap-optimizer
# Status
sudo systemctl status swap-optimizer
# Optimize once
sudo python3 /opt/swap-optimizer/swap_optimizer.py --optimize
# Dry run (test without changes)
sudo python3 /opt/swap-optimizer/swap_optimizer.py --optimize --dry-run
# Restore
sudo python3 /opt/swap-optimizer/swap_optimizer.py --restore
# Status details
sudo python3 /opt/swap-optimizer/swap_optimizer.py --status-
/opt/swap-optimizer/swap_optimizer.py- Main script -
/etc/swap-optimizer/config.json- Configuration -
/etc/systemd/system/swap-optimizer.service- Service
-
swappiness- Swap tendency (default: 10) -
vfs_cache_pressure- Cache pressure (default: 75) -
cpu_threshold- CPU trigger threshold (default: 80) -
memory_threshold- Memory trigger threshold (default: 85) -
optimize_all_apps- Optimize all applications (default: true) -
check_interval- Monitoring interval (default: 5 seconds)
- Check the FAQ
- Review Troubleshooting
- Consult Configuration Guide
- Examine Process Priority Tiers
- Check Architecture for technical details
- Requires root privileges
- Modifies kernel parameters
- No network connections
- No external dependencies beyond psutil
- Local operation only
- Test configuration changes in safe environment
- Monitor system behavior after changes
- Keep backup of working configurations
- Review settings when hardware/workload changes
- Use appropriate profile for your system
- Use dry-run mode before applying changes
- zram-config - Compressed RAM swap
- earlyoom - OOM daemon
- systemd-swap - Swap management
Last Updated: 2026-07-03 Version: 2.0.0 Maintainer: Linux Swap Optimizer Project