Guide10 min readMay 12, 2025

FreeScout Performance Tuning: Optimize for Speed (2025)

Complete guide to optimizing FreeScout for speed. Covers caching, queue optimization, database tuning, and handling 1000+ tickets/day.

FreeScout is fast by default, but as you grow (100+ agents, 1000+ daily tickets), performance matters. This guide covers optimizations that compound over time.

Performance Baseline

Default FreeScout on 2GB VPS:

  • Page load: ~500ms
  • Search results: ~1 second
  • Email processing: ~5 seconds per email
  • Handles: 100–200 tickets/day comfortably

Optimized FreeScout on same 2GB VPS:

  • Page load: ~200ms (60% faster)
  • Search results: ~300ms (70% faster)
  • Email processing: ~1 second (5x faster)
  • Handles: 500–1000 tickets/day

Optimization is worth it at scale.


Layer 1: Database Optimization

Index Important Columns

mysql -u freescout -p freescout
-- Add indexes for frequently searched columns
ALTER TABLE conversations ADD INDEX idx_mailbox_id (mailbox_id);
ALTER TABLE conversations ADD INDEX idx_customer_id (customer_id);
ALTER TABLE conversations ADD INDEX idx_status (status);
ALTER TABLE conversation_threads ADD INDEX idx_conversation_id (conversation_id);

-- Check existing indexes
SHOW INDEX FROM conversations;

Enable Query Cache (MySQL)

Edit /etc/mysql/mysql.conf.d/mysqld.cnf:

query_cache_type = 1
query_cache_size = 256M

Restart MySQL:

sudo systemctl restart mysql

Optimize Database Tables

OPTIMIZE TABLE conversations;
OPTIMIZE TABLE conversation_threads;
OPTIMIZE TABLE customers;
OPTIMIZE TABLE users;

Run monthly to reclaim space.


Layer 2: Redis Caching

Redis dramatically speeds up FreeScout by caching expensive queries.

Install Redis

sudo apt install -y redis-server
sudo systemctl enable redis-server
sudo systemctl start redis-server

Configure FreeScout to Use Redis

Edit /var/www/freescout/.env:

CACHE_DRIVER=redis
QUEUE_CONNECTION=redis
SESSION_DRIVER=redis

Install Redis PHP extension:

sudo apt install -y php8.2-redis
sudo systemctl restart php8.2-fpm

Verify Redis is Working

redis-cli ping
# Should return: PONG

Impact: ~40% faster page loads, ~60% faster searches.


Layer 3: PHP Optimization

Increase PHP-FPM Workers

Edit /etc/php/8.2/fpm/pool.d/www.conf:

pm = dynamic
pm.max_children = 50
pm.start_servers = 10
pm.min_spare_servers = 5
pm.max_spare_servers = 20

Restart:

sudo systemctl restart php8.2-fpm

This allows more concurrent requests.

Enable OPcache (PHP Bytecode Caching)

Edit /etc/php/8.2/fpm/conf.d/10-opcache.ini:

opcache.enable=1
opcache.memory_consumption=256
opcache.max_accelerated_files=10000
opcache.validate_timestamps=0  # Disable in production
opcache.revalidate_freq=0      # Check files on every request

OPcache caches compiled PHP code, avoiding re-parsing.

Impact: ~20% faster page loads.


Layer 4: NGINX Optimization

Enable Compression

Edit /etc/nginx/nginx.conf:

gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_types text/plain text/css text/xml text/javascript 
    application/json application/javascript application/xml+rss 
    application/rss+xml application/atom+xml image/svg+xml 
    text/x-js text/x-component text/x-cross-domain-policy;

Reload:

sudo nginx -t && sudo systemctl reload nginx

Impact: ~60% reduction in bandwidth, faster for slow connections.

Browser Caching

Add to your FreeScout NGINX config:

location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
    expires 30d;
    add_header Cache-Control "public, immutable";
}

This caches static assets for 30 days, reducing requests.


Layer 5: Queue Optimization

Increase Queue Workers

Edit /etc/supervisor/conf.d/freescout.conf:

[program:freescout-worker]
numprocs=4  # Was 1, now 4 workers

Restart:

sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl restart freescout-worker:*

4 workers = 4x faster email processing.

Use Redis Queue Instead of Database

Edit /var/www/freescout/.env:

QUEUE_CONNECTION=redis  # Was: database

Redis queues are ~10x faster than database queues.


Layer 6: Application-Level Optimization

Disable Debug Logging in Production

Edit /var/www/freescout/.env:

APP_DEBUG=false
LOG_LEVEL=error  # Only log errors, not info

