cancel
Showing results for 
Search instead for 
Did you mean: 

SOLR causes high CPU usage on idle repo.

kbryd
Champ in-the-making
Champ in-the-making
Hi!

After installing a new repository (4.2.b community) on a rather slow PC (Intel E8400 2 core, 16GB of memory) and importing 100 small documents I noticed that every 15 seconds CPU usage jumps to almost 100% and operating system gets very sluggish. I have a similar issue on another (also almost empty) 4.0.b Community server.

I tracked it down to the setting in solrcore.properties:

alfresco.cron=0/15 * * * * ? *

When I change this to 60 seconds then (obviously) CPU usage jumps every (more or less) 60 seconds.

Question is: what happens every 15 seconds that Alfresco is using 90-100% of CPU? Can it be somehow minimized, optimized etc.? (in a different way than by tweaking cron setting).

Here is a fragment of log (which grows rather quickly):

127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [30/Nov/2012:16:21:01 +0100] "GET /alfresco/service/api/solr/transactions?fromCommitTime=1354285578542&toCommitTime=1354289178542&maxResults=2000 HTTP/1.1" 200 272383
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [30/Nov/2012:16:21:02 +0100] "GET /alfresco/service/api/solr/transactions?fromCommitTime=1354285879018&toCommitTime=1354289479018&maxResults=2000 HTTP/1.1" 200 272383
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [30/Nov/2012:16:21:02 +0100] "GET /alfresco/service/api/solr/transactions?fromCommitTime=1354285278658&toCommitTime=1354288878658&maxResults=2000 HTTP/1.1" 200 272383
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [30/Nov/2012:16:21:02 +0100] "GET /alfresco/service/api/solr/transactions?fromCommitTime=1354286179898&toCommitTime=1354289779898&maxResults=2000 HTTP/1.1" 200 84111
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [30/Nov/2012:16:21:02 +0100] "GET /alfresco/service/api/solr/transactions?fromCommitTime=1354285578542&toCommitTime=1354289178542&maxResults=2000 HTTP/1.1" 200 272383
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [30/Nov/2012:16:21:02 +0100] "GET /alfresco/service/api/solr/transactions?fromCommitTime=1354286269161&toCommitTime=1354289869161&maxResults=2000 HTTP/1.1" 200 254
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [30/Nov/2012:16:21:02 +0100] "GET /alfresco/service/api/solr/transactions?fromCommitTime=1354289869161&toCommitTime=1354297069161&maxResults=2000 HTTP/1.1" 200 119
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [30/Nov/2012:16:21:02 +0100] "GET /alfresco/service/api/solr/transactions?fromCommitTime=1354285879018&toCommitTime=1354289479018&maxResults=2000 HTTP/1.1" 200 272383
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [30/Nov/2012:16:21:02 +0100] "GET /alfresco/service/api/solr/transactions?fromCommitTime=1354286179898&toCommitTime=1354289779898&maxResults=2000 HTTP/1.1" 200 84111
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [30/Nov/2012:16:21:02 +0100] "GET /alfresco/service/api/solr/transactions?fromCommitTime=1354286269161&toCommitTime=1354289869161&maxResults=2000 HTTP/1.1" 200 254
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [30/Nov/2012:16:21:02 +0100] "GET /alfresco/service/api/solr/transactions?fromCommitTime=1354289869161&toCommitTime=1354297069161&maxResults=2000 HTTP/1.1" 200 119
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [30/Nov/2012:16:21:15 +0100] "POST /alfresco/service/api/solr/modelsdiff HTTP/1.1" 200 447
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [30/Nov/2012:16:21:15 +0100] "POST /alfresco/service/api/solr/modelsdiff HTTP/1.1" 200 447
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [30/Nov/2012:16:21:15 +0100] "GET /alfresco/service/api/solr/aclchangesets?fromTime=1354283154634&toTime=1354286754634&maxResults=2000 HTTP/1.1" 200 237
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [30/Nov/2012:16:21:15 +0100] "GET /alfresco/service/api/solr/aclchangesets?fromTime=1354283154634&toTime=1354286754634&maxResults=2000 HTTP/1.1" 200 237
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [30/Nov/2012:16:21:15 +0100] "GET /alfresco/service/api/solr/aclchangesets?fromTime=1354283154634&toTime=1354286754634&maxResults=2000 HTTP/1.1" 200 237
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [30/Nov/2012:16:21:15 +0100] "GET /alfresco/service/api/solr/aclchangesets?fromTime=1354283154634&toTime=1354286754634&maxResults=2000 HTTP/1.1" 200 237
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [30/Nov/2012:16:21:15 +0100] "GET /alfresco/service/api/solr/aclchangesets?fromTime=1354286754634&toTime=1354293954634&maxResults=2000 HTTP/1.1" 200 237
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [30/Nov/2012:16:21:15 +0100] "GET /alfresco/service/api/solr/aclchangesets?fromTime=1354286754634&toTime=1354293954634&maxResults=2000 HTTP/1.1" 200 237
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [30/Nov/2012:16:21:15 +0100] "GET /alfresco/service/api/solr/aclchangesets?fromTime=1354288551973&toTime=1354292151973&maxResults=2000 HTTP/1.1" 200 237
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [30/Nov/2012:16:21:15 +0100] "GET /alfresco/service/api/solr/aclchangesets?fromTime=1354292151973&toTime=1354299351973&maxResults=2000 HTTP/1.1" 200 128
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [30/Nov/2012:16:21:15 +0100] "GET /alfresco/service/api/solr/aclchangesets?fromTime=1354288551973&toTime=1354292151973&maxResults=2000 HTTP/1.1" 200 237
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [30/Nov/2012:16:21:15 +0100] "GET /alfresco/service/api/solr/aclchangesets?fromTime=1354292151973&toTime=1354299351973&maxResults=2000 HTTP/1.1" 200 128
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [30/Nov/2012:16:21:15 +0100] "GET /alfresco/service/api/solr/transactions?fromCommitTime=1354282238792&toCommitTime=1354285838792&maxResults=2000 HTTP/1.1" 200 270376
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [30/Nov/2012:16:21:15 +0100] "GET /alfresco/service/api/solr/transactions?fromCommitTime=1354282238792&toCommitTime=1354285838792&maxResults=2000 HTTP/1.1" 200 270376
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [30/Nov/2012:16:21:15 +0100] "GET /alfresco/service/api/solr/transactions?fromCommitTime=1354283479636&toCommitTime=1354287079636&maxResults=2000 HTTP/1.1" 200 271832
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [30/Nov/2012:16:21:15 +0100] "GET /alfresco/service/api/solr/transactions?fromCommitTime=1354283479636&toCommitTime=1354287079636&maxResults=2000 HTTP/1.1" 200 271832

Thanks!
Karol
10 REPLIES 10

afaust
Legendary Innovator
Legendary Innovator
Hello Andy,

I had given feedback to one of my German Alfresco Sales Support Engineers (who no longer is with Alfresco) when we were implementing the 3.4-based COMMENT index field. At that time, Alfresco 4.0 was already available as Community and our project involved evaluating and potentially applying the same kind of enhancements to Alfresco 4 + SOLR. Due to the limitations, we decided on sticking with Enterprise 3.4.5 at that time and enhancing the Lucene integration, which - while also not the most extensible - was achievable in-time / on-budget (including rudimentary hit highlighting).
I haven't given any more recent feedback on this, as my Alfresco projects have been focussed more on other use-cases / aspects lately.

Regards
Axel