• Hello Sir,

    I am using CRP on multiple wordpress installations ( 12 subfolders) each one of them HAVE more than 50K articles , i tried many options to make the related posts Query be as simple as it could be , but everytime i check on the server CPU load it’s always 99% untill the SERVER is Down. ( full HTML chache activated )

    I am using CPR for each article in twi places :
    1- at the end of article
    2- in the sidebar of the article

    is there anyway to reduce the search of the articles since it looks like every time a visitor visit a page the plugin is searching in 50k articles to give the accurate related posts.

    Right now i Activated giving Related articles Based on Tags ONLY but still this query is always showing up on my server with very high usage :


    Copying to tmp table | SELECT SQL_CALC_FOUND_ROWS fr_posts.ID FROM fr_posts LEFT JOIN fr_term_relationships ON (fr_posts.
    Copying to tmp table | SELECT SQL_CALC_FOUND_ROWS da_posts.ID FROM da_posts LEFT JOIN da_term_relationships ON (da_posts.
    Copying to tmp table | SELECT SQL_CALC_FOUND_ROWS it_posts.ID FROM it_posts LEFT JOIN it_term_relationships ON (it_posts.

    Any suggestions to use your Plugin more efficiently for our case ( too many articles , too many tags ) is highly appreciated

    (NB i am using Wp fastest cache , and the problem is not related to it )

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Ajay

    (@ajay)

    I have a feeling it’s mainly because of your huge install. The plugin uses mySQL’s full text index which is why the query is heavy but in theory this should be the case only on the first page load.

    I note that you mentioned that you have Full HTML cache enabled in the settings page so subsequent loads should be a few minor queries only. WP Fastest Cache should actually help as well.

    Given the size, would you be able to create the full text indices again directly using phpMyAdmin or similar. Code in the plugins Settings > Tools (link at top) page.

    Keep the cache perennial -> Define CRP_CACHE_TIME to false in your wp-config.php file – the plugin sets an expiry entry but never checks it again.

    Lastly, on the above query I’m not sure what the “copying to tmp table” is. I’m wondering if the server does this in the background.

    Disabling the limit by tags should help speed up i.e. not using a tax_query within WP_Query doesn’t need the tables to be joined.

    Also, given the number of posts you have, disable the matching by content and title in the settings page – so lesser words are matched.

    Thread Starter hajjifx

    (@hajjifx)

    Thank you for your quick answer , if i disable the matching by Tags ( which is the only option i am enabling on all other criterias ) how the plugin is going to give related posts ? based on what ?

    i already disabled matching by title and by content , and set sorting to random ,

    i have a question about the mechanism your plugin search for related posts : does it read/search all 50.000 articles everytime it need to match the criteria or does is stop after finding the first 10 matches ??

    Plugin Author Ajay

    (@ajay)

    @hajjifx

    It uses mySQL’s FULLTEXT index to find the related posts. The same tag/category option is to further limit the posts. But that does require a joining of tables in most cases which increase the load of the query.

    https://dev.mysql.com/doc/refman/5.6/en/innodb-fulltext-index.html

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘HUGE CPU LOAD EVEN AFTER SERVER UPGRADE’ is closed to new replies.