3

So I called my hosting provider as to why Magento is unbearably slow when they host it and 10 times faster when I copy the installation precisely onto my home computer. I'm on shared hosting.

I was guessing, a dedicated server would help with that because it will deliver more performance, thus Magento would finish executing quicker and send the page earlier to the customer.

Well what he told me was along these lines:

Magento performing badly is not at all about hardware, but about Magento itself or the way you have customized it.

Only, why does the same installation run so much quicker for me if it's REALLY not about hardware? I don't believe there's anything else that is different...

  • WHAT IS YOUR PROBLEM EXACTLY? have you tried Aoe_profiler? – user2857 Jun 26 '15 at 14:54
  • Avoid shared hosting with Magento, its a mammoth application, and throwing hardware at it will greatly improve its performance. You're web host support guy gives a small part of the answer, in that yes customisations can cause performance degradation especially if they have been written poorly, but has a lot to do with hardware. And the fact that your home computer is far faster, tells me they are actively throttling SQL/PHP etc. – evensis Jun 26 '15 at 15:09
  • I wonder if your host would change their response if you shared with us which host you are working with. Is the store slow in production with many users, or is it slow when you're just working on it and you're the (likely) only user? Due to the server containerization paradigm shift currently in full-swing, I'd recommend finding another provider as I spoke with several companies at the Imagine conference that offer some creative hosting solutions for very reasonable prices compared to full dedicated boxes. – pspahn Jun 26 '15 at 16:04
3

Most shared hosts do not allow the memory limits required by Magento.

Some shared hosts set PHP memory limit to just 64mb which is unusable for any Magento installation.

Unless using a shared hosting package specifically set up for Magento you will always have issues with shared hosting packages.

There are many limitations to shared hosting packages for Magento, poor caching set up, lack of a fast web server (usually just a plain Apache web server) and also the general fact that cheap shared hosting companies place 1,000's of users on 1 server.

MySQL is another factor as shared hosts tend to heavily throttle SQL requests to prevent users from using too much of the servers resources at once.

In short, with most shared hosting it's like asking 5,000 cars to drive down the road at the same time with only 3 lanes. You're going to get traffic jams and people are going to crash.

A final point would obviously be about bandwidth. Any site hosted on a remote server compared to local server has to travel across the internet, which is inherently slower than just reading from your hard drive.

If you can, move to a better hosting package, preferably a VPS or dedicated server. Alternatively if that's not an option you could use a CDN or some of the services offered by Amazon Web Services (which can be free for small amounts of usage) such as running your database from Amazon servers ( http://aws.amazon.com/running_databases/ ). You'd kind of be just masking the real problem though which is that it's likely your shared host isn't up to the job.

  • thanks for that insight, I'll contact them again on Monday and have them see how much memory I use / I get for Magento – Yorrd Jun 26 '15 at 14:34
  • It's unlikely on a shared hosting package you'll have any dedicated RAM for just your use. The PHP memory limit is different from this though and is a setting determining how much memory a PHP process can use. Magento really requires a minimum of 256mb to function well but there are many other factors. – performadigital Jun 26 '15 at 14:36
  • Added a quick point about MySQL too. There are a few simple steps you can take to optimise Magento but it's likely your provider won't allow most of them to be effective (like changing memory_limit in php.ini or .htaccess). – performadigital Jun 26 '15 at 14:40
  • Hmm, I got 256M on the server and on my staging system, so that's no problem as long as their server doesn't run out of memory, right? Any way for me to test whether they throttle my database? – Yorrd Jun 26 '15 at 14:40
  • 1
    It would highly depend on the access you have, with SSH access or a tool like Siege or Munin you could better assess the server load and speed but shared packages can be very limiting in allowing such things. You can run some more general speed tests using online tools like this if you can't run tests directly on the server: magespeedtest.com – performadigital Jun 26 '15 at 14:48
3

So I called my hosting provider as to why Magento is unbearably slow when they host it and 10 times faster when I copy the installation precisely onto my home computer.

You've already answered your own question.

If you have better performance after mirroring the site elsewhere, then the environment is at fault.

Contrary to popular belief, there isn't anything particularly wrong with Magento shared hosting - as long as the hosting provider doesn't oversell and knows what they are doing.

Ask a few other web hosts for a free demo - and you'll have a definitive answer.

I was guessing, a dedicated server would help with that because it will deliver more performance

Dedicated hardware is always going to outperform anything else (shared/vps/cloud), but whether you need that capacity is up to you to determine.

My advice to merchants is that the tipping point for going dedicated is when you have in excess of any of the following,

  • 1000 unique visitors per day
  • 10,000 products
  • 30 orders per day
  • Heavy API integration/activity

Why does the same installation run so much quicker for me if it's REALLY not about hardware?

Hardware

Hardware sets the baseline for performance, if you've got slow/outdated kit, you'll have a ceiling on the best performance you can see.

Software

Software configuration (ie. OS - MageStack or Centos/RedHat ~cPanel/Plesk/Interworx) will then be the second factor that sets the limit on performance. A poorly set up server through poor OS choice is again going to cap the best performance you can see.

Code

Finally, the store itself is going to be the final determining factor. Your choice of (or volume of) 3rd party modules and template are going to dramatically affect performance.

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.