Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Apache Solr High Performance

You're reading from  Apache Solr High Performance

Product type Book
Published in Mar 2014
Publisher
ISBN-13 9781782164821
Pages 124 pages
Edition 1st Edition
Languages
Author (1):
Surendra Mohan Surendra Mohan
Profile icon Surendra Mohan

Dealing with expensive garbage collection


You might encounter situations where you have a number of applications running in the Java Virtual Machine and the garbage collection process takes too long to run. Even though this issue occurs, probably you might not be aware of what exactly is happening. In this section, we will learn how to deal with such garbage collections that take too long to execute.

We start by running the following command:

java –Xmx2048M –Xms512m –jar start.jar

After a certain time period, we noticed that Solr starts to hang frequently for a shorter time period and doesn't even respond during this time span, and it is the same with Jetty. This abnormal behavior of responding and not responding is an indication that our garbage collection is taking too long to execute. How are we going to overcome this issue?

Let us modify our Solr start command and see what happens. Now our command looks as follows:

java –Xmx2048M –Xms512m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:ParallelGCThreads...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime}