Ezfind/solr optimization

Author Message

Ali Nebi

Wednesday 11 March 2009 8:32:47 am

Hi,

we have an issue with high cpu usage from java using ezfind with ez 4.

The system is with this hardware:

2 x Quad-Core AMD Opteron™ 2352
2 x 4 x 2,1 GHz
16GB RAM
RAID 5
OS: Centos 5.2

java version "1.5.0_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_13-b05, mixed mode)

On of the servers we have set java options for solr with these parameters:

-Dezfind -Xms768M -Xmx768M

On this server we experience difficulties with high cpu usage from java. There is enough memory and server does not swap.

On another server with this hardware:
Intel(R) Xeon(R) CPU 5150
2 x 2.66GHz
4GB RAM
OS: Centos 5.2.
java version "1.6.0_06"
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) 64-Bit Server VM (build 10.0-b22, mixed mode)

Java settings for solr on this server are following:

-Dezfind -Xms512M -Xmx512M -XX:+UseConcMarkSweepGC -XX:PermSize=128m -XX:MaxPermSize=128m

We experience the following difficulties on this server:

1. When we leave java options these: -Dezfind -Xms512M -Xmx512M, then after some hours/days work, solr stop to work. Java process is available, but search on the site does not work. We get Http code 500 in logs. When i try to connect to solr administration i get following message:

GC overhead limit exceeded
RequestURI=/solr/admin
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded

2. When i set java options this way:
-Dezfind -Xms512M -Xmx512M -XX:+UseConcMarkSweepGC
Then solr works fine for some days and then it stop to work again. Java process is still available. Search does not work on the site. In the log we get HTTP Code 500. When i try to login to solr administration i get following:

java.Lan.OutOfMemoryError: Java heap space

3. I tried to solve the problem "java.Lan.OutOfMemoryError: Java heap space" with putting additional settings "-XX:PermSize=128m -XX:MaxPermSize=128m", but it didn't help so much. I still experience this problem.

The question is how to optimize solr/ezfind to decrease cpu usage and to solve OutOfMemory problems?

Thanks in advanced!

Iguana Information Technologies, SL - http://www.iguanait.com

Gaetano Giunta

Thursday 12 March 2009 3:51:10 am

Not sure it will help, but you might try switching to a 32 bit version of Java. IIRC the 64 bit version was not the best choice on redhat os...

Principal Consultant International Business
Member of the Community Project Board

Ali Nebi

Saturday 14 March 2009 2:16:22 am

Thanks for the reply.

I will be happy if someone post other comments too, related with ezsolr/ezfind optimization.

Regards, Ali Nebi!

Iguana Information Technologies, SL - http://www.iguanait.com

Paul Borgermans

Monday 16 March 2009 2:41:43 pm

It is probably the way to start the backend (solr), so try the alternate startup parameters below

If you don't have the 64 bit JVM (and OS)

java -server -Xmx600m -Xms600m -XX:+UseParallelGC -XX:+AggressiveOpts -XX:NewRatio=5 -jar start.jar

Otherwise (enable the 64 bit datamodel)

java -server -d64 -Xmx600m -Xms600m -XX:+UseParallelGC -XX:+AggressiveOpts -XX:NewRatio=5 -jar start.jar

The Xm.... parameters are memory allocation, if you have a lot and large indexes (many objects, many files), then you may even try to increase that

Can you tell me if that helped?

hth
Paul

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

Ali Nebi

Sunday 22 March 2009 3:11:55 pm

Hi,

Thanks for the reply and trying to help me to solve this problem.

I still expirience the problem on the second server where solr stop to work after some time. I have set there :

java -server -d64 -Xmx600m -Xms600m -XX:+UseParallelGC -XX:+AggressiveOpts -XX:NewRatio=5 -jar start.jar

When i see that search is not working and try to login to the admin page of solr i get connection refused message. All requests to the solr are with code HTTP 1.1 500 in the logs during this time.

It is probably because the memory, but if i increase the memory then server start to swap more than usual.

Where can i enable the debug mode if necessary? This way i can provide more info for the problem probably.

Iguana Information Technologies, SL - http://www.iguanait.com

Gaetano Giunta

Thursday 28 July 2011 11:29:20 pm

Two more bits of insight:

1. Java 64bit is now the recommended version - problems with the 64 bit version only applied to old versions of rhel (circa 2007)

2. according to the solr wiki (http://lucene.apache.org/solr/ ), using -XX:+AggressiveOpts is dangerous with a version 6 jre

Principal Consultant International Business
Member of the Community Project Board

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 02:17:16
Script start
Timing: Jan 18 2025 02:17:16
Module start 'layout'
Timing: Jan 18 2025 02:17:16
Module start 'content'
Timing: Jan 18 2025 02:17:17
Module end 'content'
Timing: Jan 18 2025 02:17:17
Script end

Main resources:

Total runtime1.1411 sec
Peak memory usage4,096.0000 KB
Database Queries70

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0098 589.8438152.6250
Module start 'layout' 0.00980.0041 742.468839.4453
Module start 'content' 0.01391.1252 781.9141641.1406
Module end 'content' 1.13910.0019 1,423.054720.1563
Script end 1.1410  1,443.2109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.3375160.0002
Check MTime0.00140.1194160.0001
Mysql Total
Database connection0.00110.095510.0011
Mysqli_queries1.056292.5564700.0151
Looping result0.00070.0633680.0000
Template Total1.093095.820.5465
Template load0.00200.171720.0010
Template processing1.091195.613120.5455
Template load and register function0.00010.009010.0001
states
state_id_array0.00160.141810.0016
state_identifier_array0.00310.267320.0015
Override
Cache load0.00180.1595740.0000
Sytem overhead
Fetch class attribute can translate value0.00070.059330.0002
Fetch class attribute name0.00140.118790.0002
XML
Image XML parsing0.00150.128030.0005
class_abstraction
Instantiating content class attribute0.00000.0025120.0000
General
dbfile0.00130.1170290.0000
String conversion0.00000.001140.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
6content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
14content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 36
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs