Skip to content

Comments

Evaluate WAL journal mode for improved tracker performance#88

Draft
josecelano wants to merge 2 commits intomainfrom
86-evaluate-wal-journal-mode-for-improved-tracker-performance
Draft

Evaluate WAL journal mode for improved tracker performance#88
josecelano wants to merge 2 commits intomainfrom
86-evaluate-wal-journal-mode-for-improved-tracker-performance

Conversation

@josecelano
Copy link
Member

Summary

This PR tracks the ongoing evaluation of SQLite's WAL (Write-Ahead Logging) journal mode for the production tracker database. The goal is to measure performance impact under high-traffic conditions (~8,000-17,000 UDP requests/sec).

Closes #86

Current Status

Phase 1: ✅ Baseline metrics collected (Jan 13-28, 2026)
Phase 2: ✅ Switched to WAL mode (Jan 28, 2026, 13:16 UTC)
Phase 3: ⏳ Awaiting comparison data (Feb 4-19, 2026)
Phase 4: ⏳ Analysis and decision (Feb 19, 2026)

Changes

  • Added Phase 1 baseline performance data (15 days):
    • UDP4 announces: ~2,400-3,200 req/sec
    • Average announce time: 23.6 µs (consistent)
  • Added comprehensive experiment documentation in docs/issues/86-*.md
  • Successfully switched production tracker from DELETE to WAL journal mode
  • Documented all execution steps and results

Technical Details

WAL Mode Switch (Phase 2)

  • Date: January 28, 2026, 13:16 UTC
  • Downtime: ~60 seconds
  • Command: PRAGMA journal_mode=WAL;
  • Files created: sqlite3.db-wal (0 bytes), sqlite3.db-shm (32K)
  • Status: Tracker operational, processing normally

Database Profile

  • Size: 17 GB
  • Traffic: ~2,500 req/sec average, peaks at 3,200 req/sec
  • No low-traffic periods (24/7 constant load)

Next Steps

  1. Wait 7 days for meaningful data collection in WAL mode
  2. Export metrics from Grafana (Feb 4-19, 2026):
    • UDP4 announces per second
    • UDP average announce time
  3. Compare Phase 3 data with Phase 1 baseline
  4. Decide whether to keep WAL mode based on results
  5. Update Torrust Tracker Deployer recommendations

Testing

  • ✅ Health check passed: {"status":"Ok"}
  • ✅ Tracker logs show normal operation
  • ✅ WAL files created successfully
  • ✅ Processing ~2,500 requests/sec

Notes

Add 15 days of baseline performance data (Jan 13-28, 2026) collected
before switching from DELETE to WAL journal mode:

- UDP4 announces per second: ~2,400-3,200 req/sec
- UDP average announce processing time: consistently 23.6 µs

This data will be used to compare performance after switching to WAL mode
in Phase 3 of the evaluation.

Issue: #86
Document the successful switch from DELETE to WAL journal mode on the
production tracker. The switch was completed on January 28, 2026 at 13:16 UTC
with approximately 60 seconds of downtime.

Key details:
- Journal mode successfully changed from 'delete' to 'wal'
- WAL files created: sqlite3.db-wal (0 bytes), sqlite3.db-shm (32K)
- Tracker operational and processing ~2,500 requests/sec
- Health check passed successfully

Next phase: Collect comparison metrics after 7 days of WAL mode operation
(scheduled for February 4-19, 2026).

Issue: #86
@josecelano josecelano self-assigned this Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Evaluate WAL journal mode for improved tracker performance

1 participant