So, everyone using a shared hosting service must've noticed that Drupal 7 is so damn slow. Not necessary slow in loading time but in waiting time. This thing is haunting me for almost 2 years. I just didn't want to downgrade to Drupal 6 witch in terms of speed on shared hosting works 10 times better than 7. It just felt like using Windows XP instead of Windows 7. I just couldn't bear the thought to go back in 2003. I wanted to live now. And take my site with me.
I've tried every performance module out there, excepting for the ones not supported by my hosting pack, like APC. Nothing seemed to work. Activating core performance tweaks boosted my performance for anonymous users, editing my settings file to apply caching to authenticated users did a good job. But still, even if the site was doing OK (not good, OK like some 2-3 seconds first load/serving form cache flash like speed after) from time to time (and kinda often) it stalled like crazy with waiting times of like 15-20 seconds. I disabled some core modules like overlay, upgrade manager, Dashboard, Data logging -- seemed to do the trick for a coupe of hours, then - bam!- stalling again.
Today it stalled for like 25 seconds. When it finally recovered I opened my status report and I wasn't to surprised to see that Corn last ran just 3 seconds ago. And then - the light bulb: I remembered in Drupal 6 Corn was on manual by core. So I disabled Corn in Config and everything seems to work pretty fast now. I will manually run Corn only when needed. Or I'll use Elysia Corn when I'll find the time to configure it properly. The thing is Corn flushes all cashes at every run so it's a big performance drawback on shared hosting whit limited resources. Plus, if someone tries to access the site while Corn runs, that someone is in for a long wait.
For now, I'll monitor the site and see if the improvement last or fades away for the next days. I just hopes it lasts. Or I WILL go back to Drupal 6. Or Wordpress (forgive me God).
Comments
If you don't need cron to run
If you don't need cron to run frequently, it's best to disable it of course. If you are using a module that needs a cron run from time to time, you could also just increase the interval. Maybe every 10 minutes or even only once a day is enough for what it should do. I didn't notice a big performance difference between D6 and D7. I don't know what is happening on a cron run on your site and what modules you are using, but I think 10 seconds or more to load a page are way too much, no matter if cron is running at the same time or not. So maybe a different server or hostig provider would be the better solution if you encounter any performance issues in the future.
Drupal 7 is vastly better
Drupal 7 is vastly better than 6 in terms of performance, its taken all the performance tweaks from Pressflow 6 and they appear in 7 core. In terms of performance, Drupal does require a lot, however it's secure unlike say wordpress. Drupal is built for performance as well, and when using with Varnish it can load in milliseconds. Make sure that css/js is compressed in performance as well, and flush cache. Disable devel and any ui modules as this can slow down the load time if you're logged in.
You may be right
... but I have 2 drupal 7 installations on 2 different servers (different hosts). First one is a cheaper and I would have expected Drupal to act rubbish but the second one has a professional hosting pack and still acts rubbish. On the other hand I've installed on both servers 2 drupal 6 and they both load in a blink of the eye.
The fact is I just couldn't make Varnish to work. I'm just an amateur and I just don't get it. Do I have to install Varnish on a server and than provide the IP in its config page? And how would I do that on a shared hosting? It says: The Varnish control terminal is not responding at 127.0.0.1 on port 6082. And I couldn't find any secret file in etc...
Varnish
Here check this link out
http://www.lullabot.com/articles/varnish-multiple-web-servers-drupal
use boost
hi rdy4ever,
I have been using the boost module to help with performance on shared hosting sites and it makes the world of differenced to speed. Another issue can be how quickly your database is reaching and there are ways to increase this but I have only found out about it. Memory that is being allocated by the server I have found can slow you right down this has happen multiple times you can add memory_limit to a php.ini file for most hosts in your home directory. But boost I have found has increased speed especially.
https://www.purencool.com
Boost for 7
@purencool
Are you suggesting he use the "highly experimental" boost 7.x-1.x-dev for his Drupal 7 live sites? Have you tried this and encountered no issues. I have a couple D7 live sites on a VPS that have everything done as far as Performance (cache blocks and pages, aggregate css and js). They still take a few seconds to load and I am in search of a little extra "boost".
A list of some of the Drupal sites I have designed and/or developed can be viewed at motioncity.com
Use proper Cron
The best way to handle cron is to have a cronjob calling cron.php from the host, and set cron to "Never" run in the configuration options.
The cron in the configuration is like Poormans cron and runs on page load, rather than using a cronjob from the host which wont leave visitors waiting around for cron to run.
+1 for letting your host run cron
What Phizes said is probably the only speed/cron-related Drupal info you'll need :)
just don't let your users sit around and wait for Cron to be run ... let your server sweat over it.
Varnish and Drupal
Has anyone successfully configured Varnish in a shared hosting in environment with Drupal. My pages still take a long time to load even with Varnish.
I could use some insight?
yeah don't use it on shared
yeah don't use it on shared environment as you can't tweak it to enhance performance. Things like php.ini, mysql.conf are some of the things you need to tweak, as well as this varnish requires a decent amount of ram.