3

I run a commerce website in a shared hosting, from time to time it's being too slow, I tryied many ways to find the cause (css/js agreggation,enable caching, views caching, disabling some big modules :update manager,database logging,l10n,i18n, disabling no used modules, setting cron job to never) without result.
I'm not an experienced php developer, and I want to profile my website, I know that I have to install some tools in the server, so I want to ask if there is a way to do that in my shared hosting.
fortunately I'm allowed to enable many extentions and change some settings in my cpanel, below a screenshot of what I'm allowed to do.

enter image description here enter image description here

  • 4
    There's very little point in profiling a site on a shared server - you have no control over the resources, nor how many people are sharing those resources, and at what intensity, so results will be different every time. If you can afford to spend the time it will take to do this properly, you can easily afford to move the site to a proper server. Also, no hosting provider in their right mind would allow you to install profiling extensions on their shared production environments - you'll kill every one else's sites while you're profiling (which is why XHProf is missing from the extension list) – Clive Feb 6 '15 at 11:40
  • @Clive there is something I won't include in my post, the owner of the server is the company that I'm working for, they are a web hosting resellers. Because I'm not sure if moving to a proper server will give a high performance I won't request it. I don't have any idea about who share the server with me, and how they are using the ressources. What do you suggest I do?. Thank you – learner123 Feb 6 '15 at 12:03
  • 1
    Realistically you have 2 options - 1. Convince your employer to allow you to install XHProf on their shared environment (which, if they know what they're doing, they won't let you do), and find some way of profiling the site while taking the other sites on the server into account, or 2. Move the site to a server with guaranteed resources. Option 2 is what I'd advise anyone to do 10/10 times. Drupal never performs well in shared hosting in my humble experience. And Commerce, while useful, is a very greedy little bugger when it comes to memory – Clive Feb 6 '15 at 12:08
  • Will also point out that devel can tell you on a shared platform the time spend in the database and the time spend in php. Will also tell you what queries are the slowest. With this information you can start to guess at why it's slow. Moving it to it's own server is ideal though. – mikeytown2 Feb 6 '15 at 23:31
  • Do you have any http caching setup? Any php caching? Drupal has built-in caching but if you really want to take it to another level you need to setup a caching server such as varnish (varnish-cache.org) preferably with assisted with caching for php such as Memcached or Redis. These 2 external caching mecanisms are practically a must for any drupal site handling decent amounts of traffic. Your site will be a lot more "spiffy"! – stefgosselin Feb 11 '15 at 15:23
0

Two of the most important optimizations to consider adding to optimize Drupal web server performance for ecommerce are APC & Memcached.

With Memcached, you will need to install the Drupal integration module & make some edits to the settings.php file. (tutorial)

With APC, there is also a Drupal integration module, but you need to edit the php.ini file on the web server. (tutorial)

You can also see if your web host supports Zend Opcache on shared hosting. Otherwise make sure to run Drupal 8 on PHP 7.x settings & upgrade to NGINX, Varnish Cache, & Redis solutions for the best web server performance for ecommerce.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.