A comprehensive performance optimization toolkit for OpenWRT routers that can improve system performance by up to 97% with persistent configurations across reboots.
- CPU Optimization: Set all cores to performance mode
- Memory Management: Advanced memory pressure and swap settings
- Network Enhancement: TCP BBR congestion control + FastOpen
- Storage Optimization: Deadline I/O scheduler for better disk performance
- QoS Configuration: Simple Quality of Service rules with iptables
- Firewall Tuning: Optimized netfilter connection tracking
- Real-time Monitoring: System performance tracking tools
- Persistent Settings: All optimizations survive reboots
- Automatic Backup: Configuration backup before changes
| Metric | Before | After | Improvement |
|---|---|---|---|
| System Load | 0.61 | 0.01 | 97% β¬οΈ |
| Memory Usage | 18% | 17% | 5% β¬οΈ |
| TCP Performance | Default | BBR + FastOpen | Significantly Better |
| Boot Stability | Variable | Consistent | 100% Reliable |
# Clone the repository
git clone https://github.com/Ahmad10611/openwrt-performance-optimizer.git
cd openwrt-performance-optimizer
# Make scripts executable
chmod +x *.sh
# Run the optimizer
./install.sh- OpenWRT 19.07+ or compatible firmware (Kwrt, etc.)
- Root access
- At least 50MB free storage space
- ARM or x86 architecture
wget -O install.sh https://raw.githubusercontent.com/Ahmad10611/openwrt-performance-optimizer/main/install.sh
chmod +x install.sh./install.sh/root/system-status.shopenwrt-performance-optimizer/
βββ install.sh # Main installation script
βββ scripts/
β βββ system-optimization.sh # Core system optimizations
β βββ qos-setup.sh # QoS configuration
β βββ firewall-optimization.sh # Firewall tuning
β βββ monitoring/
β βββ system-status.sh # System status checker
β βββ performance-report.sh # Performance reporter
β βββ boot-monitor.sh # Boot performance analyzer
βββ config/
β βββ sysctl.conf.template # Kernel parameter template
β βββ rc.local.template # Startup script template
βββ docs/
β βββ PERFORMANCE.md # Performance benchmarks
β βββ TROUBLESHOOTING.md # Common issues and fixes
β βββ ADVANCED.md # Advanced configuration
βββ README.md
βββ LICENSE
βββ CHANGELOG.md
# Run full optimization
./install.sh
# Check system status
/root/system-status.sh
# View performance report
/root/performance-report.sh# Run individual optimizations
./scripts/system-optimization.sh
./scripts/qos-setup.sh
./scripts/firewall-optimization.sh
# Monitor boot performance
/root/boot-monitor.sh
# Create configuration backup
./scripts/backup-config.sh# Quick check
/root/quick-check.sh
# Detailed status
/root/system-status.sh
# Performance comparison
/root/performance-report.sh# Monitor every 30 seconds
watch -n 30 '/root/quick-check.sh'
# Boot analysis
/root/boot-monitor.shEdit /etc/sysctl.conf for kernel parameters:
# Memory management
vm.swappiness=10
vm.vfs_cache_pressure=50
# Network optimization
net.ipv4.tcp_congestion_control=bbr
net.ipv4.tcp_fastopen=3See ADVANCED.md for detailed configuration options.
Q: System load is still high after optimization
# Run boot monitor
/root/boot-monitor.sh
# Check running processes
ps | head -10Q: Settings don't persist after reboot
# Verify rc.local
cat /etc/rc.local
# Re-run installation
./install.sh --forceQ: Network performance issues
# Check TCP settings
sysctl net.ipv4.tcp_congestion_control
sysctl net.ipv4.tcp_fastopenSee TROUBLESHOOTING.md for more solutions.
# Before optimization
./scripts/benchmark.sh --before
# Run optimization
./install.sh
# After optimization
./scripts/benchmark.sh --after
# Compare results
./scripts/benchmark.sh --compareWe welcome contributions! Please see our Contributing Guidelines.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenWRT community for the amazing firmware
- Contributors and testers
- Performance optimization research community
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Wiki
- Support for more OpenWRT versions
- Web UI for configuration
- Automatic performance testing
- Plugin system for custom optimizations
- Multi-language support
- Container optimization support
β If this project helps you, please give it a star on GitHub!
Made with β€οΈ for the OpenWRT community