Ez Find Update Index Clean taking too much server resources

Author Message

Julian Mancera

Wednesday 13 January 2010 7:43:26 am

Hi all,

I'm having problem to make a clean indexing of my production site. The updatesearchindexsolr.php --clean script takes too much resuorces of the server. I check the server processes and it seems that java and mysql are draining all memory and processor and as this is my production machine the web server serves the pages really slow. I tried to put a "nice" linux command to see if the process drains less resources but as the script calls mysql and java that have unlimited use of resources as they are used in the web server, is there a way of limiting the resources usage so I can run a clean indexing?

Thank you all for your time and take care

Julian

Paul Borgermans

Wednesday 13 January 2010 9:38:48 am

Hi Julian,

re-indexing indeed needs a lot of cpu/disk resources, mainly on the ez publish side (pulling data and assembling the ezp objects)

You could insert usleep() or sleep() in the update script, but then re-indexing may take too long

Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Robin Muilwijk

Saturday 16 January 2010 12:30:13 am

Hi Paul,

Out of curiosity, would it help to tune Java as explained on http://ez.no/doc/extensions/ez_find/2_1/basic_configuration/solr_backend ?

And what about updating a staging area with production files and database, running the re-index on staging, and then move the solr index file over to production?

Thanks Robin

Board member, eZ Publish Community Project Board - Member of the share.ez.no team - Key values: Openness and Innovation.

LinkedIn: http://nl.linkedin.com/in/robinmuilwijk // Twitter: http://twitter.com/i_robin // Skype: robin.muilwijk

Paul Borgermans

Saturday 16 January 2010 12:38:00 pm

Hi Robin

Tuning helps yes, and also using a staging index helps (you can simply copy over the index files). For more intensive sites with lots of search traffic, a master slave config for Solr may be an even better alternative.

But again, even when re-indexing with a tuned eZ Find/Solr, its still the eZ Publish side that is slow

Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Robin Muilwijk

Saturday 16 January 2010 11:52:52 pm

@Paul, thanks for elaborating on this.

@Julian, hopefully this shows you some directions in improving the performance of re-indexing your site.

-- Robin

Board member, eZ Publish Community Project Board - Member of the share.ez.no team - Key values: Openness and Innovation.

LinkedIn: http://nl.linkedin.com/in/robinmuilwijk // Twitter: http://twitter.com/i_robin // Skype: robin.muilwijk

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 04:57:27
Script start
Timing: Jan 18 2025 04:57:27
Module start 'layout'
Timing: Jan 18 2025 04:57:27
Module start 'content'
Timing: Jan 18 2025 04:57:28
Module end 'content'
Timing: Jan 18 2025 04:57:28
Script end

Main resources:

Total runtime1.0554 sec
Peak memory usage4,096.0000 KB
Database Queries66

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 588.1719152.6563
Module start 'layout' 0.00600.0031 740.828139.5078
Module start 'content' 0.00911.0447 780.3359608.3438
Module end 'content' 1.05380.0015 1,388.679716.0938
Script end 1.0553  1,404.7734 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3107160.0002
Check MTime0.00130.1259160.0001
Mysql Total
Database connection0.00090.084610.0009
Mysqli_queries0.990793.8737660.0150
Looping result0.00070.0696640.0000
Template Total1.021896.820.5109
Template load0.00220.208220.0011
Template processing1.019696.609320.5098
Template load and register function0.00020.019610.0002
states
state_id_array0.00090.082410.0009
state_identifier_array0.00060.061320.0003
Override
Cache load0.00180.1696310.0001
Sytem overhead
Fetch class attribute can translate value0.00060.058930.0002
Fetch class attribute name0.00150.139670.0002
XML
Image XML parsing0.00130.121330.0004
class_abstraction
Instantiating content class attribute0.00000.002490.0000
General
dbfile0.00220.2039250.0001
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 18
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs