Performance Tuning

Optimize Content Guard Pro for your hosting environment. Proper tuning ensures reliable scans without impacting site performance.

Performance Settings #

Accessing Settings #

1. Go to Content Guard Pro → Settings
2. Scroll to Performance section

Available Settings #

Setting Default Range Description
——— ——— ——- ————-
Batch Size 100 10-500 Items processed per batch
Batch Delay 2 1-60 Seconds between batches
Safe Mode Auto Auto/On/Off Resource-conservative mode
Finding Retention 90 30-365 Days to keep finding records

Batch Size #

What It Controls #

Number of posts/meta/options processed in each batch before the scan pauses and reschedules.

Tuning Guidelines #

Environment Recommended Batch Size
————- ————————
Dedicated server 200-500
VPS (2GB+ RAM) 100-200
Shared hosting (good) 50-100
Shared hosting (basic) 25-50
Very limited hosting 10-25

Signs Batch Size is Too High #

  • Scans timeout frequently
  • PHP memory errors
  • 500 errors during scans
  • Server becomes slow

Signs Batch Size is Too Low #

  • Scans take very long
  • Many “batches” in logs
  • Excessive scheduled actions

Batch Delay #

What It Controls #

Wait time between batch processing to allow server resources to recover.

Tuning Guidelines #

Situation Recommended Delay
———– ——————-
Fast dedicated server 1-2 seconds
Good VPS 2-3 seconds
Shared hosting 3-5 seconds
Resource-constrained 5-10 seconds
Safe Mode 5-10 seconds (auto)

When to Increase Delay #

  • Other processes on server affected during scans
  • Database queries slow down
  • Site becomes sluggish during scans

Safe Mode #

What Safe Mode Does #

  • Reduces batch size to 25
  • Increases delay to 5-10 seconds
  • More frequent progress saves
  • Gentler on server resources

Safe Mode Options #

Setting Behavior
——— ———-
Auto Enables automatically on large sites or when issues detected
Always On Permanently enabled regardless of site size
Always Off Never enables (use with caution)

When Safe Mode Auto-Enables #

  • Site has >2 million content rows
  • Database size >2-5 GB
  • Average query time >300ms
  • Memory usage approaches limit

Recommended Setting #

Leave on Auto unless you have specific reasons to change.

Auto-Throttling #

How It Works #

Content Guard Pro automatically adjusts during scans:

1. Monitors metrics: Query time, memory, batch duration
2. Detects stress: When thresholds exceeded
3. Adjusts: Reduces batch size, increases delay
4. Recovers: Returns to normal when resources available

Throttling Triggers #

Metric Threshold Action
——– ———– ——–
Query time >300ms average Reduce batch size
Memory >50% of limit Reduce batch size
Batch time >5 seconds Increase delay

Viewing Throttle Status #

During scans, the progress display shows:

  • “Throttling active” message
  • Current adjusted values
  • Reason for throttling

Hosting-Specific Recommendations #

Shared Hosting (Bluehost, HostGator, GoDaddy) #

Batch Size: 50
Batch Delay: 5 seconds
Safe Mode: On
Schedule: 3 AM
Mode: Quick (Standard for weekly)

Managed WordPress (WP Engine, Kinsta, Flywheel) #

Batch Size: 150
Batch Delay: 2 seconds
Safe Mode: Auto
Schedule: 2 AM
Mode: Standard

VPS (DigitalOcean, Linode, Vultr) #

Batch Size: 100-200
Batch Delay: 2-3 seconds
Safe Mode: Auto
Schedule: Any off-peak time
Mode: Standard

Dedicated Server #

Batch Size: 200-500
Batch Delay: 1-2 seconds
Safe Mode: Off
Schedule: Flexible
Mode: Standard

Database Optimization #

For Better Scan Performance #

1. Optimize tables:

   wp db optimize
   

2. Check table health:

   wp db check
   

3. Review slow queries:
– Use Query Monitor plugin
– Check for missing indexes

Finding Retention #

Set appropriate retention to manage database size:

Site Activity Recommended Retention
————– ———————-
Low (few posts/month) 365 days
Medium 90 days
High (many posts/day) 30 days

Monitoring Performance #

During Scans #

Watch the progress panel for:

  • Memory usage percentage
  • Average query time
  • Batch processing rate

In Diagnostics #

Go to Content Guard Pro → Diagnostics for:

  • Historical scan performance
  • Resource usage trends
  • Throttling events

Troubleshooting Performance #

Scans Always Timeout #

1. Reduce batch size to 25
2. Enable Safe Mode
3. Increase batch delay to 10 seconds
4. Schedule during lowest traffic
5. Contact host about execution limits

Scans Very Slow #

1. Increase batch size (if resources allow)
2. Reduce batch delay
3. Ensure database is optimized
4. Check for plugin conflicts

Site Slow During Scans #

1. Reduce batch size
2. Increase batch delay
3. Schedule during off-hours
4. Enable Safe Mode

Memory Errors #

1. Reduce batch size significantly
2. Enable Safe Mode
3. Increase PHP memory limit (if possible):

   // wp-config.php
   define('WP_MEMORY_LIMIT', '256M');
   
What are your feelings
Updated on December 4, 2025
Scroll to Top