如何在Solr中更快地索引记录(而不会影响ColdFusion Web服务器)?两个JVM? [英] How to index records in Solr faster (and not impact ColdFusion web server)? Two JVM?

查看:162
本文介绍了如何在Solr中更快地索引记录(而不会影响ColdFusion Web服务器)?两个JVM?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个64位服务器,8 GB RAM,双四核CPU。没有资源曾经达到100%(除了,我想,JVM - 对吧?)。



我需要为Solr索引数百万条记录,在生产。我认为有一个第二个机器索引是有帮助的。



我应该专用于Solr的第二个JVM实例吗?



现在,当我运行一个索引,通常在200毫秒服务的页面将在约1.5秒,有时更多...击中,甚至,可怕的服务不可用错误。 / p>

我调整了我的JVM堆如下:

  -Xmx1024m 
-XX:MaxPermSize256m

如果我在追逐错误的解决方案,请允许我扩大景观有点。似乎我不能影响Solr的索引速度。我以前在工作站上虚拟化的开发服务器上每小时索引大约150,000条记录。在具有更多可用硬件的生产环境中,我以完全相同的速度进行索引。



没有数据证明它,我认为我的JVM调整没有加速尽管它可能已允许CF服务器继续提供页面。我必须说,索引速度非常慢,但我知道,它不是数据访问层的功能。我将它从纯ORM重写到由SQL存储过程支持的对象,认为这是减速(无效果)。

解决方案

单独的实例用于索引索引,唯一的诀窍是让正在运行的搜索实例重新读取更新的索引,在这种情况下,您设置一个主(索引器)和从属(搜索器)并进行复制。这将使搜索器不会被中断,并且索引器将利用其自己的JVM,包括其自己的资源份额。


I have a 64 bit server, 8 GB RAM, dual quad CPU. No resources are ever hitting 100% (except, I guess, the JVM -- right?).

I need to index several million records for Solr, but the machine is in production. I recognize having a second machine for indexing would be helpful.

Should I dedicate a second instance of the JVM, dedicated to Solr?

Right now, when I run an index, pages which are normally served in 200 milliseconds will serve up in about 1.5 seconds, sometimes more... hitting, even, the dreaded "Service is Unavailable" error.

I adjusted my JVM Heap as follows:

-Xmx1024m
-XX:MaxPermSize256m

In case I'm chasing the wrong solution, allow me to broaden the landscape a bit. It seems that I can't affect the indexing speed of Solr. I had previously been indexing about 150,000 records per hour on a dev server virtualized on a workstation. In a production environment with much more hardware available, I'm indexing at the exact same speed.

Without data to prove it, I think that my JVM adjustments did not speed up the indexing, although it may have allowed the CF server to continue serving pages. I must say, the indexing speed is terribly slow, but I do know that it's not a function of the data access layer. I rewrote it from pure ORM to objects backed by SQL Stored Procedures thinking that was the slowdown (no effect).

解决方案

use a separate instance for indexing the index, the only trick is getting the running searching instance to re-read the updated index, in which case, you set up a master (the indexer) and slave(the searcher) and do replication. this will both make the searcher not get interrupted, and the indexer will utilize its own JVM including its own share of the resources.

这篇关于如何在Solr中更快地索引记录(而不会影响ColdFusion Web服务器)?两个JVM?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