Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have what I think may be a latency problem. I have a magento installation on a shared host. I know it's best to run magento on a dedicated server but it's early days and it's a good host. When I bring up the front page and check it in the net tab in chrome the page itself ( ie the main file the first to be received ) takes a lot longer to load than I'd expect ... about 3 seconds on average. When I looked closer though i noticed that i was "sending" for a couple of miliseconds, "waiting" for more like 2.5 or three seconds and then "receiving" for only about fifty mS. Is this a latency problem?

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

Your issue isn't latency - it just a slow site. Latency could quickly be measured with a quick ping:

ping www.myslowsite.com 

Your issue is Time To First Byte (TTFB), whereby your server isn't generating the response very quickly and as a result, your browser is waiting until it does.

Ie. If you created a PHP script with the following:

<?php 
  sleep(10);
  echo "Hello World!";

Then your TTFB would be 10 seconds.

So your issue is going to be 2-fold.

  1. You are not using a specialist Magento web host with a truly Magento optimised environment
  2. Your Magento template/extensions are causing the page to take more time to load

The solution?

Write a more efficient template, remove the slow/bulky badly written extensions and change your host.

share|improve this answer
add comment

Make sure all your caching is turned on in magento. That way the first load will be slow but since all the xml/configs are cached it will be quicker.

The first load is just after a cache clear. Magento will run pretty slow anyway on shared hosting. It needs pretty big hardware to run quick.

share|improve this answer
    
No I have that on thanks. When you say it will run slow I'm getting page load times of up to 9 seconds. Average about 5 or 6. I didn't think it would be THAT slow. –  byronyasgur Sep 3 '12 at 22:13
1  
We ran magento on 32gig dual quad core systems and it was slow. We could never get really good response times. We had to put varnish in front of it to cache all non-logged in users. Also the more stores and products you have setup.. the slower it gets. –  Mike Sep 3 '12 at 22:35
    
Nonesense. Magento runs just fine on specialist Magento shared hosting. It is entirely reasonable to have a transactional store load in <1s on specialist Magento shared hosting. –  sonassi Sep 15 '12 at 17:08
add comment

The only definitive way to confirm whether you're experiencing latency issues, and I assume you're talking network latency, is to perform a trace with something like wireshark. You can use tools like SysInternals' ProcessMonitor on the client to see what's going on at a higher level, but a good old Wireshark .CAP file can't be beaten.

As for server performance, you need some metrics. All too often we hear that an application needs a hex-core Xeon, with 32GB RAM and lots of 15K spindles. Then you actually run the beast to find that it's only the RAM that was required, and you're left with six cores ticking over at 8% utilisation, and very little intensive disk I/O. Just me having another soap box moment, sorry!

So, on your server, see if:

o The disks are having to queue requests o CPU(s) are maxed out o Memory utilisation is OK, and that paging isn't taking place

I'm no MySQL expert (actually, I'm an MySQL noob), but I don't know whether it has many configuration parameters, a'la Oracle. Might be worth a look. I'm thinking along the lines of pinning database pages in memory to increase performance. This'll only work if you've got spare RAM in the first place.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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