This project is not covered by Drupal’s security advisory policy.
Apache Solr Parallel indexing allows you to set the amount of CPU's you have to utilise the maximum of your system during index time.
Improvement
During this test, entity_cache was enabled and pre-warmed. Solr server was an external server and the website was really complex. Looks like a realistic test scenario to me!
Without Parallel Indexing
time drush --uri=http://mytestsite.com.dev solr-index --limit=1000
1000 items successfully processed. 972 documents successfully sent to Solr. [status]
real 1m21.416s
user 0m45.394s
sys 0m2.748s
Node types: complex ones, references and more.
Amount per run: 100
Calculation : 1k nodes in 1m 31s, with 100 nodes per run
Nodes per second : 11.
With Parallel indexing
time drush --uri=http://mytestsite.com.dev solr-index --limit=1000
1000 items successfully processed. 1008 documents successfully sent to Solr. [status]
real 0m31.858s
user 0m2.948s
sys 0m0.492s
Node types: complex ones, references and more.
Amount per run: 500
Settings: 8 CPU's at once
Calculation : 1k nodes in 31s
Nodes per second : 31
Requires
It requires httprl module as that is used to spawn the extra processes.
How to use?
- Enable Module
- go to admin/config/development/httprl and set it to -1
- Go to admin/settings/apachesolr/settings
- Click Advanced Settings
- Set the amount of nodes you want to index (I woud set it to 200, to test)
- Set the amount of CPU's you have (I would set to 2, to test)
- using the batch button in the UI
- Using drush : drush --uri="http://mydrupal.dev" solr-index
A note, the uri here is very important as it needs to know where it should send requests to.
Gradually raise your limit to find the maximum of your system.
Make sure your php timeouts and memory limits are able to keep up with the indexing process.
For the sake of testing I recommend
ini_set('memory_limit', -1);
ini_set('max_execution_time', 300);
Project information
- Module categories: Site Search
- 9 sites report using this module
- Created by Nick_vh on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.