[英]Optimizing Solr DataImportHandler settings for full-import speed
I have a Solr server setup using the DataImportHandler2. 我有一个使用DataImportHandler2的Solr服务器设置。 Using my current settings, a full-import is taking 8-9 hours.
使用我当前的设置,一次完整导入需要8到9个小时。 I'd like to optimize settings to reduce that time, but the documentation isn't very clear about what various settings do and what side effects they have.
我想优化设置以减少时间,但是对于各种设置的作用以及它们的副作用,文档尚不清楚。
The server is a m2.2xlarge AWS instance (34.2 GB RAM). 该服务器是m2.2xlarge的AWS实例(34.2 GB RAM)。 The Solr version is 3.6.1.2012.07.17.12.45.52.
Solr版本是3.6.1.2012.07.17.12.45.52。 Solr running on Tomcat 7.0.30.
Solr在Tomcat 7.0.30上运行。 Tomcat is running with -Xms4096m -Xmx28672m.
Tomcat使用-Xms4096m -Xmx28672m运行。
From solrconfig.xml, mergeFactor is 10, useCompoundFile is false. 从solrconfig.xml中,mergeFactor为10,useCompoundFile为false。 From data-config.xml, autoCommit is true, batchSize is -1.
在data-config.xml中,autoCommit为true,batchSize为-1。 The query the DataImportHandler is using returns 6 million records.
DataImportHandler正在使用的查询返回600万条记录。
Before even looking at mergeFactor et al, you should look at the entities in your db-data-config.xml. 在甚至查看mergeFactor等之前,您应该查看db-data-config.xml中的实体。 If you have entities inside other entities these will generate a lot of sql requests.
如果您在其他实体内部有实体,则这些实体会生成很多sql请求。 You need to either work on your sql to not do inner entities or look at CachedSqlEntityProcessor etc
您需要在SQL上工作以不做内部实体,或者查看CachedSqlEntityProcessor等
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.