Zen Cart Logo
Forums / General Questions / Excessive CPU Usage

Excessive CPU Usage

Locked

Views: 3,289

Results 1 to 20 of 20
This thread is locked. New replies are disabled.
23 Dec 2008, 1:28 PM
#1
alext avatar

alext

New Zenner

Join Date:
May 2007
Location:
Perth, Australia
Posts:
54
Plugin Contributions:
0

Excessive CPU Usage

I have a small zen-cart shop with around 200 products. My shared hosting provider has recently sent me a email saying that my account CPU utilisation has reached an excessive level and that it will be suspended unless we upgrade. The upgrade option is VPS. I can not believe this! Admittedly, we use USEO and usercurrency add-ons that can be CPU intensive, but it is hard to imagine that this would go beyond shared hosting. I am looking for an advice whether my shop really needs VPS or it is small enough for shared hosting.

Many thanks,
Alex

23 Dec 2008, 1:39 PM
#2
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Excessive CPU Usage

should be fine for shared hosting as long as its a good box and setup correctly

23 Dec 2008, 1:46 PM
#3
alext avatar

alext

New Zenner

Join Date:
May 2007
Location:
Perth, Australia
Posts:
54
Plugin Contributions:
0

Re: Excessive CPU Usage

I have just checked: the of Number of Queries is often around 650. Is this excessive for shared hosting?

Thanks,
Alex

23 Dec 2008, 2:12 PM
#4
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Excessive CPU Usage

not really
we have several accounts that run over 2000 queries per page

23 Dec 2008, 2:25 PM
#5
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Excessive CPU Usage

I know from experience that USEO is not CPU intensive but never used the "usercurrency" add-on so not sure.

Also, for example, if you are using a Hoster charging less than 30 cents per GB of Data transfer for your Hosting package, they could be lowering many of your Service levels in order to offer them at that price. And their servers are usually overloaded as well.

Both of these are common tactics used by Hosters competing on price.

23 Dec 2008, 2:27 PM
#6
alext avatar

alext

New Zenner

Join Date:
May 2007
Location:
Perth, Australia
Posts:
54
Plugin Contributions:
0

Re: Excessive CPU Usage

Thank you, Merinpa1969, your replies are much appreciated!

23 Dec 2008, 2:42 PM
#7
alext avatar

alext

New Zenner

Join Date:
May 2007
Location:
Perth, Australia
Posts:
54
Plugin Contributions:
0

Re: Excessive CPU Usage

Website Rob:

I know from experience that USEO is not CPU intensive but never used the "usercurrency" add-on so not sure.

Also, for example, if you are using a Hoster charging less than 30 cents per GB of Data transfer for your Hosting package, they could be lowering many of your Service levels in order to offer them at that price. Servers are usually overloaded as well.

Both of these are common tactics used by Hosters competing on price.

Well, this is far from the cheapest hosting and also is considered one of the better ones, this is why I am wondering.

23 Dec 2008, 2:57 PM
#8
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: Excessive CPU Usage

If you have ssh access run top at the command line this will show where all the cpu over head is coming from.

23 Dec 2008, 3:19 PM
#9
alext avatar

alext

New Zenner

Join Date:
May 2007
Location:
Perth, Australia
Posts:
54
Plugin Contributions:
0

Re: Excessive CPU Usage

skipwater:

If you have ssh access run top at the command line this will show where all the cpu over head is coming from.

This really pushes my boundaries. Even if I had the ssh access, I would not know how to use it. Can this be done through cpanel?

Thanks,
Alex

23 Dec 2008, 3:31 PM
#10
drbyte avatar

drbyte

Sensei

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

Re: Excessive CPU Usage

If you're running a store with only 200 products, and you're only hitting 650 queries per page, and your hosting company is saying that's consuming too much CPU and/or using too many database queries, then your hosting is clearly not geared towards ecommerce.

Granted, such a statement assumes that you've not got a lot of other things added to your site other than what comes out-of-the-box with a clean uncustomized Zen Cart install. Maybe you've got something else running that's pushing it through the roof.

