BuddyPress Performance Case Study – “Like” 2 minute Database Queries Down to 1 sec!

Online businesses are thriving during the weird unforgettable year of 2020. I have the pleasure of helping some very socially rich online communities who suddenly had 10x the amount of users they had before.

In this case study, we focus on a social media platform running BuddyPress (like BuddyBoss) that promotes self-care. In 2020 and 2021, self-care is probably more important than it ever has been to maintain mental health.

The self-care platform has ways for users to support each other in their mental wellness goals. To make this support fun, users can use like buttons (inspired by reddit and Facebook) when their friends sign up for an event or post a success story.

These like buttons were powered by GamiPress.

This mutual “liking” and showing support for one another is a key pillar in the self-care platform's success.

When the pandemic started in 2020, the number of signups sky-rocketed.

As a result of the new influx of users, the social platform started getting really bogged down. Showing your support by liking a post or action took like 30 seconds or longer all of a sudden.

Sometimes “liking” a comment took 2 minutes!

Imagine you are showing your support to a stranger struggling with their mental health but getting the like confirmation takes 2 minutes.

You would be in distress wondering if that stranger got your message of support, your “like” of them taking action.

Frustration is the total opposite vibe and feeling that a friendly samaritan on the internet should get when trying to show support.

This frustration and bottleneck were negatively impacting the user experience on the self-care network.

Drake, the site owner, knew he had to do something. People loved his initiative and platform but they wanted a better user experience to keep the good vibes flowing.

The last thing Drake wanted was annoyed users!

BuddyBoss Before Performance Troubleshooting

We applied our performance troubleshooting approach to help Drake find out why these like and support actions took forever.

Immediately we saw a lot of MySQL database spikes (the yellow peaks).

There were a lot of database query calls, roughly 10,000 to 15,000 every minute.

Looking back on historical data, we found at peaks there were 100,000 calls per minute to the database!

It is clear many people were looking for social support and self-care during the holidays.

Some of these database queries were taking over 2 minutes slowing down the entire server 🙁

In WordPress and BuddyPress/Buddyboss JOIN queries can be especially heavy in MySQL database queries.

BuddyBoss After Performance Troubleshooting

My favorite screenshots are from the performance transition period after we implement the optimizations.

When the server response times stabilize and get beautifully flat, we rejoice together with the client. Drake was thrilled!

The database still delivered the same data, just much, much faster.

You can see the database query time stays low 4 days later – goodbye yellow spikes!

And even 12 days later during major promotional events that used to bring the server and site to its knees, the server was humming along!

The same queries that took 142 seconds now can take around 1 second sometimes under load – we will work to improve this further with the plugin developers.

Now the average response time of the server is 1.5 seconds instead of 2.5 seconds 🙂

Videos

Coming soon!

Get help troubleshooting your WordPress site to see how we can get your online course site back on track!

Work with Pros!

#OptimizewithHeart♥  

Leave a Comment