0

Recently, I migrated a joomla 2.5 site with K2 from a shared host to a dedicated web server with 1 GB of RAM and 8 CPU cores. My problem is now that the website loading is very slow, much slower than on the busy shared server!

Time to first byte is 7 to 10 seconds! But this is only the case for joomla pages. If I put a static page, or even a dynamic page which loads phpinfo for example, it loads in a little fraction of a second.

What I have on the home page is intro of 15 newest articles in the main section plus tag cloud, 15 most read item titles and things like this in modules. I tried to reduce this numbers to just 1 and then the website loads in just 2-3 seconds. It seems the load time increases gradually with number of items being loaded, either in the main section or in the modules. So I guess there is something wrong with MySQL server configuration? I have MySQL 5.5.42 and database type in joomla configuration is mysqli, the same as what I had on the shared hosting.

The mysql server and website are on the same VPS and I am using localhost in joomla configuration. Could anybody advice on this please?

dahma
  • 1
  • 1
  • It sounds to me like you need to review your web server configuration. See http://serverfault.com/questions/350454/how-do-you-do-load-testing-and-capacity-planning-for-web-sites/. – David W Apr 16 '15 at 10:27
  • @DavidW Thank you for the comment. I have observed CPU and memory usage, both are very low, CPU usage is less 1 percent and memory usage is usually around 60 percent. I also have checked that the performance is the same when there is only one visitor! – dahma Apr 16 '15 at 10:51
  • Are using some kind of PHP caching like xcache, or APC? – Fox Apr 16 '15 at 20:09
  • @Fox no I'm not using any. – dahma Apr 17 '15 at 11:09
  • Damn what was I reading the moment I asked? Your problem is not in the cache, though the cache might help (a lot) to reduce first-byte time. To track down what is slow in your joomla, try checking your MySQL query/slow query log. If you don't find anything suspicious in those logs it might be worth sharing some data from the xdebug profiling. btw. I don't get why this is marked as duplicate of the mentioned question. – Fox Apr 17 '15 at 11:30

1 Answers1

0

Install xdebug and turn on profiling. Then use a utility like wincachegrind or kcachegrind to drill down to see what's taking the time. Check out http://www.xdebug.org/docs/profiler for more info.

sa289
  • 1,308
  • 2
  • 17
  • 42
  • I've already done that, but didn't find any specific process or function taking lot's of time. It is distributed all over the place. – dahma Apr 17 '15 at 11:11
  • Try opening it again in wincachegrind and click the "Overall" tab and then click the "Total Cum" column to sort by that. Is there one function that stands out as taking up the most total time? – sa289 Apr 17 '15 at 17:44