Either way, if you look at the list of Certified Hosts (link at top of the page), you'll see services and pricing where a site with "200 products and 650 queries per page" will not be a problem at all.

Now, before someone goes challenging the "650 queries per page" issue, note that the v2 edition of Zen Cart uses WAY LESS queries per page. But that's not going to fix the problem with your poorly-configured/tuned server limitations imposed by your hosting company.

23 Dec 2008, 4:05 PM
#11
alext avatar

alext

New Zenner

Join Date:
May 2007
Location:
Perth, Australia
Posts:
54
Plugin Contributions:
0

Re: Excessive CPU Usage

The shop is 1.3.7 with the following contributions:

advanced_search_results_fix__optimization_1-0
ask_a_question_1.7
backup_mysql_plugin_v1.3
bettercategoriesezinfo_v1.3.5
blank_sidebox_2.0a
column_layout_grid_for_product_listing_1.3.61.3.7
direct_bank_deposit_0.1
encrypted_master_password_1.1
EP_v1.2.5.4
export_shipping_information_1-2-3
ezpages_on_sitemap_v_1.01
google_adsense_sidebox_1.3.0.2
google_sitemap_1-3-19
image-handler_2.0-zc13
Links_manager
optional_shipping_insurance_module_3.10
order_steps__tableless_2-2
paymate_v2.2
paypal_verified_logo_1.0.6
PPEC-137-patches-March21-2007
printable_pricelist_pricelist_v1.3pre2
privacy__condition_statements_1.1
Quick_Price_Search_with_Multi-currency_Support
recover_cart_sales_3.00
rss_feed_2-1-4
sales_report_rev104
search_log_2-0
security_patch_v138_20080919.php
shopmaniacom_automated_datafeed_generator_1.04
shopping_cart_with_image_sidebox_1.1
short_description_for_categories_1.0
simple_google_analytics_1.1.1
social_bookmarking_1.4
testimonial_manager_v1-4-6
ultimate_seo_urls_2-105
usercurrency_2-13
whats_new__products_v1.2
wlps_feeder_v1.04
ypsf_v1.05
zencart_HoverBox3_rc2

Does this make much difference?

These are the offending processes:
Top Process %CPU 27.6 httpd [matryoshkastore.com] [/index.php?main_pageproduct_info&cPath49&products_id1006]
Top Process %CPU 18.3 httpd [matryoshkastore.com] [/bmz_cache/a/a62c741a1133ee4fc7efa6a5a66d16b8.image.100x80.]

Thanks,
Alex

23 Dec 2008, 4:55 PM
#12
kobra avatar

kobra

Black Belt

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

Re: Excessive CPU Usage

The shop is 1.3.7 with the following contributions:
With a list like this it really bears asking if you have made sure that each and every file that is a "replicate" or stated differently - If more than one module changes the same file - - If these have been merged properly to contain the alterations for each module?

To reiterate others comments: We also have several shops with many nested attributes generating 4,000+ querries and these run fine at about 1 sec parse time.

23 Dec 2008, 5:40 PM
#13
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Excessive CPU Usage

Top Process %CPU 27.6 httpd [matryoshkastore.com] [/index.php?main_pageproduct_info&cPath49&products_id1006] isnt a valid link

Top Process %CPU 27.6 httpd [matryoshkastore.com] [/index.php?main_page=product_info&cPath49&products_id1006]

and this shows a page not found.

23 Dec 2008, 6:55 PM
#14
drbyte avatar

drbyte

Sensei

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

Re: Excessive CPU Usage

AlexT:

http://matryoshkastore.com/index.php?main_page=product_info&cPath49&products_id=1006

That page does take forever to load, and when it does load, it's immediately redirected to an SEO-reformatted URL: http://matryoshkastore.com/christmas-tree-nesting-dolls-3-pc-p-1006.html

I recommend turning off your SEO addon and your image-handler addon, as a start, and see if the pages load any differently.
The image-handler addon is quite cpu-intensive when it's rendering images.

However, I suspect the problem is likely with something else that's doing database-intensive things, such as cross-sell tools, rss feeds, extra displays of customized product information, etc.

