Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » New Versions, & Updating »

Number of Queries and CPU Usage getting worse with each version


  #1  
Old Jul 13, 2009, 04:28 PM
extremecarver
 
126 posts · Jul 2009
Number of Queries and CPU Usage getting worse with each version

I don't know how you and your websites cope with it, but as much as I like atahualpa for its adaptibility and options, as much I hate it for it's abuse of CPU Cycles and queries.

Using wordpress default theme I can get by with around 50 queries per pageview with all my plugins activated. Going for atahualpa this goes up to 120 queries on 3.3.4 or 160 queries with 3.4.1

Simply said it's a disaster and doubles the time to build a site. This goes so far that even with wp-superchache in full on or bad behaviour on and wp-supercache half-on in the evening my dedicated server crashes (celeron 2.8 ghz, 1GB Ram, running Suse and 2.6.29 kernel).
My site ( www.openmtbmap.org ) gets currently bout 10.000 pageviews a day, so this should not be a big problem.

However with each atahualpa version cpu-use got more devastating leading to a lot downtime of my site.

Is anyone actually running atahualpa on a page with say 10.000 visitors a day without getting problems with CPU usage? I got banned from my first hoster for cpu-usage and now I have problems keeping my own server from crashing.

Atahualpa is the main culprit for this. I have tried out more or less any cpu wordpress optimization guide, but using atahualpa seems to be attacking from the wrong side. Because over 10.000.000 database queries each day are simply too much for a simple site.

inline vs external css options showed no improvements at all.
  #2  
Old Jul 15, 2009, 01:23 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
If you save the options of each menu tabs the number of queries goes down. Run your site with another theme and see if that helps you as much as you think. You may be overestimating the resource usage of Atahualpa based on that number of queries. Reading is cheap in MySQL, and if you run super cache you shouldn't have the queries on each page view.

If you think that CPU usage is an issue then having CSS and JS internal will be better.
You could also create a static CSS file after you're done with customizations.

But I don't think Atahualpa is the sole reason for your issues. Your site takes 4.5 seconds to render. There's no reason why it should be that slow. On a fast server it should render in 0.1-0.3 seconds with a bunch of plugins. On a budget host still below 1 second. You also seem to have 2 different kinds of caching active while none of them seems be actually working.

If you try another theme, make sure you leave all that other stuff on as well for a fair comparison.

Last edited by Flynn; Jul 15, 2009 at 01:30 PM.
  #3  
Old Jul 18, 2009, 10:59 PM
pwsolutions
 
1 posts · Jul 2009
Unless you have your max-queries set abysmally low, the number of queries from Atahualpa is certainly not your problem.

I rewrote Atahualpa 3.2 to use a database for its options and php objects to display the pages and managed to get the number of queries per page down to between 10 and 20...less than the default theme.

The result from a speed standpoint was a measly 0.05 to 0.08 seconds off of each page. ( 0.12 to 0.18 compared to 0.21 to 0.25 or so )

So...the queries shouldn't be an issue. But if you are certain that they are, you might want to see if your mysql max-queries setting is too low as that could definitely be problematic on a high traffic site.
  #4  
Old Jul 19, 2009, 02:32 PM
extremecarver
 
126 posts · Jul 2009
Thanks for your answers, I did not reply yet because I still have not implemented them with testing.

I saved all subpages and am down to 48 queries, speed improvement more or less none. deactiving db_cache helped a bit to get down cpu use, db_cache tries to minimize queries too, but somehow does not work on my main site server, I have another site where I run a backup of my site ( www.extremecarver.bplaced.net ) so people can access my site if on my main site my server has crashed.....

I will try out moving to static css tonight, to see if it makes any difference.
I really don't understand what is wrong and why my site loads so slow (I was kicked out from my first (budget) hoster for CPU use, but would expect a Celereon 2.66ghz with 1GB running newest Suse 11.1 with all updates and Plesk as interface to be able to cope with the load, especially if moving wp-supercache AND widget cache for all but two light widgets). When using php_speedy I got pageload times around 100seconds, so php_speedy made it even worse....

atahualpa doubled my page load time on my backup site versus standard skin. So 0.5 vs 1 sec. On that page I also experimented by deleting all plugins (moving them to another folder) but that would not improve page-load time either by a lot.

Current issues with my server: e_accellerators not installed (supposedly halves the cpu time) and mod_headers not in appache. I can't find out how to integrate either though, as I don't really understand how to do it with plesk, and adding those two things with yast seems to have no effect.

Is max-queries changeable with myphp (will edit this it if I find out via google)?

My current page load time, with server idle is around 3 seconds, so there has to be something drastically wrong. It's difficult for me to notice changes, as cpu load usually races up to 2-3 on a singlecore machine because of backlogs waiting to be processed.

