<p>I am evaluating a few different CMS solutions for my company's new website. Everything about Craft looks great according to my research. After installing version 3 onto an Azure App Service Linux instance I'm growing concerned about the viability, though, due to poor performance. The control panel is taking at least 4 seconds TTFB regularly. The &quot;Welcome Thanks for installing Craft CMS!&quot; default page is taking about 3 seconds TTFB consistently.</p>
<p>I've ensured I followed the installation and setup steps properly. I've ruled out a network issue. I've run the installation in an App Service plan that far exceeds what should be required for even moderate performance. After running the (very awesome) diagnostic tool it seems that the twig rendering is mostly to blame, although my DB queries aren't running as quickly as I would hope. That might just be due to an undersized MySQL instance on Azure. I can deal with that if I get the more blatant twig issues resolved.</p>
<p>I've run non-Craft php web pages from the instance and they return very quickly, sub 100ms. So I don't think the php or webserver installation that Azure provides is fundamentally bad. I'm banging my head against the wall at this point. Can someone shed any light on next steps? I really want Craft to be an option for our new platform, but I can't sell it to the stakeholders unless I can make it significantly more performant.</p>
<p>Thanks for any help you can offer.</p>
<p>Please see the performance results below.</p>
<p><strong>Application Info</strong></p>
<ul>
<li>PHP version  7.4.9</li>
<li>OS version   Linux 5.4.0-1031-azure</li>
<li>Database driver &amp; version    MySQL 5.6.47.0</li>
<li>Image driver &amp; version   Imagick 3.4.4 (ImageMagick 6.9.10-23)</li>
<li>Craft edition &amp; version  Craft Pro 3.6.4.1</li>
<li>Yii version  2.0.40</li>
<li>Twig version v2.14.3</li>
<li>Guzzle version   7.2.0</li>
</ul>
<p><a href="https://i.sstatic.net/pFYm4.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/pFYm4.png" alt="CP Performance" /></a></p>

CC BY-SA 4.0
2021-02-10T16:13:53.380Z
Do you have the xdebug extension installed on the server? That will slow things down significantly.
Luke Holder
CC BY-SA 4.0
2021-02-10T16:25:53.410Z
Thanks for the suggestion. xdebug is not installed. I confirmed by checking for it in the output of "php -m -c" from the console.
Doug Hill
CC BY-SA 4.0
2021-02-15T20:43:52.057Z
Looks like slow compute? Is opcache enabled? devmode can obviously slow things down as well. I have a small passing knowledge of Azure App service but theoretically you could also try using one of their prebuilt WordPress containers as a starting point and point your Craft install at that.
RitterKnight
CC BY-SA 4.0
2021-02-16T15:22:07.103Z
Ritter - opcache is enabled. Toggling devmode has no impact. I'm actively working through this with Craft Support and will hopefully have a resolution this week.
Doug Hill
CC BY-SA 4.0
2021-04-27T13:01:52.250Z
@DougHill Did you find any satisfactory solutions or mitigations to the performance issues?
Nils
CC BY-SA 4.0
2021-04-28T16:55:41.093Z
@Nils - Craft support wasn't able to reproduce the issue. The only differences we had was the Azure region we were deployed to. I was in East1, they were testing in West. I simply rebuilt my instance in the West region and all was well. Just to make sure I wasn't going crazy, I rebuilt a few times from scratch in East1 and I was able to reproduce the performance issues every time. Very strange, but I didn't spend anymore time researching.
Doug Hill
<craft3><templating>
Why is my base installation of Craft 3 so slow on Azure App Services?
# Why is my base installation of Craft 3 so slow on Azure App Services?

(Asked by: username_0 on 2021-02-10)

I am evaluating a few different CMS solutions for my company's new website. Everything about Craft looks great according to my research. After installing version 3 onto an Azure App Service Linux instance I'm growing concerned about the viability, though, due to poor performance. The control panel is taking at least 4 seconds TTFB regularly. The "Welcome Thanks for installing Craft CMS!" default page is taking about 3 seconds TTFB consistently.

I've ensured I followed the installation and setup steps properly. I've ruled out a network issue. I've run the installation in an App Service plan that far exceeds what should be required for even moderate performance. After running the (very awesome) diagnostic tool it seems that the twig rendering is mostly to blame, although my DB queries aren't running as quickly as I would hope. That might just be due to an undersized MySQL instance on Azure. I can deal with that if I get the more blatant twig issues resolved.

I've run non-Craft php web pages from the instance and they return very quickly, sub 100ms. So I don't think the php or webserver installation that Azure provides is fundamentally bad. I'm banging my head against the wall at this point. Can someone shed any light on next steps? I really want Craft to be an option for our new platform, but I can't sell it to the stakeholders unless I can make it significantly more performant.

Thanks for any help you can offer.

Please see the performance results below.

**Application Info**

* PHP version 7.4.9
* OS version Linux 5.4.0-1031-azure
* Database driver & version MySQL 5.6.47.0
* Image driver & version Imagick 3.4.4 (ImageMagick 6.9.10-23)
* Craft edition & version Craft Pro 3.6.4.1
* Yii version 2.0.40
* Twig version v2.14.3
* Guzzle version 7.2.0

[![CP Performance](https://i.sstatic.net/pFYm4.png)](https://i.sstatic.net/pFYm4.png)

**Tags:** craft3, templating
> **Comments:**
> **username_1**: Do you have the xdebug extension installed on the server? That will slow things down significantly.  
> **username_0**: Thanks for the suggestion. xdebug is not installed. I confirmed by checking for it in the output of "php -m -c" from the console.  
> **username_2**: Looks like slow compute? Is opcache enabled? devmode can obviously slow things down as well. I have a small passing knowledge of Azure App service but theoretically you could also try using one of their prebuilt WordPress containers as a starting point and point your Craft install at that.  
> **username_0**: Ritter - opcache is enabled. Toggling devmode has no impact. I'm actively working through this with Craft Support and will hopefully have a resolution this week.  
> **username_3**: @DougHill Did you find any satisfactory solutions or mitigations to the performance issues?  
> **username_0**: @Nils - Craft support wasn't able to reproduce the issue. The only differences we had was the Azure region we were deployed to. I was in East1, they were testing in West. I simply rebuilt my instance in the West region and all was well. Just to make sure I wasn't going crazy, I rebuilt a few times from scratch in East1 and I was able to reproduce the performance issues every time. Very strange, but I didn't spend anymore time researching.  

---

## 0 answers