Given that that particular product has no attributes, and only one additional image, there is no good reason for it to take forever to load, unless you've got addons that are going off and doing something very inefficiently.

23 Dec 2008, 10:03 PM
#15
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Excessive CPU Usage

rss_feed_2-1-4 << there's your problem

From experience I know that any currently available RSS mods for Zen Cart are going to cause high CPU load and/or other problems as well.

I advise Clients I work with to only use RSS mods if they know for a fact, it will be used and there is a high expectation of a good ROI. Because there is a good chance, if their eCommerce script has 100 or more Products with or without Attributes, a Shared Hosting account will no longer be suitable for them; or for their Hoster. :smile:

24 Dec 2008, 4:22 PM
#16
stuff4toys avatar

stuff4toys

Totally Zenned

Join Date:
May 2007
Location:
SW Florida
Posts:
1,062
Plugin Contributions:
1

Re: Excessive CPU Usage

Website Rob:

rss_feed_2-1-4 << there's your problem

From experience I know that any currently available RSS mods for Zen Cart are going to cause high CPU load and/or other problems as well.

I advise Clients I work with to only use RSS mods if they know for a fact, it will be used and there is a high expectation of a good ROI. Because there is a good chance, if their eCommerce script has 100 or more Products with or without Attributes, a Shared Hosting account will no longer be suitable for them; or for their Hoster. :smile:I use that rss feed module on two stores and have had no complaints from my hosting partners.
www.nativitydisplays.com is on GoDaddy shared hosting
www.jmkerusso.com is on BlueHost shared hosting

Granted the BlueHost server with localhost MySQL server is much faster, but both sites are fine.
JOhn ><>

25 Dec 2008, 11:39 PM
#17
alext avatar

alext

New Zenner

Join Date:
May 2007
Location:
Perth, Australia
Posts:
54
Plugin Contributions:
0

Re: Excessive CPU Usage

Thank you so much for all your replies!

It appears that there was a problem with the server rather than with my store. I received the following email from the host: > We have suspended a few users and as you can see the server load has come down a lot. I suspect the fact that others were abusing the CPU may have spiked everyones CPU usage. We will leave it at this for now, and give you updates should your CPU usage continue to be high. It all seems to be OK now.

The addons I listed were added one by one over a period of time, they never caused any problems. I will probably remove the rss mod just to save a bit of CPU time as there are not too many subscribers.

Many thanks,
Alex

25 Dec 2008, 11:44 PM
#18
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Excessive CPU Usage

Hats off to you actually keeping track of what you have installed. Although it sounds obvious, my impression is that most people don't and I often end up doing forensic examination of sites presented for upgrade to try to work out as accurately as I can what mods might cause problems. So although i wouldn't recommend this many add-ons (upgrader's nightmare) you deserve credit for being able to be so specific about the history of your site.

26 Dec 2008, 12:27 AM
#19
alext avatar

alext

New Zenner

Join Date:
May 2007
Location:
Perth, Australia
Posts:
54
Plugin Contributions:
0

Re: Excessive CPU Usage

kuroi:

Hats off to you actually keeping track of what you have installed. Although it sounds obvious, my impression is that most people don't and I often end up doing forensic examination of sites presented for upgrade to try to work out as accurately as I can what mods might cause problems. So although i wouldn't recommend this many add-ons (upgrader's nightmare) you deserve credit for being able to be so specific about the history of your site.

Thanks, but I do not think I will be able to upgrade. When the time comes, I will built a new site, this seems to be so much easier. The only hope is that some of the more popular addons are integrated into the new release.

Cheers,
Alex

26 Dec 2008, 4:06 AM
#20
colemanpa avatar

colemanpa

Zen Follower

Join Date:
Oct 2007
Location:
Fairbanks, Alaska
Posts:
423
Plugin Contributions:
0

Re: Excessive CPU Usage

AlexT:

The only hope is that some of the more popular addons are integrated into the new release.

Cheers,
Alex

you can read all about what's included here http://www.zen-cart.com/forum/showthread.php?t=116018

pete