top
or another monitoring utility to find out which processes are using high CPU.-DserviceName
command-line argument.free -h
command. On servers running the Solr service, large amounts of free memory is ideal because this memory is used for filesystem caching. Take note of the amount of free memory and the disk cache in comparison to the overall index size. Ideally, the disk cache should be able to hold all of the index, although this is not as important when using newer SSD technologies.
There are several ways to increase the available memory on a server:
conf/fusion.properties
to reduce the heap sizes of individual services. However, this might result in a lack of heap space, as described below.OutOfMemoryError
in the logs, or finding a dump file called java_pidXXX.hprof
in the log directory, indicates that a service failed due to lack of heap space.
Heap space is configured on a per-service basis in the conf/fusion.properties
file via the -Xmx
and -Xms
command-line parameters. Avoid allocating heap sizes that are known to be larger than needed for a service, because these can lead to long GC pauses.
Two common ways to detect long GC pauses include:
gc_*.log
files in the log directories. For deep analysis, upload files to http://gceasy.io.top
, look for periods when all cores are busy followed by a spike in one core (with most or all other cores dropping to near zero). This is pattern is typically found when one service is busy and is encountering long GC pauses.50
:
com.lucidworks.apollo.admin.proxy.max.conn.per.route
: controls the number of connections per routecom.lucidworks.apollo.admin.proxy.max.conn.total
: controls the max number of connections