LiteSpeed Speeds Up XenForo
LiteSpeed Web Server and MySQL optimization make ForoMTB 30x faster
- 1 huge, high-traffic XenForo site.
- At least 1,500 users on the site at any time.
- 3,000+ users at peak times.
- Apache with nginx as a reverse proxy.
- Load at 30+ at peak times.
- Page load times of up to 30 seconds.
- LiteSpeed Web Server 2-CPU license.
- Installed in minutes via LiteSpeed's Plesk extension.
- MySQL optimization.
- Load drops to 10 and below. (The server has 32 cores.)
- Pages load within 1 second.
The owner of ForoMTB.com, Spain's most popular mountain biking forum, had a problem. High-traffic and a clunky MySQL setup were bringing page load times to almost 30 seconds during peak hours. In need, he brought the forum to Jonathan Coleman, a systems administrator who goes by Slavik on XenForo.com.
- 2x AMD Opteron 6272 CPUs (32 cores)
- 64GB RAM
- 2x 1TB drives with RAID 1
ForoMTB is a big forum — 18,000,000 posts, 280,000 users, and 2,900,000 attachments. With Apache 2.2.15 and nginx as a reverse proxy, the forum's loads ran a "very spiky" 8-12 during off-peak hours. During peak hours, when the number of users sometimes jumped to 3,000+, load would reach 30+ and pages became unbearably slow.
While XenForo is optimized for large forums, ForoMTB was using some third-party add-ons that were not. Slavik realized MySQL and the forum's plugins were going to need some work, but first he had to bring the load down. After optimizing xCache, Apache, and nginx, Slavik knew he needed something else. He decided to try a switch to LiteSpeed Web Server. He set up a trial license — a free option that took only a few minutes using the Plesk extension. LiteSpeed's event-driven architecture (and optimized code) immediately took the load down (especially the spikes) to more manageable levels. From there, Slavik was able to isolate which MySQL queries were causing CPU usage to skyrocket, allowing him to further optimize and even contact add-on authors to make some changes. Within a day, the site was blazing along — load below 10 and pages coming up within 1 second. "Now my board loads pages as if it were empty even with more than 3000 users connected," the site owner crowed.
After that MySQL optimization, did ForoMTB still need LiteSpeed Web Server? While working on the site, Slavik briefly switched back to Apache + nginx to test that question. Load immediately leapt back up to 30 and page load times slowed to around 40 seconds. Slavik and ForoMTB aren't going back.