Results 1 to 10 of 20

Hybrid View

  1. #1
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Performance and Tunning

    Your database is taking 14.11 of the 14.58 seconds used for the whole thing.

    While 2380 queries might sound like a lot, there are thousands of well-tuned (even "shared") webservers out there that can handle five times that many queries in less than a second.

    Your database is definitely the bottleneck.

    While you might find it fun to get into a debate about how many queries it takes to draw the page, there are many technical reasons why it's like that, some of them grandfathered by os commerce. Newer versions of Zen Cart are progressively reducing the number of queries needed, and one of the big features of the upcoming v2 is a huge reduction in number of queries as a result of rewriting a large part of the core files. But, that rewrite won't help you today. So let's not get hung up on query numbers for now, at least as far as original Zen Cart core code is concerned.
    You might have poorly written addons that are causing extra queries, but that's something I can't help you with, because there's no way for any of us to know what ways you've changed the core code, either by customizing it or installing addons.

    There are several system settings you can change to reduce queries, but only if they relate to features you're not using.
    There are a couple FAQ articles talking about performance tuning, including those system settings. One of them is the very first article in the FAQs section: http://www.zen-cart.com/content.php?...eed-up-my-site
    and a more advanced technical document for server admins: http://www.zen-cart.com/content.php?...er-Tuning-Tips
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  2. #2
    Join Date
    Aug 2009
    Posts
    368
    Plugin Contributions
    0

    Default Re: Performance and Tunning

    Quote Originally Posted by DrByte View Post
    Your database is taking 14.11 of the 14.58 seconds used for the whole thing.

    While 2380 queries might sound like a lot, there are thousands of well-tuned (even "shared") webservers out there that can handle five times that many queries in less than a second.

    I didn't change the code or installed modules in last 2 weeks when website suddenly became slow . On my test website same number of queries ( cloned production website ) is executed in less 2 seconds . This confirm what your're saying about "webservers out there that can handle five times that many queries in less than a second" .
    I believe too that database is the bottleneck .

    Why pages like product details are not slow ? ( Parse Time: 2.382 - Number of Queries: 453 - Query Time: 1.81040376318 )
    Why querying tables ( using phpmyadmin ) is not slow ?
    Last edited by solo_400; 17 Jan 2013 at 08:35 PM.

  3. #3
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Performance and Tunning

    Quote Originally Posted by solo_400 View Post
    I didn't change the code or installed modules in last 2 weeks when website suddenly became slow .
    Okay, so by process of elimination:
    - "you" didn't change any code
    - nobody "here" changed any of the code
    - Zen Cart authors didn't change your code, because they don't have any access to your site/server/software/store
    What other players are involved here?
    Oh: the server. Run by the hosting company.
    Bingo. There's the problem: something's wrong with the server.

    Maybe the server's overloaded?
    Maybe the database engine is damaged?
    Maybe the hosting company's administrator changed database-server settings? Maybe they upgraded the version and broke something or corrupted something or didn't realize that their automatic upgrade also changed configuration settings that are now causing bottlenecks?

    Only they can speak for what's happening behind closed doors.

    Quote Originally Posted by solo_400 View Post
    Why pages like product details are not slow ? ( Parse Time: 2.382 - Number of Queries: 453 - Query Time: 1.81040376318 )
    Why querying tables ( using phpmyadmin ) is not slow ?
    I suppose it's possible that your database tables might need a "repair" run on them to resync/rebuild indexes and such.
    You can use phpMyAdmin to select tables and choose Repair Table, at least from the Operations tab. Some hosting companies offer a "Repair Database" button which does this "repair table" on all tables at once, which is a lot more convenient.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Aug 2009
    Posts
    368
    Plugin Contributions
    0

    Default Re: Performance and Tunning

    I love Bingo .

  5. #5
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: Performance and Tunning

    I have to agree with DrByte: Access from the web server to the database is the slowdown. Some hosting providers may also impose "rate limits" for SQL Queries on shared hosting... And I would not recommend running an e-commerce platform on such a hosting package. Keep in mind phpMyAdmin is not always on the same web server as your website - and may be exempted from "rate limits".

    I would highly recommend talking to your hosting company (or looking into other hosting providers). Make sure you make a backup of the database - Always good to have recent backups! Then have the hosting provider look into the performance issues.

    If you are on Zen Cart 1.3.9 you may want to look into "Query Cache" or install Zen Cart 1.5.1 which includes "Query Cache". This change can potentially reduce the number of queries per individual page request.

    You could also play around with caching the SQL responses to file (if the server can read / write to disk faster then execute queries) - but using file based SQL caching has some disadvantages (and on most hosts would be far slower).
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  6. #6
    Join Date
    Aug 2009
    Posts
    368
    Plugin Contributions
    0

    Default Re: Performance and Tunning

    I'm using 1.50 version . It includes "Query Cache" ?

    Can you please tell me where can I check if caching the SQL responses is to file or database ?

  7. #7
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: Performance and Tunning

    Quote Originally Posted by solo_400 View Post
    I'm using 1.50 version . It includes "Query Cache" ?
    Version 1.5.1 does - not 1.5.0.

    Quote Originally Posted by solo_400 View Post
    Can you please tell me where can I check if caching the SQL responses is to file or database ?
    By default I believe no SQL caching is enabled. It is usually not needed (and only a "small" boost unless you make other modifications to Zen Cart). See: configure.php file contents explained
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  8. #8
    Join Date
    Aug 2009
    Posts
    368
    Plugin Contributions
    0

    Default Re: Performance and Tunning

    I changed to database but no improvements .

    //define('SQL_CACHE_METHOD', 'file');
    define('SQL_CACHE_METHOD', 'database');

    Just for my curiosity , you are running your stores on VPS or dedicated severs ? ( i can't afford such solution )

  9. #9
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Performance and Tunning

    Quote Originally Posted by solo_400 View Post
    Why pages like product details are not slow ? ( Parse Time: 2.382 - Number of Queries: 453 - Query Time: 1.81040376318 )
    Why querying tables ( using phpmyadmin ) is not slow ?
    "Slow" is a relative term. Having said that, 1.8seconds for 453 queries is far from being a speed demon. Although there is no hard and fast rule about this (there are many factors involved), I'd be expecting to see at least 5-10times as many queries in this period of time.

    Almost certainly a DB problem. Do as DrByte suggests, run a 'repair' on your database. If that doesn't solve the problem you'll need to take it up with your host.

    Cheers
    Rod

 

 

Similar Threads

  1. v139h admin suddenly super slow, web store randomly slow
    By Swingin' Sparrow in forum General Questions
    Replies: 44
    Last Post: 13 Mar 2013, 07:50 AM
  2. v150 Admin suddenly became very slow on every page
    By Ashely in forum General Questions
    Replies: 2
    Last Post: 23 Sep 2012, 03:45 AM
  3. Our multiple products to categories just became irritatingly slow in the admin
    By ksoup in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 30 Jul 2010, 04:54 AM
  4. Development server suddenly slow XAMPP
    By ckosloff in forum General Questions
    Replies: 6
    Last Post: 11 Feb 2009, 07:09 PM
  5. New template became a mess on local server
    By 964765678 in forum Installing on a Windows Server
    Replies: 1
    Last Post: 10 Dec 2008, 08:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg