Forums / General Questions / High Parse Times - Query times OK

High Parse Times - Query times OK

Locked

Views: 2,486

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
23 Jun 2009, 10:28 PM
#1
bodyjewels avatar

bodyjewels

New Zenner

Join Date:
Feb 2009
Posts:
9
Plugin Contributions:
0

High Parse Times - Query times OK

This is the latest version of Zen. Everything seems to run just fine. I have searched here and googled on several occasions. So far I have not found anything that seems to fit this particular issue.

What seems to be happening is an initial parse time of 20 seconds, Query times are always well under 1 second. typical around .08 - .12 seconds. The parse time only jumps up and it is always exactly 20.xxx seconds.

It is most noticeable if I have not been to the site in a while. Say an hour or so. Every subsequent page load parse times are normal. >1 second. I am at a loss here and cannot explain it to the customer.

Does anyone have any idea at all what this could be? I know we are losing some people while they are waiting for the page to load.

FWIW you will have to view source to see the Parse times, they are not "on page" but they are embedded in source near the end of page.

It seems it may be a cache issue, where the cache must be rebuilt if it is aged? IDK I am drawing straws. hopefully someone here can point what I am missing.

site is at http://www.bodyjewels.com

23 Jun 2009, 10:56 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: High Parse Times - Query times OK

It seems it may be a cache issue, where the cache must be rebuilt if it is aged?
Exactly, but 20 seconds is still a long time??
Is this a 'nix server or a win server?
Is it a shared hosting account?

Zen-Venom Get Bitten

23 Jun 2009, 11:04 PM
#3
bodyjewels avatar

bodyjewels

New Zenner

Join Date:
Feb 2009
Posts:
9
Plugin Contributions:
0

Re: High Parse Times - Query times OK

Sorry about that. It is a Unix CentOS 5 flavor, running on Media temple's DV VPS server. Yes it is shared, however I actually have several sites running on Media Temple and everyone of them runs very well. Wordpress, a custom PHP app using smarty templates we have developed, as well as another zen cart in development all run really well.

This site is the only one hosted on this VPS.

23 Jun 2009, 11:11 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: High Parse Times - Query times OK

Media temple's DV VPS server

This site is the only one hosted on this VPS.

Your experience with them differs from any that I have...
What resources does this VPS have
% CPU
% CPU burst
RAM

Zen-Venom Get Bitten

24 Jun 2009, 1:26 AM
#5
bodyjewels avatar

bodyjewels

New Zenner

Join Date:
Feb 2009
Posts:
9
Plugin Contributions:
0

Re: High Parse Times - Query times OK

That I cannot answer, I only know that we have a dedicated 256M Ram, and 20G of storage. I do not know the CPU questions nor can I find anything like that. I can tell from experience with another site on the same platform, that serves over 10,000 pages per day of php/smarty cache, and the CPU usage sits at around .20 percent during peak. .10 average. Parse times around .10 or so.

What I noticed and when this became very apparent. Was when we switch from a full dedicated box, to the VPS. Her traffic does not warrant a full ded.

What used to be 4 or 5 seconds delay, has now ballooned to a full 20 seconds. Everything seems to point to a cache issue IMHO.

24 Jun 2009, 2:53 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: High Parse Times - Query times OK

If the query time is low but the parse time is high, that generally indicates that the processing of the PHP instructions is what's taking up the most time. This usually suggests that the server's CPU load is too high, because the delays are in PHP processing, and not in the database queries.

.
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.

24 Jun 2009, 3:06 AM
#7
bodyjewels avatar

bodyjewels

New Zenner

Join Date:
Feb 2009
Posts:
9
Plugin Contributions:
0

Re: High Parse Times - Query times OK

Thanks for chiming in DB. I would agree with you on principle, however it is only when you first hit the site. Every other subsequent request, parse times are .5 or so. A bogged down server would repeatedly have slow parse times.

One other thing to note is that it does not matter what time of day this occurs. It can be 2 am or 7pm and I still get the same results. something that would not indicate a slow server.

Also DB Server is local(same machine). Slow server = slow DB query and parse.

Thanks for the input so far.

As I think back to what we modified, I wonder if some of the custom code I had written for the home page might be causing it. We modified the home page to show featured products, and to provide a drop down controller to select collections (manufacturers).

Although 50 queries is really low for a start page, what I would really like to know is if anyone else is seeing the same high parse times.

24 Jun 2009, 10:27 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: High Parse Times - Query times OK

BodyJewels:

I would agree with you on principle, however it is only when you first hit the site. Every other subsequent request, parse times are .5 or so.You didn't mention that before.

BodyJewels:

A bogged down server would repeatedly have slow parse times.Generally speaking, yes.

BodyJewels:

Also DB Server is local(same machine). Slow server = slow DB query and parse.To some degree, yes, although sometimes the database can return data quickly even if the rest of the server's performance is poor.

BodyJewels:

As I think back to what we modified, I wonder if some of the custom code I had written for the home page might be causing it.That's usually a major contributing factor.> BodyJewels:

We modified the home page to show featured products, and to provide a drop down controller to select collections (manufacturers).If that pulldown is large, then yes the page draw time could be long ... for a couple reasons:
a) pulldown menus have to loop through a bunch of data to draw the HTML for each option
b) if the list is very long it increases the page "size" and all that content must download to the browser.

BodyJewels:

Although 50 queries is really low for a start page, what I would really like to know is if anyone else is seeing the same high parse times.I understand why you'd ask that question. But it's the wrong question. Whether others answer yes or no to that question, you still have the problem which is unique to your specific site, with your specific addons, and your specific customizations, and also your specific data (prods, manufacturers, categories, images, etc). Oh, and your host.

I would suggest temporarily removing the code that draws the pulldown you added, and see what effect that has on the page.

Additionally, you said the problem happens "when you first hit the site". But you didn't indicate whether it's specific to the Home Page, or just the first hit to the site (which also is generally the home page).
What if you go directly to a certain category by using that category's URL, instead of the home page, when "first hitting the site"? Does the same delay happen?
What happens if you navigate to some other pages on your site, and then come back to the home page? What then?
And, then try navigating to some other pages, and clear your browser's cache before navigating back to the home page again.

And, if you use the websiteoptimizer website, what does their tool tell you about the size of your home page vs other pages?

.
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.

25 Jun 2009, 6:13 AM
#9
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: High Parse Times - Query times OK

BodyJewels:

I would agree with you on principle, however it is only when you first hit the site. Every other subsequent request, parse times are .5 or so.
As this is A VPS and I assume is only serving the cart - ask host how to set "cache to stay alive" longer

Zen-Venom Get Bitten

25 Jun 2009, 6:19 AM
#10
data_digger avatar

data_digger

Zen Follower

Join Date:
Jan 2009
Posts:
222
Plugin Contributions:
2

Re: High Parse Times - Query times OK

kobra:

As this is A VPS and I assume is only serving the cart - ask host how to set "cache to stay alive" longer

I don't think it's that good solution. Track the problem, don't hide it with cache. Try using this tool to find code that takes so much time to execute:

adepteo.net/profiler/