HikaShop + MySql Performance

  • Posts: 31
  • Thank you received: 0
10 years 10 months ago #141504

-- url of the page with the problem -- : drc144k.com/
-- HikaShop version -- : 2.Latest
-- Joomla version -- : 2.5.Latest
-- PHP version -- : 5.4.Latest
-- Browser(s) name and version -- : Latest versions of Chrome, Safari, & FireFox.
-- Error-message(debug-mod must be tuned on) -- : NONE. Just extremely slow.


Our MySql DB is up to +1GB in size. The Product and File tables each have about 1.8 million rows and the Variant table has 3.5 million rows. It's taking 30 seconds or more to serve 1 product. If more users hit the site at once, they may see a product with the additional Hika modules (random products, latest products, best sellers) blank or a completely blank page with no errors for PHP (error level set to max) or MySql in the logs.

Before debugging and trying tune MySql, do you have any recommendations for tuning the Hika tables? I see they are MyISam while Joomla tables are InnoDB. I think the slowdown is from the Hika side of things and not Joomla. If you have any recommendations, please let us know.

Server Specs for test & production: 8GB Ram, 8 processors, Intel Xeon 2.5Ghz. 600GB SATA Hard Drive

Thanks.

Please Log in or Create an account to join the conversation.

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
10 years 10 months ago #141512

Hi,

The slow down is probably coming from the HikaShop MySQL queries due to the amount of data in the tables yes.
Usually in such cases, having a website on Joomla 3.x really helps analyzing the queries performances on the pages as the debug traces are a lot more helpful on that end since theyr provide directly the queries profiling.

Based on what query is slow on your website, some settings of HikaShop could probably be changed to avoid the problematic queries. We've already had other users with such amount of data and we reduced the page load to someone reasonable only by changing some of the settings.

For the tables, I don't think that chaging the table type will change anything. But adding well placed indexes base don your hikashop settings probably will. For example, if you order your products listings based on the product_hits column and that this column is not indexed, the query to load the products listing will be really slow.

Please Log in or Create an account to join the conversation.

  • Posts: 31
  • Thank you received: 0
10 years 9 months ago #141677

Yikes!! Joomla 3?

So can we install Joomla 3, install HikaShop on Joomla 3, and then import our tables for HikaShop from Joomla 2.5?

Or do we need to do a CSV import of our products from J25+Hika? And redo all our settings from J25+Hika in Joomla 3? Hopefully not, the CSV import is taking 12 hours to complete right now.

Please Log in or Create an account to join the conversation.

  • Posts: 26159
  • Thank you received: 4028
  • MODERATOR
10 years 9 months ago #141697

Hi,

You can do the import using the databse. The HikaShop tables are identical in all Joomla version so you can copy (nearly) everything.
Just some configuration settings should be changed in Joomla 3, like the menu position for example.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 31
  • Thank you received: 0
10 years 9 months ago #141767

We did some mysql tuning using the my-huge example shipped with mysql. Performance is much better so far but still pretty slow with only 5 people hitting it at the same time.

When going to Joomla 3, do the tables still remain MyIsam for Hika?

Please Log in or Create an account to join the conversation.

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
10 years 9 months ago #141769

Yes, they are the same regardless of the version of Joomla.

Please Log in or Create an account to join the conversation.

  • Posts: 31
  • Thank you received: 0
10 years 9 months ago #144188

We turn on debug and see the following for a disabled module:
Application 0.130 seconds (+0.059); 20.77 MB (+9.351) - beforeRenderModule mod_hikashop (Associated products listing for category listing menu 219)
Application 5.349 seconds (+5.219); 26.19 MB (+5.421) - afterRenderModule mod_hikashop (Associated products listing for category listing menu 219)

This module sometimes takes up to 50 seconds to run! Why does the module try to render although it's disabled? Is this a "secret" or "hidden" module that must run under the covers?

Thanks.

Please Log in or Create an account to join the conversation.

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
10 years 9 months ago #144199

When you have a category listing menu, the menu displays the categories and below it the modules associated with it. By default HikaShop creates an unpbulished module associated to the menu in order to display the products below the categories.
So basically, that module is probably displaying the products listing on your page which must be the most process intensive stuff on the page if you have a lot of products.

Please Log in or Create an account to join the conversation.

  • Posts: 31
  • Thank you received: 0
10 years 9 months ago #144273

Thanks for the clarification. Makes sense and I did finally see it in your docs. And it needs to be unpublished or it will show up twice on the site. Good stuff.


Now, is there any way to speed this up for sites with lots of categories? We want to display links only (adding images to the categories listing makes loading even slower) and we only show the direct subelements. We purchased another development box with 16GB RAM and 8 3GHz+ processors ... still takes over 20 seconds for HikaShop pages to load. Normal joomla pages load in less than 2 seconds.

Thanks.

Please Log in or Create an account to join the conversation.

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
10 years 9 months ago #144288

I'm sure that it's possible to speed up the processing to under a second by tweaking a bit one or two MySQL queries.
That will require that you analyze the queries that are on the page, pin point the ones which are slow and see what can be done in them to improve their speed and then modify the corresponding code. If you can provide the queries which are slow, we can tell you where they code from and maybe what to do to improve them.

The following user(s) said Thank You: listsubscriber

Please Log in or Create an account to join the conversation.

  • Posts: 31
  • Thank you received: 0
10 years 9 months ago #144420

I attached the 3 queries which the slow query log has the most. Point us to where they come from and we will see if there is any optimization we can do to speed them up.

Thanks.

Please Log in or Create an account to join the conversation.

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
10 years 9 months ago #144511

I don't see any attached queries ?

Please Log in or Create an account to join the conversation.

  • Posts: 31
  • Thank you received: 0
10 years 9 months ago #144695

Ah, I did not hit the Insert button. Hopefully it attaches this time.

Thanks.

Please Log in or Create an account to join the conversation.

  • Posts: 31
  • Thank you received: 0
10 years 9 months ago #144696

Looks like it still failed to attach!!


File Attachment:

File Name: he0be7d0.txt
File Size:1 KB

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 26159
  • Thank you received: 4028
  • MODERATOR
10 years 9 months ago #145221

Hi,

Regarding the number of categories you have, I think that it will better to not have a category filtering in your modules.
At this moment, the link with "product_category" won't be made and it should quite improve the performances.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.086 seconds
Powered by Kunena Forum