solr5.3 runs multiple shards in one JVM

Due to the large amount of annual index data, we plan to divide 20 shards for clustering

Hardware: (32G memory, 8-core CPU, each server mounts 4 500G ssd hard disks) X 5 sets

There are currently two ways to build:

1. Each solr instance corresponds to a disk, and a total of 20 instances need to be opened

solr -c -m 8g -z xx1:2181,xx2:2181,xx3:2181,xx4:2181,xx5:2181 -s  /mnt/disk1/data/solrcloud/solr1 -p 8941

solr -c -m 8g -z xx1:2181,xx2:2181,xx3:2181,xx4:2181,xx5:2181 -s  /mnt/disk2/data/solrcloud/solr2 -p 8942

...

After 20 instances are created, use the following solr command:

http://xxx:xxx/solr/admin/collections?action=CREATE&name=uuwatch-year2016&numShards=20&router.field=group

 

2. If you only want to open 5 instances, you can transform it on the basis of the above (tested, this method is more efficient for indexing and retrieval)

1). Establish a soft link in the /home/wp/data directory, and link to the index folder under solr.home corresponding to the 20 previously created instances.

The directory structure of the new solr.home is as follows:


 2) Do the above operations in sequence on other machines

 3) Stop the service of all machines

 4) Execute the following command on each machine

solr -c -m 28g -z xx1:2181,xx2:2181,xx3:2181,xx4:2181,xx5:2181 -s  /home/wp/data -p 8941

 

Finally, as follows (tested, document routing works fine too):



 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327009522&siteId=291194637