Solr - 许多数据库表的多核与多实例
Solr - Multi Core vs Multiple Instance for Many Database Tables
我有性能方面的顾虑,希望得到 Multi Core
或 Multi Instance(with different port)
哪个最好的建议?先来看看我的案例:
Currently I am running solr with multiple core and its running OK. There is only one issue that sometime it goes "out of heap memory while processing facets fields", then I have to restart the solr. ( To minimize the no. of restarts, I starts the solr with high memory : java -Xms1000M -Xmx8000M -jar start.jar )
I have amazon ec2 instance with 8core-2.8GHtz /15GB Ram with optimized hard disk.
I have many database-tables(about 100) and have to create different schemas for each(leads to create different core).
Each table have millions of documents, with 7-9 indexed fields and 10-50 stored fields in each document.
My web portals should handle very high traffic (currently I m having 10 request/second, may increase to 50-100/second). I know 'solr' can handle that but it is to just inform you that I am concern about every-smallest performance issue also
Searching solr by PHP and CURL in to specific core, so there is no problem in searching in different solr instance also.
问题:
据我所知Solr handles one request at a time
。所以我认为如果我创建多个 solr 实例并在不同端口启动它们,那么我的门户网站可以一次处理更多请求。 (如果用户搜索不同 table)。
那么,你会建议我什么?单个 Solr 实例中的多核?或多个实例,每个实例有 Single/Dual 个核心?
在不同的端口有多个solr实例运行有什么问题吗?
注意: 在这里,我 can/may/will 在一个实例中结合了较少搜索的核心/小核心 AND 单独实例中的高流量核心 或 一个实例中的二三高流量核心等 Coz,为每个创建不同的实例table(这里~100)会占用太多硬件资源。
由于一周多以来我没有得到任何答案,而且我也用 solr 尝试了很多案例(也阅读了一些文章),所以我想分享我的经验作为我自己问题的答案。这 may/will 对未来的观众有帮助。我试过 serverfault
也没有成功。
Solr can handle more request at a time.
我已经通过 运行 长查询 [qTime=7203,大约。 7sec] 和几个小查询 - 长一 [qTime = 30],solr 首先响应小查询,即使他们 运行 在长一之后。
这一点给出了很多答案的理由: 使用具有多个核心的单个 solr 实例。只需将高内存分配给 JVM。
其他要点:
1. 每个 solr 实例都需要 RAM,因此 运行 多个实例将需要更多资源,这将是昂贵的。如果您正在使用 facets
、sort fields
,那么您需要为每个实例分配更多 RAM。
正如您在我的案例中看到的那样,我需要使用高内存 (8GB) 启动 solr。您可以看到 Danish Web Archive 的案例,它使用多个实例并为每个实例分配 9GB RAM,总 RAM 为 256GM。
2. 您可以通过 java -Djetty.port=8984 -jar start.jar
运行 不同端口 上的多个 solr 实例。一切 运行 一切正常,但我遇到了一个问题。
虽然索引它可能会给出 "not enough memory error" 然后 solr 实例将被杀死。因此您再次需要启动具有高内存的第二个实例,这将导致更多的 RAM 需求。
3. Solr资源需求和性能问题可以理解here. According to this 64bit environment and 12GB RAM is recommended for good performance. Solr Optimization are explained here.
我有性能方面的顾虑,希望得到 Multi Core
或 Multi Instance(with different port)
哪个最好的建议?先来看看我的案例:
Currently I am running solr with multiple core and its running OK. There is only one issue that sometime it goes "out of heap memory while processing facets fields", then I have to restart the solr. ( To minimize the no. of restarts, I starts the solr with high memory : java -Xms1000M -Xmx8000M -jar start.jar )
I have amazon ec2 instance with 8core-2.8GHtz /15GB Ram with optimized hard disk.
I have many database-tables(about 100) and have to create different schemas for each(leads to create different core).
Each table have millions of documents, with 7-9 indexed fields and 10-50 stored fields in each document.
My web portals should handle very high traffic (currently I m having 10 request/second, may increase to 50-100/second). I know 'solr' can handle that but it is to just inform you that I am concern about every-smallest performance issue also
Searching solr by PHP and CURL in to specific core, so there is no problem in searching in different solr instance also.
问题:
据我所知Solr handles one request at a time
。所以我认为如果我创建多个 solr 实例并在不同端口启动它们,那么我的门户网站可以一次处理更多请求。 (如果用户搜索不同 table)。
那么,你会建议我什么?单个 Solr 实例中的多核?或多个实例,每个实例有 Single/Dual 个核心?
在不同的端口有多个solr实例运行有什么问题吗?
注意: 在这里,我 can/may/will 在一个实例中结合了较少搜索的核心/小核心 AND 单独实例中的高流量核心 或 一个实例中的二三高流量核心等 Coz,为每个创建不同的实例table(这里~100)会占用太多硬件资源。
由于一周多以来我没有得到任何答案,而且我也用 solr 尝试了很多案例(也阅读了一些文章),所以我想分享我的经验作为我自己问题的答案。这 may/will 对未来的观众有帮助。我试过 serverfault
也没有成功。
Solr can handle more request at a time.
我已经通过 运行 长查询 [qTime=7203,大约。 7sec] 和几个小查询 - 长一 [qTime = 30],solr 首先响应小查询,即使他们 运行 在长一之后。
这一点给出了很多答案的理由: 使用具有多个核心的单个 solr 实例。只需将高内存分配给 JVM。
其他要点:
1. 每个 solr 实例都需要 RAM,因此 运行 多个实例将需要更多资源,这将是昂贵的。如果您正在使用 facets
、sort fields
,那么您需要为每个实例分配更多 RAM。
正如您在我的案例中看到的那样,我需要使用高内存 (8GB) 启动 solr。您可以看到 Danish Web Archive 的案例,它使用多个实例并为每个实例分配 9GB RAM,总 RAM 为 256GM。
2. 您可以通过 java -Djetty.port=8984 -jar start.jar
运行 不同端口 上的多个 solr 实例。一切 运行 一切正常,但我遇到了一个问题。
虽然索引它可能会给出 "not enough memory error" 然后 solr 实例将被杀死。因此您再次需要启动具有高内存的第二个实例,这将导致更多的 RAM 需求。
3. Solr资源需求和性能问题可以理解here. According to this 64bit environment and 12GB RAM is recommended for good performance. Solr Optimization are explained here.