Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Apache Solr High Performance

You're reading from   Apache Solr High Performance In setting up Apache Solr, you'll want to ensure it's achieving optimum search results with maximum efficiency. This book shows you just how to achieve that with a comprehensive tutorial including troubleshooting.

Arrow left icon
Product type Paperback
Published in Mar 2014
Publisher
ISBN-13 9781782164821
Length 124 pages
Edition Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Surendra Mohan Surendra Mohan
Author Profile Icon Surendra Mohan
Surendra Mohan
Arrow right icon
View More author details
Toc

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 $19.99/month. Cancel anytime
Banner background image