Java – SOLR high CPU usage in amazon EC2

amazon ec2javasolr

I installed solr-3.6 in my local windows box and it worked fine.

I installed solr-4.0 in amazon ec2 linux large instance and the cpu usage shot upto 100%. It maintained at 80-90% average cpu power.

I thought it could be because of 4.0, So I installed 3.6 in EC2 again. But again the CPU usage was 80-90% average.

With both the versions, solr works in EC2. dont know why CPU usage is so high.
i started the solr server using "sudo nohup java -jar start.jar &"

In my local box java 1.7 is installed and in EC2 it is 1.6.0_24. I have mapped solr dir to an EBS volume.

/dev/mapper/vg1-solr   8361916   1935928   6342128  24% /home/ec2-user/SOLR/solr/example/solr

Is there any known issue ?

Best Answer

Looks like there is an issue, which has been outlined in the below response. For more details, have a look at Anyone else experiencing high rates of Linux server crashes during a leap second day?


We faced just this issue yesterday - the problem is because of the leap second on June 30 2012. A linux kernel component that manages sleep times isn't updated to the correct time and this causes extremely high CPU usage for Java processes. Related question on serverfault and my fix I derived from it (for Debian):

(issue these commands from the command line)

export LANG="en_EN"
date -s "`date`"

/etc/init.d/ntp stop
ntpdate pool.ntp.org
/etc/init.d/ntp start

For Red Hat derived systems, I believe you replace ntp with ntpd.