fattain-naime/cwp-superpowers/cwp-performance
- community
Checking that the SKILL.md file is still in the repository.
This skill should be used when the user asks to "optimize server performance", "enable caching", "configure Varnish", "set up Redis", "configure Memcached", "enable OPcache", "enable Brotli compression", "tune PHP-FPM", "optimize database", "reduce server load", "improve page speed", "tune MySQL performance", or needs to optimize any aspect of CWP server performance.
Install
npx vskill@latest install fattain-naime/cwp-superpowers/cwp-performanceSKILL.md
CWP Performance Optimization
If the user provides specific details via "$ARGUMENTS", focus the optimization on that component. For example: /cwp-pro-centos:cwp-performance optimize MySQL will focus on database tuning.
Optimize server performance on CWP servers through caching, compression, PHP-FPM tuning, database optimization, and web server configuration.
Performance Stack Overview
Use multiple caching and optimization layers:
| Layer | Options | |
|---|---|---|
| Web Server | Apache, Nginx, Varnish | |
| PHP Caching | OPcache, APC | |
| Object Cache | Memcached, Redis | |
| Compression | Brotli, gzip | |
| Application | LiteSpeed Cache, WordPress caching plugins |
Service Detection
Detect which caching services are installed:
Caching Compatibility
| Cache | suPHP | PHP-FPM | |
|---|---|---|---|
| Varnish | Yes | Yes | |
| Memcached | Yes | Yes | |
| Redis | Yes | Yes | |
| OPcache | No | Yes | |
| APC | No | Yes |
Note: OPcache and APC require PHP-FPM mode, not suPHP.
Varnish Cache
Configuration
| File | Purpose | |
|---|---|---|
/etc/varnish/varnish.params | Varnish parameters | |
/etc/varnish/default.vcl | VCL configuration |
Stack Setup
Use Nginx -> Varnish -> Apache for maximum performance:
- Nginx (port 80/443): Handles SSL termination and static files
- Varnish (port 82 or 80): Caches dynamic content
- Apache (port 8181 or 8080): Processes PHP via mod_php or proxy
Detect actual Varnish port:
Clear Varnish Cache
Monitor Varnish
Redis
Installation
Install via CWP Admin -> Software -> Redis Manager or:
PHP Redis Extension
Redis Configuration
/etc/redis/redis.conf:
Memcached
Installation
PHP Memcached Extension
Memcached Configuration
/etc/sysconfig/memcached:
OPcache
OPcache caches compiled PHP bytecode. Requires PHP-FPM mode.
Configuration
Add to PHP configuration:
Brotli Compression
Brotli provides better compression ratios than gzip.
Nginx Brotli
Add to nginx.conf:
Apache Brotli
gzip Compression
Nginx gzip
Add to nginx.conf:
Apache mod_deflate
Ensure mod_deflate is loaded and configure in .htaccess or Apache config.
PHP-FPM Tuning
Per-Pool Configuration
FPM user configs: /opt/alt/php-fpm{VERSION}/usr/etc/php-fpm.d/users/USERNAME.conf
Detect installed PHP-FPM version:
Example pool configuration (replace php-fpm83 with your installed version):
Global PHP Settings
Edit /usr/local/php/php.ini:
Rebuild PHP-FPM
Database Optimization
For MariaDB/MySQL tuning, buffer configuration, and maintenance commands, see the cwp-database skill (references/mysql.md).
Key performance settings to configure in /etc/my.cnf.d/server.cnf:
innodb_buffer_pool_size-- Set to 50-70% of available RAMinnodb_log_file_size-- 256M recommendedmax_connections-- 500 for shared hosting
Web Server Optimization
Apache MPM Configuration
Edit /usr/local/apache/conf/httpd.conf to use event MPM:
Nginx Worker Configuration
Monitoring
Server Load Check
Bandwidth Monitoring
Connection Monitoring
Performance Checklist
- Enable OPcache (requires PHP-FPM)
- Configure Varnish for dynamic caching
- Install Redis or Memcached for object caching
- Enable Brotli or gzip compression
- Tune PHP-FPM pool settings per domain
- Optimize MariaDB buffer sizes
- Use Nginx as front-end for static files
- Enable HTTP/2 (via Nginx or Apache)
- Set proper cache headers for static assets
- Monitor and adjust based on metrics
Troubleshooting
| Issue | Solution | |
|---|---|---|
| High server load | Check top, identify resource-heavy processes | |
| Slow page loads | Enable caching, check database queries | |
| Memory exhaustion | Tune PHP-FPM max_children, increase swap | |
| Database bottleneck | Enable slow query log, add indexes | |
| Varnish not caching | Check VCL rules, verify cache headers | |
| OPcache not working | Verify PHP-FPM mode, check opcache settings |
Additional Resources
references/caching.md-- Varnish, Redis, and Memcached caching setupreferences/compression.md-- Brotli and gzip compression configurationreferences/optimization.md-- PHP-FPM, MariaDB, and web server tuning
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/cwp-performance/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/fattain-naime/cwp-superpowers/cwp-performance)