Friday, August 21, 2009

Tuning ColdFusion Solr: Part 2

Don't forget to tune Solr Server for increased performance. First thing to do is to increase the Xmx value for Solr Server. To do so:

1) In windows -
* Shutdown Solr service
* Open solr.lax under Solr installation directory and modify the default setting -Xmx256m to -Xmx1024m.
* Start service
2) In Unix -
* Stop solr by going to solr installation directory and say:
./cfsolr stop
* Open cfsolr script and modify modify the default setting -Xmx256m to -Xmx1024m.
* Start by running the command:
./cfsolr start.

4 comments:

  1. If you have other suggestions for tuning Solr with CF, please post! Thank you for this info above.

    ReplyDelete
  2. Do you have any suggestions for getting Solr to return better results? I'm comparing it against Verity now, and while it is much faster, the results its returning are not as good, and the SUMMARY returned for those results is not as good either. Almost unusable. I'm getting control codes back in my word document results, and some results that should be getting returned are not.

    I don't think Solr is production ready yet.

    ReplyDelete
  3. I'm developing a search driven application based on CF & Solr. Since Solr is the engine we give it much more resources My standard config in the .lax is: lax.nl.java.option.additional=-server -Xms4096m -Xmx4096m -XX:+UseConcMarkSweepGC -XX:-UseParallelGC -DSTOP.PORT=8079 -DSTOP.KEY=cfstop -Dsolr.solr.home=multicore

    Not. the added Xms2048m (minimize memory management) and aggressive opts has been removed.

    In Solrxonfig.xml (per collection) we added autocommit. (since we're posting content to solr not using cfindex I guess the buffer size above is useless)



    1000
    180000


    Hope it helps!

    ReplyDelete
  4. sorry it should be
    <autoCommit>
    <maxDocs>1000</maxDocs>
    <maxTime>180000</maxTime><!-- in milli sec-->
    </autoCommit>

    ReplyDelete