What can I do to improve the speed of my small Drupal 8 site?

How can I be sure the caching system is even working? I can live with slowness on the admin side if I have to but it shouldn't take forever to load a simple page.

This is a new installation, not an upgrade. It runs on Bluehost shared hosting, but is also slow on my local development server which runs D7 much faster.

Operating System: Linux
Web Server: Assuming Apache, whatever bluehost is using.
PHP Version: 5.6.17
PHP Memory: unknown, i can't find this in phpinfo()
Version of Drupal 8: 8.0.0 now 8.0.3, still slow

Comments

vm’s picture

Difficult to diagnose with the information given.

cache is in the 'cache' database table/s

dreambubbler’s picture

Hi Frumpus,
In order for others to assist you, they need to more information regarding your set up.

To get you started:

Is this a new Drupal site, or has it been upgraded from Drupal 7/6?

Operating System: ____
Web Server: ____
PHP Version: ____
PHP Memory: ____
Version of Drupal 8: _____

Frumpus’s picture

This new installation, not an upgrade. It runs on Bluehost shared hosting.

Operating System: Linux
Web Server: Assuming Apache, whatever bluehost is using.
PHP Version: 5.6.17
PHP Memory: unknown, i can't find this in phpinfo()
Version of Drupal 8: 8.0.0

So I suppose an update is the first thing to try... I'll give that a shot and report back.

dreambubbler’s picture

Shared hosting is what is making Drupal 8 slow. Try spinning up Drupal 8 on a VPS. Inexpensive options could be Digital Ocean or surf around at lowendbox.

Frumpus’s picture

It is slow on my local dev box as well, which runs far more complex D7 sites much faster. There has to be more going on than shared hosting.

Also, the hosting situation for this site is not my decision to make. So anything I can do to improve its performance where it is I'd like to try.

daltro’s picture

Thank you very much, dreambubbler. I did not know Digital Ocean. I am now trying it, and am amazed so far. Although not feeling much improvement in Drupal 8 speed, that is, I was using an inexpensive shared hosting with php7 and Drupal 8 run quite fast on it. Now, on a Digital Ocean VPS it seem to be just a liittle faster.

Frumpus’s picture

Updated to 8.0.3. It is still far slower than it would be running in D7.

I'll update the original post with the current details and hopefully there will be some helpful suggestions.

W.M.’s picture

There is no need for further info to diagnose whatsoever, the code got 3 times bigger than D7 and the performance 3 times slower accordingly. Using PHP 7 might speed things up, but still when compared to D7 it is 3 times slower. I guess in 3 years time, systems will be faster to handle the D8 code and modules will be available to cover basic needs. Until then, I will be using the well developed and fast D7.

DavidFeldman’s picture

Sounds like you will need better hardware for better performance. To test your cache, however, see here:

http://www.sitepoint.com/exploring-cache-api-drupal-8/

for a few ideas.

W.M.’s picture

Here are benchmarking results from 2014 while D8 was in development phase. The results are clear and there is no reason to believe that things got better up against final release, propably the contrary:

https://www.appnovation.com/blog/drupal-7-vs-drupal-8-performance-compar...

aangel’s picture

Jeff Geerling has an excellent write up on the topic (March 24, 2016).

http://www.jeffgeerling.com/blog/2016/yes-drupal-8-slower-drupal-7-heres...

Key takeaway: once you add the same modules to D7 that are in D8 core, the difference becomes much less. But the extra power does have a cost, no way around it.

On the other hand, Drupal 8 has a totally new caching mechanism and BigPipe so certain situations will be faster than with D7.

https://www.drupal.org/project/big_pipe

Throw the free CloudFlare plan in front of your Drupal 8 site and anonymous traffic will be excellent. Upgrade the host and use BigPipe and your authenticated users will benefit.

https://www.cloudflare.com

W.M.’s picture

Actually I had tested D7 with comparable modules enabled to D8 default and found that it is 3x times faster than D8. I think it depends on the needs. I use D7 to manage data by authenticated users (no visitor traffic at all), so in this particular situation D7 has considerable advantage. The other day I tested the speed the two systems in generating 500 nodes in code: D7 => ~1200ms vs. D8 => ~ 3300ms. I went further and tested Rails for the same task => 230ms.

Of course, features come at cost. So there should be a consideration of cost - benefit in regard to each project. I would not start building D8 systems / sites in the near future because of: performance, lack of contrib modules and what I consider the introduced over complexity in building new functionalities (modules).

ffrey’s picture

@W.M. : I should think comparing Rails to Drupal is unfair.
[Ruby on] Rails is a framework, comparable to say Symfony2 or Codeignitor, while Drupal is a Cms comparable to Joomla or Django. Granted ;-) ?
Thx for your metrics regarding D7 vs D8 though : pretty worrying...

ffrey’s picture

@Frumpus : can you please specify which database you're using ? (sqlite/mysql/posgres ?)

I think everyone coming up with benchmarking should definitely specify which database they are using. Database is known to be one of the main bottlenecks of web apps, and performances certainly vary a lot (sqlite being quicker on select vs slower on write ops, etc.).

I am experiencing such slowness with D8 on sqlite, but I haven't yet tested on mysql/posgres.

W.M.’s picture

I had tested Drupal 7 & 8 on the same MySQL server and Rails on Postgres.

W.M.’s picture

Update 20 May, 2016

I have upgraded my system to 2x CPU power and double amount of RAM. The benchmark results for creating 500 nodes in code reads as following:

D7: 700ms vs. 1200ms in old system

D8: 2400ms vs. 3300ms in old system

For this task: D7 is 3.4 times faster than D8.

gge’s picture

Try Supercache and you should see some improvements.

aangel’s picture

Thanks for the note...very interested in testing it out.

baltusf’s picture

How can I see if it is right installed and it works?

Thnx,
Fred

edaa’s picture

Disable xdebug on local machine, you would get huge performance gain

W.M.’s picture

Is this a Drupal built in feature or a system wide thing?

hershel’s picture

Xdebug is a PHP extension, not a part of Drupal.

--
The Open Host -- PHP Hosting