1

Last week, I tried to deploy a simple symfony app on azure. I choose the plan app service B2 (2cores / 3.5Go RAM). PHP Version : 5.6.

First it took forever to complete the composer install. (I tried to go on S3, it was a little faster but not very different). So I tried to optimize the php config, opcache, realpath_cache_size...etc (xdebug already disabled). I even tried to enable wincache, but with no real improvment.

So now my app is deployed, but it is too slow to be usable. A simple php app/console (in dev mode) takes ~23secondes. It seems to recreate the cache everytime. On my local unix environnment (similar specs), it takes 6seconds when the cache is cold and 500ms when the dev cache is warm.

measure time php app/console dev mode

I think that the main problem is a filesystem issue, because to remove the dev cache folder it takes 16 seconds. On my local unix environnment, similar specs, it takes ~200ms to remove the same folder.

measure time remove dev cache folder

Like I said I tried S3 Plan with a small improvment but not enough to explain this slowness. One thing weird, it's that if I rerun the command php app/console just after it finished, the command takes 5seconds to run (much better). But If rerun it 5seconds after it finished, it takes 23seconds.

I already tried these solutions (even if the environnment is different) : https://stackoverflow.com/a/17021255/6309878

Update : I tried to set the symfony app/cache folder to the local filesystem D:\local\cache, but no improvment, it may be worst.

Community
  • 1
  • 1
abdelwahid
  • 11
  • 2
  • Wondering if anyone saw fast thing made by micro***t. – malcolm May 10 '16 at 14:59
  • @abdelwahid , since the issue is a bit hard to reproduce on our side, could you please share the web app's info with us via leveraging the approach that pointed out at https://github.com/projectkudu/kudu/wiki/Reporting-your-site-name-without-posting-it-publicly? Looking forward to having your feedback. – Will Shao - MSFT May 12 '16 at 03:09
  • @abdelwahid, we are trying to dig into your site. And any updates, we will reply you in this questions. – Will Shao - MSFT May 16 '16 at 08:09
  • @WillShao-MSFT Any news about your investigation ? Because I want to choose azure as a solution, but this slowness is a no go. – abdelwahid May 18 '16 at 14:31
  • @abdelwahid, Could you please try Prasad's solution? Any update, please let us know. – Will Shao - MSFT Jun 08 '16 at 01:26

1 Answers1

1

Please try below steps and let me know if it improves the performance -

1) In the wwwroot directory of your site, create a .user.ini file (if it doesn’t already exist) and add “wincache.fcenabled=0”. This will disable Wincache.

2) Go to Azure Portal and go to the Application Settings for your app. In the App Settings section, add “WEBSITES_DYNAMIC_CACHE” with a value of 1.

3) Restart the site.