Clear Application Caches Regularly

cd /var/www/freescout
sudo -u www-data php artisan cache:clear
sudo -u www-data php artisan view:clear
sudo -u www-data php artisan config:cache

Add to cron (weekly):

0 2 * * 0 cd /var/www/freescout && php artisan cache:clear && php artisan view:clear

Enable Query Logging (Development Only)

To find slow queries:

DB_QUERY_LOG=true  # Logs all queries to storage/logs/

Review logs:

tail -f /var/www/freescout/storage/logs/laravel.log

Look for queries taking > 500ms.


Layer 7: Infrastructure Scaling

Vertical Scaling (Bigger VPS)

| VPS Size | Cost | Handles | |---|---|---| | 2GB RAM | $12/month | 200 tickets/day | | 4GB RAM | $24/month | 500 tickets/day | | 8GB RAM | $48/month | 1000+ tickets/day | | 16GB RAM | $96/month | 5000+ tickets/day |

Double RAM = roughly 2–3x throughput.

Horizontal Scaling (Multiple VPS)

For enterprise scale:

  1. Load balancer (NGINX, HAProxy, or cloud provider's LB)
  2. Multiple FreeScout app servers (2–4)
  3. Shared database (MySQL)
  4. Shared Redis (caching)
  5. Shared file storage (NFS or S3)

This is complex but handles unlimited scale.


Layer 8: CDN for Static Assets

If serving customers globally:

  1. Use CloudFront, Cloudflare, or Bunny CDN
  2. Point images/CSS/JS to CDN origin
  3. CDN caches globally, serves from edge locations

Impact: ~70% faster page loads for global users.


Performance Monitoring

Monitor Page Load Times

Using Google PageSpeed Insights:

  1. Go to https://pagespeed.web.dev/
  2. Enter your FreeScout URL
  3. Check metrics (First Contentful Paint, Largest Contentful Paint)
  4. Target: LCP < 2.5 seconds

Monitor Server Resources

# Real-time monitoring
top

# Check disk I/O
iostat -x 1

# Check network
iftop

# Check MySQL slow queries
tail -f /var/log/mysql/slow.log

Set Up Monitoring Alerts

Using Prometheus/Grafana or cloud provider monitoring:

  • CPU > 80% → scale up or optimize
  • Memory > 85% → add Redis or scale up
  • Disk > 90% → clean up old logs
  • Response time > 2s → investigate query logs

Optimization Checklist

Quick wins (do today):

  • [ ] Enable OPcache
  • [ ] Increase PHP-FPM workers
  • [ ] Enable NGINX compression
  • [ ] Set browser caching headers

Medium effort (do this week):

  • [ ] Install and configure Redis
  • [ ] Increase queue workers to 4
  • [ ] Optimize database indexes
  • [ ] Enable query caching

Advanced (do if scaling):

  • [ ] Switch to Redis queue
  • [ ] Set up monitoring/alerting
  • [ ] Enable CDN for static assets
  • [ ] Implement horizontal scaling

Performance Impact Summary

| Optimization | Time to Implement | Page Load Improvement | |---|---|---| | OPcache | 10 min | +20% | | NGINX compression | 10 min | +60% (bandwidth) | | Redis caching | 30 min | +40% | | Database indexes | 30 min | +30% (for searches) | | PHP-FPM tuning | 10 min | +15% | | Queue workers (4x) | 10 min | +300% (emails) | | Combined | 2 hours | +400% throughput |

Spend 2 hours optimizing, gain 4x capacity. ROI is huge.


When to Optimize

Don't optimize if:

  • You have < 100 tickets/day (premature optimization)
  • Your current performance is acceptable
  • You're still in launch phase

Do optimize if:

  • Page load times > 2 seconds
  • Customers complain about slowness
  • You have > 500 daily tickets
  • You're maxing out current VPS

Start simple (Redis + queue workers). Only add complexity if needed.

Want expert performance tuning and infrastructure scaling for FreeScout?

We handle the full FreeScout installation on your server — SSL, email, security hardening, and a 1-hour onboarding call. Done in 24 hours.

One-time fee · 30-day support · Money-back guarantee


Summary

FreeScout is fast by default, but optimization compounds. Each layer (caching, workers, compression) adds 10–60% improvement. Combined, they enable 10x growth on the same hardware.

Optimize when you need it, not before.

Resources

Need FreeScout Installed Professionally?

Skip the complexity. We install and configure FreeScout on your server in 24 hours — SSL, email, security, and a full onboarding call included.

Get It Done for $100

One-time fee · 30-day support · Money-back guarantee

Related Articles