AnsweredAssumed Answered

SOLR causes high CPU usage on idle repo.

Question asked by kbryd on Nov 30, 2012
Latest reply on Mar 19, 2013 by andy
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

Outcomes