edit: okay I got mod_headers enabled (it was already installed). cannot yet see any improvement. My next step is trying to find out about eaccelleration on suse 11.1

maybe something in .htaccess wrong (i think most is really needed)???:
Code:
# Expire images header
ExpiresActive On
ExpiresDefault A0

ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType image/jpg A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/ico A604800
ExpiresByType application/pdf A604800
ExpiresByType text/css A6040800
ExpiresByType text/javascript A6040800
ExpiresByType text/html A6040800


# KILL THEM ETAGS
# FileETag none
# Header unset ETag 
FileETag None


# BEGIN WPSuperCache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
AddDefaultCharset UTF-8
RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$
RewriteCond %{HTTP_user_agent} !^.*(Android|2.0\ MMP|240x320|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|hiptop|IEMobile|iPhone|iPod|KYOCERA/WX310K|LG/U990|MIDP-2.0|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|Playstation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|Windows\ CE|WinWAP).*
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f
RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]

RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$
RewriteCond %{HTTP_user_agent} !^.*(Android|2.0\ MMP|240x320|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|hiptop|IEMobile|iPhone|iPod|KYOCERA/WX310K|LG/U990|MIDP-2.0|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|Playstation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|Windows\ CE|WinWAP).*
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]
</IfModule>

# END WPSuperCache

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

Last edited by extremecarver; Jul 19, 2009 at 04:00 PM.
  #5  
Old Jul 19, 2009, 07:45 PM
bushtool's Avatar
bushtool
 
93 posts · May 2009
According to pingdom, you have over 700k in image files. I am running about 90 plugins (I'm a plugin and sidebar junkie) on my site on a budget host and test out only a few seconds slower than your site, www.d4v.org.

A couple of things that helped me a lot were ImageShack Offloader plugin and Use Google Libraries plugin.
  #6  
Old Jul 20, 2009, 04:29 AM
extremecarver
 
126 posts · Jul 2009
Bandwith is not a problem at all (yet), so offloading images will not help much.
Although i have unlimited traffic (really unlimited), my map downloads go into the TB region every week, so no worries yet about that. The website traffic (1-3GB a day) is minimal compared to the map download traffic (about 100-400GB a day).
Its mainly the frontpage with lots of images.

I am working on getting xcache or eaccelerator compiled on Suse 11.1, but seem to be doing something wrong there.

I did configure my httpd.conf settings a bit and now my server-load is pretty stable (mostly around 0.2 - 1, not going into 20-30 region anymore) and redirect .com and www to http://mydomain.org so that supercache creates no copies of identical sites for the different domain aliases.

The main problem of why my sites take 3-4 secs to load still consists however....

I will try out wp supercache plus, maybe its faster.....
  #7  
Old Jul 29, 2009, 11:53 AM
3ukman
 
22 posts · Jul 2009
Quote:
Originally Posted by Flynn
If you save the options of each menu tabs the number of queries goes down.
I just saved all tabs and queries are down to 36 from 120. That is 36 from 120.

Could you give us a script that does this , or include in a future release.

I was considering switching theme when I saw 120 queries .. but this is much better...

Also , does it mean if more options are set different from default , then more queries.... ?

Last edited by 3ukman; Jul 29, 2009 at 11:56 AM.
  #8  
Old Aug 7, 2009, 05:26 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
I will change that in the next or next but one release
  #9  
Old Oct 27, 2009, 01:39 PM
Gravity's Avatar
Gravity
 
34 posts · Sep 2009
Quote:
Originally Posted by Flynn
I will change that in the next or next but one release
I'm unsure if this has been done in the latest version? It doesn't appear to be.

Last edited by Gravity; Oct 27, 2009 at 01:43 PM.
  #10  
Old Apr 27, 2010, 05:27 PM
Gravity's Avatar
Gravity
 
34 posts · Sep 2009
Hi,
I gather this bug/issue remains, am wondering if it is slated to be fixed in a future version?

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL queries for option parameters gejba Atahualpa 3 Wordpress theme 5 Jan 20, 2010 11:58 AM
[SOLVED] Can't upload the latest version to my Dashboard because I have older version rhymes New Versions, & Updating 2 Apr 25, 2009 10:22 PM
Debug Queries js9600 Plugins & Atahualpa 0 Apr 23, 2009 08:25 PM
Pages not odering according to number jamaas Atahualpa 3 Wordpress theme 4 Mar 20, 2009 06:52 AM
Usage of Affiliate Link Cloakers Nefeli Atahualpa 3 Wordpress theme 1 Feb 26, 2009 06:22 PM


All times are GMT -6. The time now is 12:46 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.