SLTy Plugins

WordPress Plugins that are both practical and Spirit-Led.

 

WP Tuner 0.9.5 Comment Thread

This release: fixes all bugs reported to date. As part of my bug-hunting, I added more low-level capabilities (only of use to die-hard tech folk):

  • Once installed, a tech can use WP Tuner to debug issues in WP’s installation sequence. A few lines of code in the install and/or admin footer allow use of wptL() debug logging. This made it relatively easy to track down a subtle install-time bug in WordPress that was affecting WP Tuner and other plugins.
  • WP Tuner Diagnostics now display plugin names and version numbers for all plugins (whether activated or not.) This is one tiny step toward my goal of providing community-wide plugin performance tuning.

Please post your comments and questions below. I reserve the right to snip inappropriate commentary, flame wars and so forth.

We’re just getting this blog started so I apologize in advance for not having all of our rules laid out already. I intend to write occasional blog posts describing techniques for improving the performance of WordPress. Feel free to ask your hot questions here!

If you are reporting a problem:

  • Please set Debug Level to 1 and copy the wpTuner Diagnostics report here
  • If a specific plugin or widget is misbehaving, please note which one (if you know)

57 Responses to “WP Tuner 0.9.5 Comment Thread”

  1. Xu:

    Can’t manage to set up correctly WP-Tuner. Btw, the wp-config.php hasn’t been modified.

    Analysed in 0.003 seconds.
    wpTuner Diagnostics
    Debug level: 1
    User level: 10
    WP version: 2.0.11
    PHP version: 4.3.9
    MySQL version: 3.23.58
    WP theme: bj06 - nospam
    WP Tuner is not correctly configured. Please go to the Settings page using the link above, and set it up correctly. Render Time: 1228321892.564 sec (0.0% for queries). DB queries: 10, None defective, none slower than 0.500 seconds. Memory: 9.3MB
    Performance Analysis
    Queries triggered by plugins calling Core functions are charged to: The Plugin
    Yellow-highlighted rows indicate slow elements (more than 0.500 seconds)
    Page Generation Performance (Order: Chronological)
    (Tech note: If output buffering (OB) is not enabled at init, WP Tuner enables it so output size can be tracked.)
    Index Marker %Time %DB Time %DB Count Time DB Time DB Count Memory Output
    (msec) (msec) (kb) lev(bytes)
    0 Start 100 0 50 1,228,321,892,265.3 0.0 5 ?
    1 plugins_loaded 0 0 20 160.5 0.0 2 7,885.7 0()
    2 init 0 0 20 109.5 0.0 2 8,798.3 0()
    3 admin_head 0 0 0 18.4 0.0 0 9,504.5 1(1668)
    4 admin_notices 0 0 10 9.7 0.0 1 9,529.2 1(4872)
    5 admin_footer 0 0 0 0.2 0.0 0 9,501.0 1(12356)
    6 Stop 9,501.1 1(12356)
    Total 100 0 100 1,228,321,892,563.7 0.0 10

    Cannot display query analysis. WP Tuner is not correctly configured.

    Thanks for this plugin and your help!

  2. Mr Pete:

    Re: Xu (#1),
    Thanks for the feedback, Xu! I hope that I can help you get it running.

    Can I assume you have loaded the current version of WP Tuner?

    If WP Tuner knows that it cannot edit the wp-config.php file, it should give you some reasons on the settings page.

    If the wp-config.php file cannot be edited, then there is a problem with directory or file permissions on your host.

    I would like to know what WP Tuner is saying on its settings page… if it is not explaining the issue very well, I would be happy to help. And what we learn will help me provide a better explanation in a future version of the plugin!

    Thank you for being patient with me to make WP Tuner as easy as possible… even in situations where it is not able to automatically do everything correctly.

  3. ovidiu:

    similar issue here. wp-tuner is bullshitting me ;-)

    my permissions are set up correctly :-) it complains it needs at least 0644 but it already has 0775 - whats the point here? Besides this is a wpmu install, all the other wp isntalls have the same permissions btw….

    * wp-config.php can’t be written. Permissions are 0775, and should be at least 0644.
    * If Auto-config remains broken, please find a way to add the following code after your DB_* definitions in wp-config.php:

    //-WP Tuner Plugin by MrPete————
    //————————————–
    $wpTunerStart = microtime(); // get start time as early as we can
    if ( function_exists( ‘getrusage’ ) ) { $wpTunerStartCPU = getrusage(); }
    @include_once(dirname(__FILE__).’/wp-content/plugins/wptuner/wptunertop.php’); // fire up WPTuner
    //————————————–
    //-END WP Tuner Plugin——————

  4. Mr Pete:

    Re: ovidiu (#3), good one :)

    Haven’t seen too many of these in the “wild” so the error message could easily miss your situation.

    Here’s a guess: those permissions are for the file, but perhaps the directory doesn’t have enough permission?

  5. ovidiu:

    your guess was right, dunno how that happened. thx. usually I use chown and chmod with the “-R” option which should propagate down to every file :-(

  6. Patung:

    Hi, just a couple of things that I can’t understand about the output…when I visit my homepage it always says that get_footer is using a lot of resources, 61% of time and 1,084.9 msec but 0 DB time, but when I view any other page on the site get_footer uses only about 0.5 Time, but I have the same footer file on every page of the site.

    Also on the home page, in the SQL Table Performance (Order: DB Time) section, there is a Table called “-a-policeman” listed at the bottom of the list, but there is no table called that in my database.

  7. thomas:

    Hi … thx for this plugin …. ut i have a little problem. i am running wp 2.7. and the latest version of your plugin and i allways get the error message : Configuration appears correct, yet WP Tuner could not be loaded before wp-db.php, so SAVEQUERIES is not defined. WP Tuner is unable to analyze your database use. If you need further help, please contact MrPete.

    what can i do … ? i really need this …

    thx a lot !!!!

  8. Pete:

    Re: Patung (#6),
    Patung I apologize for the delay… I’ve been away.

    “get_footer” time is not just the time for that function, but everything from that item to the next marker.

    Normally, get_footer would be pretty quick… just final send of your page data.

    Here’s my guess: something has registered a filter that is doing some big edits to your home page data before it gets sent out. It’s doing it after the home page HTML is generated. I’d look at the different plugins you are using. Worst case, start disabling plugins to see what is causing it.

    The “-a-policeman” problem suggests to me you either have a complicated query my code could not decipher, or even a bad query. Turn on query analysis. It will show you the actual text of every query. I’m 99% certain you will find “policeman” in the text of one of your queries.

    If the query is actually ok, please send the query text to me, either post it here or email it.

    Thanks!

  9. Pete:

    Thomas,
    That usually means something has modified your wp-config.php file.

    Have you tried deactivating and reactivating the plugin?

    If that did not help, and there are no other errors, let’s work together to find out what is going on.
    The first step would be to email me your wp-config.php file, without the mysql login/password lines. Send it to webbed dot pete at gmail dot com

    OK?

  10. twincascos:

    Hello, and thanx for the very smooth plugin.
    I’m using the plugin, multiblog, which allows for running numerous sites off of on system install.
    Consequently the config files are in a different location. WP-Tuner says:
    Configuration Incomplete. Number of errors: 1
    (Fix issues in the order presented. One issue may be the actual cause of all errors. Reload this page two+ times after making any change. If the problem is not resolved, deactivate and reactivate again.)

    * wp-config.php can't be read. Permissions are 0644, and should be at least 0644.
    * If Auto-config remains broken, please find a way to add the following code after your DB_* definitions in wp-config.php:

    I have added the required code to various files which may reach the check:
    $wpTunerStart = microtime(); // get start time as early as we can
    if ( function_exists( 'getrusage' ) ) { $wpTunerStartCPU = getrusage(); }
    @include_once(dirname(__FILE__).'/wp-content/plugins/wptuner/wptunertop.php'); // fire up WPTuner

    As far as I can tell the results are correct, but the install check continues to fail.

  11. twincascos:

    Just a couple more comments,
    1. you are loading style into body which doesn’t comply,
    try using this in your plugin:
    add_action ( 'template_redirect' , array( &$this,'add_css_function' ) );

    2.you have this :
    which should be :

    3. All of your breaks need a trailing space, instead of this:

    you need to replace all with this:

    4. I would remove the text size from your css, then the text will be the size of the users css, 10px is hard to read for an old man like myself. Or at least make it 1em instead.
    div.wptuner (line 382)
    font-size:10px;

    Just a few suggestions to improve tuner a little bit. I hope you don’t mind.
    Thanx,

  12. twincascos:

    ok points 2 and 3 were interpreted, that was : br clear=’all’ which should be: br style=”clear:both;” , and all of your breaks need a space before the closeing slash. />

  13. Patung:

    Pete, well both problems seem to have fixed themselves now, I have nothing abnormal going on anymore on the front page. Previously I had a wrongly coded query_posts call on the front page, which might have been the problem….. The -a-policeman string was taken from a url from my forum, which runs on a plugin, but that problem is gone now too.

  14. Pete:

    Re: Patung (#13),
    Bad code can easily cause the trouble you saw. That’s one of the hard parts about debugging: often the trouble you see is only a hint about the real problem.

    If you don’t mind saying, Which plugin does your forum run on? I’m testing forum software right now; perhaps I’ll end up duplicating the problem.

  15. Pete:

    Re: twincascos (#10),
    Wow, you found some great things to work through!
    Multiblog presents an interesting challenge. I wonder which solution would be best. Any thoughts? Here are some ideas:
    1) Work out specific support for multi-blog so the warning will go away. [Solves your issue but perhaps not for other similar challenges.]
    2) Auto-silence the warning if wptuner appears correctly configured, even though it can’t find wp-config. [In this case I'd switch to a different caution statement, something like "WPTuner cannot find wp-config.php -- to remove WPTuner, you must remove the code in wp-config.php yourself"]
    3) Provide a checkbox that lets you certify you’ve hand-installed the wp-config code. Then I’d be comfortable adding no other warnings, except for a reminder when you uninstall.

    Size: I’m in a catch-22 on that one. I want the text to be “small” whatever that means in context. If I don’t set a size, it inherits… not from the main blog CSS but from the footer. It’s amazing how many themes assume the entire footer only contains the text added by the theme author! So allowing the size to inherit (1em or whatever) doesn’t work most of the time. Suggestions?

    Loading style: you caught me being lazy :) … will clean that up. BTW, how do you use template_redirect for that? That hook comes before even the top part of the header!?

    Breaks: also a good catch on conversion to css. However, I don’t see any value to inserting blanks before the final slath. It’s not part of any standard, and the only browser that needs it (NN4) is long gone.

    Anyway, thanks much! Feedback appreciated on the questions I raised.

  16. Patung:

    It’s Simple Press Forum, http://simplepressforum.com/ I’m on version 4 but there is an upgrade to that which I haven’t used yet. Might be interesting if you take a look at it because you might have something to say about the db queries it does, it’s quite a lot I think but using wp tuner none of them show up as slow….

  17. AndyII:

    Technical issue: Configuration appears correct, yet WP Tuner could not be loaded before wp-db.php, so SAVEQUERIES is not defined. WP Tuner is unable to analyze your database use.

    wpTuner Diagnostics
    Debug level: 1
    User level: 10
    WP version: 2.1.3
    PHP version: 4.4.4
    MySQL version: 4.1.11-standard
    WP theme: Slick Adsense
    WP Tuner is not correctly configured. Please go to the Settings page using the link above, and set it up correctly. Render Time: 1237250052.300 sec (0.0% for queries). DB queries: 14, none defective, none > 0.500 sec. Memory: 10.7MB

  18. Pete:

    Re: AndyII (#17),
    AndyII, I’m on the road right now in meetings. ASAP, I’ll attempt to reconstruct your setup and find the issue.
    Can you give me the list of your installed plugins please?

    Thanks

  19. Ira:

    I’ve got the WP Tuner plugin installed and running fine, I’m just a little unclear how to interpret the results. The most common item that it highlights is under “Page Generation Performance” and it’s the top item that is just called “Start”. Can you provide any suggestion on what this might mean, or how approach the problem to get more detail? Thanks.
    WP:2.7.1
    PHP:4.4.8
    MySQL:not sure
    Any other info you might need? Thanks!

  20. Guczo:

    I get the same message as AndyII.
    Plugins:
    All in One SEO Pack 1.4.9
    Author Image 3.1.2
    Cimy User Extra Fields 1.4.0
    Clean Options 1.1.9
    Comment Approved Notifier 2.0
    Configurable Tag Cloud 4.5
    Contact Form 7 1.9.4
    Email Users 3.1.6

    Allows the site editors to send an e-mail to the blog users. Credits to Catalin Ionescu who gave me some ideas for the plugin and has made a similar plugin. Bug reports and corrections by Cyril Crua and Pokey. Vincent Prat (email : vpratfr@yahoo.fr) által.
    Kikapcsol | Szerkeszt
    Eventr 1.01.2

    Eventr Plugin lets you create events and provides your visitors with a form that lets them register for the event. There is also an option to show the entire attendee list to blog vistors as well. Binny V A által.
    Kikapcsol | Szerkeszt
    Featured Content Gallery 3.2.0

    Used to create a customizable rotating image gallery anywhere within your WordPress site. FeaturedContentGallery.com: plugin page, instructions, gallery and support. iePlexus által.
    Kikapcsol | Szerkeszt
    FeedBurner FeedSmith 2.3.1

    Originally authored by Steve Smith, this plugin detects all ways to access your original WordPress feeds and redirects them to your FeedBurner feed so you can track every possible subscriber. FeedBurner által.
    Kikapcsol | Szerkeszt
    Geo Mashup 1.2.3

    Tools for adding maps to your blog, and plotting posts on a master map. Configure in Settings->Geo Mashup after the plugin is activated. Documentation is on the project site. Dylan Kuhn által.
    Kikapcsol | Szerkeszt
    Get Recent Comments 2.0.6

    Display the most recent comments or trackbacks with your own formatting in the sidebar. Visit Options/Recent Comments after activation of the plugin. Krischan Jodies által.
    Kikapcsol | Szerkeszt
    Plugin Central 1.53

    Automatically installs WordPress plugins by name and URL. Provides automatic update of multiple plugins. Vladimir Prelovac által.
    Kikapcsol | Szerkeszt
    Profiler 1.2.8

    An enhanced version of the Profiler plugin with support for multiple users. It allows you to display the information of every registered user on your site in a special members area. Each user has their own profile which can be modified from the WordPress admin interface by either the user or an administrator. Eric Schulz által.
    Kikapcsol | Szerkeszt
    Reveal IDs for WP Admin 1.1.1

    WordPress 2.5+ only. Reveals hidden IDs in Admin interface that have been removed with WordPress 2.5 (formerly known as Entry IDs in Manage Posts/Pages View for WP 2.5). See Options Page for options and information. Oliver Schlöbe által.
    Beállítások | Kikapcsol | Szerkeszt
    Shadowbox JS 2.0.4.1

    A javascript media viewer similar to Lightbox and Thickbox. Supports all types of media, not just images. Matt Martz által.
    Beállítások | Kikapcsol | Szerkeszt
    Sociable 3.0.6

    Automatically add links on your posts, pages and RSS feed to your favorite social bookmarking sites. Go to Settings -> Sociable for setup. Joost de Valk által.
    Beállítások | Kikapcsol | Szerkeszt
    StatPress 1.3.2

    Real time stats for your blog Daniele Lippi által.
    Kikapcsol | Szerkeszt
    Stray Random Quotes 1.9.5

    Display and rotate random quotes and words everywhere on your blog. Easy to custom and manage. Ajax enabled. ico@italyisfalling.com által.
    Kikapcsol | Szerkeszt
    Subscribe To Comments 2.1.2

    Allows readers to receive notifications of new comments that are posted to an entry. Based on version 1 from Scriptygoddess Mark Jaquith által.
    Kikapcsol | Szerkeszt
    Theme My Login 2.1

    Themes the WordPress login pages according to your theme. Also allows you to redirect users based on their role upon login. Jae Dub által.
    Kikapcsol | Szerkeszt
    Ultimate Google Analytics 1.6.0

    Enable Google Analytics on your blog. Has options to also track external links, mailto links and links to downloads on your own site. Check http://www.oratransplant.nl/uga/#versions for version updates Wilfred van der Deijl által.
    Kikapcsol | Szerkeszt
    Use Google Library Javascript 0.9
    User Photo 0.9.4
    Wordpress Popular Posts 1.4.5
    WP-DBManager 2.40
    WP-DownloadManager 1.40
    WP-Offload 1.0
    WP-Polls 2.40
    WP-Polls Widget 2.40
    WP-SmugMug 2.0.4
    WP Super Cache 0.9.3.1
    WP Widget Cache 0.25.1

  21. Patrice:

    Hello,
    I just downloaded your plugin to help me figure out what’s wrong with my blog. I hope that will help.
    It shows the following in yellow:

    6 admin_notices 6 7 11 1,139.6 0.8 1 ? 1(13284)

    What could that mean?

    Thanks

  22. Jasmine:

    Hello,
    This plugin is working great, I am trying to interpret the page generation section.
    and for the first 5 results are below in ms.
    0 Start 1,692.6
    1 plugins_loaded 10.9
    2 widgets_init 5.8
    3 init 35.4
    4 posts_selection 1,084.7

    Is the site taking long because the database is big or is there another problem I am not seeing?

    full results below.

    Index Marker %Time %DB Time %DB Count Time DB Time DB Count Memory Output
    (msec) (msec) (kb) lev(bytes)
    0 Start 51 2 14 1,692.6 1.0 3 ?
    1 plugins_loaded 0 1 10 10.9 0.3 2 13,127.8 0()
    2 widgets_init 0 0 0 5.8 0.0 0 13,261.7 0()
    3 init 1 2 5 35.4 1.0 1 13,332.1 0()
    4 posts_selection 33 55 19 1,084.7 26.5 4 14,206.0 1(0)
    5 wp_head 2 26 5 73.7 12.7 1 13,629.4 1(2893)
    6 posts_selection 1 12 29 19.9 5.9 6 14,484.3 1(4814)
    7 loop_start 0 0 5 9.9 0.2 1 13,685.2 1(4814)
    8 get_sidebar 1 0 5 26.5 0.2 1 13,678.7 1(6563)
    9 loop_start 10 1 10 328.9 0.6 2 13,681.1 1(10412)
    10 get_sidebar 0 0 0 0.4 0.0 0 13,726.5 1(60681)
    11 get_footer 0 0 0 1.3 0.0 0 13,727.0 1(60681)
    12 Stop 13,739.8 1(60906)
    Total 100 100 100 3,290.0 48.5 21

  23. Jasmine:

    I just added some more code in wpsettings.php and can see that Before the plugins even load Start takes 233ms isn’t this a bit long?

  24. Pete:

    Ira, re (#19),

    If you are able, please try the instructions on enabling plugin-load-timing. The instructions are out on wordpress.org in the extra info (?) tab. By default, WordPress does not permit breaking down the startup code with any granularity, so it is hard to know what is causing your trouble.

    Re: Jasmine (#23),

    Thanks for putting real effort into diagnosing your site! Before we go further: did you add a timing marker before the list of plugins is collected? (i.e. a few lines before the plugin-load loop.)

    You can insert additional markers as you like, up higher in wpsettings.php…

    You are correct, the times you are seeing are long. What does the overall Render Time report (right up at the top) tell you? If you are on a Linux server, it will give you CPU vs Clock time, which will tell you if the problem is due to server overload (from other sites colocated on your server) or just due to your own site.

    Similarly, if you see the same slowness in the middle of the night (or other light-load time), then that’s a hint it is your site and not something else.

    From just the info you provided, I suspect you may have a large site that would benefit from tuning the database? How many posts and comments in the system?

  25. Pete:

    Re: Patrice (#21),
    The yellow simply means that particular line took longer than half a second to be generated, which in general is quite long.

    I can’t really interpret it without seeing more. One yellow row doesn’t necessarily mean one thing is bad… could be that your site is generally a bit slow, and that one line was over the “yellow” edge.

    First thing is, that line would only be generated (AFAIK, just guessing actually!) if you are looking at the admin section. So normally that’s nothing to worry about. Without looking at the code, I’ll guess it is related to the time it took to go out and get updated info from WordPress.com for your admin dashboard page.

  26. Jasmine:

    thanks for your reply.
    I added the markers like you have in the other notes section: http://wordpress.org/extend/plugins/wptuner/other_notes/

    yes my blog is quite big, 16,000 posts

    Render Time: 0.740 cpu sec (78% load, 5.936 startup). Clock: 0.938 sec (5.9% for queries). DB queries: 21, none defective, none > 0.500 sec. Memory: 12.2MB

    Am I right in thinking that the database is fine as it is only taking 17% of the time.
    I also have hypercache installed.

  27. Pete:

    Re: Jasmine (#26),
    That’s a HUGE number of posts. I help with one of the largest blogs. It has less than 2000 posts (but more than 150,000 comments) It generates pages in 1/3 the time yours does.

    Two or three items to consider:

    1) Do you have many plugins? First, get rid (completely, at least move out of the plugins folder) any you are not using. Then consider whether the others, particularly “hogs”, are needed.

    2) Do you use permalinks as well? I hear that slows down several things on Big Blogs.

    3) A distant third: you may want to look at your MySQL stats under phpMyAdmin — your DB, even if looking ok to wpTuner, might in reality be croaking on some aspects.

    But bottom line, your main loop is very slow, most likely because you have so many posts to crunch through.

    (An even more intense exercise: turn on full DB Query display in wpTuner. It will show gory details about each query. The slower ones may benefit from careful index tuning — something that can be done without touching wordpress at all ;)

  28. Jasmine:

    Did the first one after reading your blog :), it has helped.

    Will look into the queries.
    DO you know if having lots of themes which are not used takes up resources like the plugins?

  29. Konrad:

    WP Tuner
    This plugin is only visible to site admins. (Update settings here; Visit MrPete at ICTA for bouquets/brickbats/help. Love it? Fill the Tip Jar.)
    Analysed in 0.171 seconds.
    WP Tuner is not correctly configured. Please go to the Settings page using the link above, and set it up correctly. Render Time: 0.324 sec (7.8% for queries). DB queries: 27, none defective, none > 0.500 sec. Memory: 14.6MB
    Performance Analysis
    Queries triggered by plugins calling Core functions are charged to: The Plugin
    Yellow-highlighted rows indicate slow elements (more than 0.500 seconds)
    Page Generation Performance (Order: Chronological)
    (Tech note: If output buffering (OB) is not enabled at init, WP Tuner enables it so output size can be tracked.)
    Index Marker %Time %DB Time %DB Count Time DB Time DB Count Memory Output
    (msec) (msec) (kb) lev(bytes)
    0 Start 16 89 41 50.6 22.3 11 ?
    1 plugins_loaded 21 5 7 67.1 1.3 2 11,507.9 1(0)
    2 widgets_init 5 0 0 15.2 0.0 0 12,891.6 1(0)
    3 init 26 -93 15 85.7 -23.5 4 12,971.9 1(0)
    4 admin_init 4 0 0 12.0 0.0 0 14,809.5 1(0)
    5 admin_head 23 0 0 73.5 0.0 0 14,850.9 1(3531)
    6 admin_notices 6 0 37 19.8 0.0 10 14,925.8 1(0)
    7 admin_footer 0 0 0 0.1 0.0 0 14,921.4 1(527)
    8 Stop 14,921.4 1(527)
    Total 100 0 100 323.9 0.0 27

    Plugin / Theme SQL Query Performance (Order: DB Time)
    Code Name %DB Time %DB Count DB Time DB Count
    Category (msec)
    plugin wptuner 43 37 10.8 10
    -Core- wp-settings.php 32 7 8.1 2
    plugin calendar 18 11 4.4 3
    -Core- wp-admin 7 4 1.8 1
    Total 59 100 25.2 16

    SQL Table Performance (Order: DB Time)
    (Tech note: The first table in a query is recorded here; complex queries may reference many tables.)
    Table %DB Time %DB Count DB Time DB Count
    (msec)
    wp_options 43 37 10.8 10
    wp_users 18 4 4.4 1
    wp_usermeta 15 4 3.7 1
    (N/A - Non-Table Query) 13 4 3.2 1
    wp_comments 7 4 1.8 1
    wp_calendar_config 5 7 1.2 2
    Total 59 100 25.2 16

    SQL Query Analysis
    27 Valid queries. None slow, none invalid. Display of normal queries is disabled.

  30. Joe:

    This message just poped up at the bottom of one of my pages:

    Message Function File Line
    wpTuner Report
    Please report to MrPete. WP Tuner could not match this unusual (or possibly invalid) database query. (WP Tuner and your system are still working ok):

    set names utf8

    wp-content/plugins/yet-another-related-posts-plugin/keywords.php(75): wpdb->query() wptunershow->Parse_Query() wp-content/plugins/wptuner/wptunershow.php 275

  31. Pete:

    Re: Joe (#30),
    Bummer. that’s a minor typo in the query, but wpTuner should be able to handle it.

  32. Pete:

    Re: Konrad (#29),
    Did you have a question? It says it is not properly configured; did you go to the admin page as instructed? What error(s) does it display?

  33. Pete:

    Re: Jasmine (#28),
    I have no idea if extra themes causes trouble. I suspect it would not be significant, since only the current theme gets referenced other than in certain admin pages.

  34. Ira:

    Re Pete:
    Followed the instructions to get the plug-in load time breakdown. Nothing is highlighted as being problematic (except on one page, when it said WP Tuner was taking too long), so not sure what steps to take next. Page-loads are around 8s-10s at worst, which is better than it’s been. Since my site is image-heavy, that’s probably what I’ll have to live with. Thanks for the response.

  35. Pete:

    Re: Ira (#34),
    I would suggest using YSlow or FireBug to get a breakdown of your total page load time. You may simply need to do an overall optimization. Things like:
    * Shrink graphics
    * Use php-speedy and/or other tools to shrink JS and CSS files, and to ensure everything possible is cached for users
    * Set up an alternate URL to your site, and use that for graphics, etc. This acts as a no-cost CDN (Content Delivery Network)… users browsers will be able to download multiple sets of graphics simultaneously

    On this page, for example, proper caching reduces the number of HTTP requests from 12 to 2. And the data downloaded is cut by more than 50%.

    Even image-heavy sites can run fast, once users get past the first page load. But if you do nothing, load times will remain high.

  36. Augusto:

    How can I show the resulsts in all pages of my wp? Only in the admin panel the stats are appering…

  37. Knut Sparhell:

    I got this message on my WassUp visitor details page (in admin panel):

    Please report to MrPete. WP Tuner could not match this unusual (or possibly invalid) database query. (WP Tuner and your system are still working ok):

    SET wait_timeout = 160

    wp-content\plugins\wassup\lib\main.php(1110): wpdb->query()

    WassUp is a popular stats plugin.

  38. Pete:

    Re: Augusto (#36),
    As long as you are logged in as an Admin, the results should show on every page. If they do not, then you are using a non-standard theme.

    Every theme must have a call to the wp_footer() function somewhere in the footer. Most likely, that is missing in your theme on non-admin pages. I’ve seen it happen…

  39. Pete:

    Re: Knut Sparhell (#37),
    Wow.
    I suppose I should add code to support WassUp resetting the MySQL timeout. But the code is actually a bug. It does not do what they think it does!
    The code says “Extend mysql wait timeout to 2.5 minutes.” What they don’t know is, the default timeout is 8 *hours*. All they’re doing is ensuring that your system will kill the mysql connection early if the system is slow for any reason.

    Normally, this is not a parameter that code should touch. But hey, I’ll even support buggy code ;)

  40. ovidiu:

    hey Pete, I ma trying to pinpoint why a certain site is so slow and could use some help. basically this is the problem:

    `6 loop_start 98 3 3 11,327.9 0.7 6 4,891.3 1(11359)`

    thats 11.3 seconds for the loop_start. how could I dig deeper? any hints?

  41. ovidiu:

    another issue, the MARKER start, takes 90% of the page generation time. how could one dig deeper into the start MARKER?

  42. Pete:

    Sorry for the delay; have been traveling.

    Loop_start… from memory, this would indicate serious inefficiency in header code. Anything after the call to wp_head(). add markers to your theme to further diagnose.

    If the “start” marker is showing 90% of page time, that indicates a slowdown from start until WP-Settings is called. There’s not a whole lot of code there, but you can add markers to track it down. Sounds interesting!

    Tell us what you find when all is said and done!

  43. ovidiu:

    wow. had given up on hearing back to you. will be reading this section http://wordpress.org/extend/plugins/wptuner/other_notes/ now to understand how to add markers and report back.

  44. ovidiu:

    ok, another question: let me start with the second case where the start marker shows 90% of page time. how would I add a marker as you said the slowdown is before wp-settigns is called… where would I add markers?

  45. Pete:

    Re: ovidiu (#44),

    I made a mistake in my response — I’m running a custom version of wp-settings here that has a lot of extra instrumentation.

    Yes, do look at the other_notes for a “how to” on adding more marker calls. What you are seeing is the set of data that can be produced without hand-patching any WP code!

    The most important thing is that your “Start” time includes the time required to load all of your plugins. I’m going to guess that one of your plugins takes a LONG time to load.

    Beyond the hints in that page… here’s what I have in my own wp-settings.php:

    1) My wp-settings has this right at the top:
    if (function_exists(wpTuneMarkTime)) wpTuneMarkTime('WP-Settings'); //MrPete

    2) I have more of the same (with a different quoted marker string each time) before the Advanced Cache call, and before several require() calls that incorporate compat.php, wpmu-settings.php, plugin.php, and wpmu-functions.php — all of these are normally commented out unless I need them.

    I simply placed them in spots that seemed (to me) to be good places to figure out where the time might be going. You can add more as needed, anywhere.

    3) The code in the “other_notes” page you referenced is also in my copy, and permanently enabled.

  46. ovidiu:

    hmmm… I am a bit lost here. I inserted the examples you gave on the other_notes page, and now I see:

    0 Start 1 0 0 24.9 0.0 0 ?
    1 WP-Settings 19 23 2 326.6 4.0 1 832.7 0()
    2 Plugin: albumize/albumize.php 0 0 0 2.1 0.0 0 13,793.7 0()

    does that mean, from the start, which is now fast (24msecs) to wp-settigns it takes 326msecs? then the single plugins start loading? If so what lies between start and wp-settigns?
    Or does it mean that from this marker: if (function_exists(wpTuneMarkTime)) wpTuneMarkTime(’WP-Settings’); //MrPete till the plugins are loaded it takes 326msecs?

    I mean, does the marker measure time from the last marker to itsself and outputs it?

  47. Pete:

    Hi ovidiu (#46) :),

    I designed the table to remind myself of the answer to your question…because sometimes I can’t keep it straight myself! Notice how there is no data for the “Stop” marker? That tells us that each marker is filled with the info from that point until another marker is reached.

    So, now you can see that most of the time is taken from the WP-Settings marker (at the top of that module I presume) until the albumize plugin is being loaded.

    (And, albumize only took a couple of msec to load)

    I’d enable the marker before the plugin loop. And then add more markers until you have found where the time goes (or until you decide the amount of time is reasonable… maybe 326 msec is OK for your system. Hard for me to say!)

  48. Allstar:

    Message Function File Line
    wpTuner Report
    Please report to MrPete. WP Tuner could not match this unusual (or possibly invalid) database query. (WP Tuner and your system are still working ok):

    TRUNCATE wp_sfwaiting

    wp-content/plugins/simple-forum/forum/sf-database.php(1276): wpdb->query() wptunershow->Parse_Query() wp-content/plugins/wptuner/wptunershow.php 275

    Okay so here i am to tell mrpete :-)

  49. Pete:

    Re: Allstar (#48),
    Thanks! I’ll incorporate that into the next version… :)

  50. Allstar:

    Thanks pete, i have just one problem when i deactivate the plugin i get this error: Warning: Cannot modify header information – headers already sent by (output started at /home/admin/domains/public_html/wp-config.php:28) in /home/admin/domains/public_html/wp-includes/pluggable.php on line 865

    Any suggestions?

  51. Pete:

    Re: Allstar (#50),
    When you say you “deactivate” it, how do you do so? Do *not* simply delete or rename the folder. That would leave it’s automated patches in place, with no code to call.

    If you use the normal WP tools to uninstall it, there ought to be no problem (at least nothing caused by my plugin ;) )

    I suggest you look at the file noted in your error message to see what is there:
    wp-config.php line 28 — what is there, and perhaps the lines before and after?

    Hope that leads to better insight!

  52. jim:

    У меня следующая проблема: не хочет показывать запросы к базе данных: Cannot display query analysis. WP Tuner is not correctly configured.
    В чем может быть проблема?

    in english:
    I have the following problem: does not want to show the queries to the database: Cannot display query analysis. WP Tuner is not correctly configured.
    What could be the problem?

  53. BosseWeb:

    Was asked (by WP Tuner) to supply this log to Mr Pete:
    Debug Log
    Message Function File Line
    wpTuner Report
    Please report to MrPete. WP Tuner could not match this unusual (or possibly invalid) database query. (WP Tuner and your system are still working ok):

    TRUNCATE wp_blc_instances
    wp-content/plugins/broken-link-checker/broken-link-checker.php(333): wpdb->query() wptunershow->Parse_Query() wp-content/plugins/wptuner/wptunershow.php 275
    wpTuner Report
    Please report to MrPete. WP Tuner could not match this unusual (or possibly invalid) database query. (WP Tuner and your system are still working ok):

    TRUNCATE wp_blc_links
    wp-content/plugins/broken-link-checker/broken-link-checker.php(336): wpdb->query() wptunershow->Parse_Query() wp-content/plugins/wptuner/wptunershow.php 275
    wpTuner Report
    Please report to MrPete. WP Tuner could not match this unusual (or possibly invalid) database query. (WP Tuner and your system are still working ok):

    TRUNCATE wp_blc_synch
    wp-content/plugins/broken-link-checker/broken-link-checker.php(346): wpdb->query() wptunershow->Parse_Query() wp-content/plugins/wptuner/wptunershow.php 275

  54. MK (Casey) van Bronkhorst:

    Please report to MrPete. WP Tuner could not match this unusual (or possibly invalid) database query. (WP Tuner and your system are still working ok):

    SET SESSION SQL_BIG_SELECTS=1

    wp-content/plugins/datafeedr/functions.php(696): wpdb->query() wptunershow->Parse_Query() wp-content/plugins/wptuner/wptunershow.php 275

  55. Pete:

    Thanks for the feedback, folks! I’m building the next version now…

  56. Pete:

    Re: jim (#52),
    Sorry for the delay, Jim.

    Usually, this means that the code injection in wp-config.php is incorrect. If WP Tuner can’t get inserted into the WP code early enough, then it is impossible to trap the database accesses.

    Try WPTuner uninstall and reinstall, and look for any errors on the WP Tuner settings page. It’s normally quite good at self-diagnosing why it can’t install properly (e.g. file/folder permissions, etc.)

    Tell me what you find!

  57. Pete:

    WP Tuner 0.9.6 is online. Please ask questions in the new thread.

Pages

Blogs

Quick Tip Jar

Currency:

Amount:

Categories

Tags

Recent Posts

Recent Comments

WP Tuner 0.9.4 comment thread

About

WP Tuner 0.9.6 Comment Thread

WP Tuner Plugin

Meta

Other Notes