Documentation

Speeding Up Your Project

Is your Craft CMS project running a little on the slow side? Unsure how to sort that? Well here's some things you can try on Servd to speed things up.

Check The Metrics #

If you're experiencing noticeable performance issues, your first port of call should be your project's Metrics page. This will let you quickly triage the problem and focus your investigations.

  • High PHP or Database CPU usage? You might need to optimize your twig templates and custom PHP code, introduce caching or maybe upgrade your plan. Using the Craft's debug tool can help drilldown down into why.
  • High PHP memory usage? The most common cause of this is large queue jobs and image transformations. If the latter, you might be able to resolve this by migrating your assets to the Servd CDN, which performs transforms off-server.
  • High request rate? You might be experiencing a sudden influx of organic traffic or maybe a denial-of-service attack which is a putting strain on your resources. Take a look at your project's Nginx logs to get idea at the type of traffic you're seeing.
  • High request latency? This usually spikes whenever you start to see performance issues. If you're seeing high latency, but low CPU usage, then you might want to check whether your project is sending any HTTP calls to external services or trying to download asset content as part of each request. They could be experiencing an outage or performance issues.

Profile Using Craft's Debug Toolbar #

If Craft appears to be performing slow and you're not quite sure why, then try enabling it's built-in Debug Toolbar profiling tool.

Never used it before? Here's some helpful resources to get you optimizing like a pro:

Static Caching #

One of the easiest and quickest ways to get some significant performance increases from your Servd project is to enable our Static Caching functionality. For sites that serve static content, it's pretty much just a flick of a switch. For sites that display dynamic user content (e.g. e-com baskets), then a few changes and cache exceptions will likely be required, but overall it's nearly always worth it for the performance savings.

If you use the Blitz plugin, you can integrate it Servd's infrastructure to get all the flexibility of Blitz with all the performance of Servd's static caching. 🚀

Dedicated Queue Runner #

By default, jobs enqueued into Craft's queue will be run by the same Craft instance that serves front-end user requests. This can be a problem if your queue has a large backlog, as it can starve user requests of resources, and cause noticeable slow downs.

If your project is on the Enhanced plan or above, you have access to our Dedicated Queue Runner, which allocates independent resources for running Craft's queue. This will significantly reduce the impact the queue has on responding to web requests.

Upgrade Your Plan #

Sometimes you just need more hardware. You've fixed bottlenecks, added optimisations, but are still seeing high resource usage.

Well good news! You can upgrade to a higher-tier plan anytime on your project's Plan page. As soon as you do, your project will automatically get allocated more resources straight away with minimal downtime.

If the Pro plan isn't cutting it, then drop us a message via our support chat and we can spec out a custom plan that's bespoke for your needs. We'll take a look at your recent usage and make recommendations on where to invest extra resources.