On 10/17/2017 7:10 AM, j.s. wrote:
> i run a stand alone solr instance in which usage has suddenly spiked a
> bit. the load was at 8, but by adding another CPU i brought it down to
> 2. much better but not where i'd like it to be.
>
> i guess i'm writing to see if anyone has any suggestions about where
> to look to improve this. the data size is 24G. i have 4G of memory
> dedicated to server.

I see two potential problems based on the limited available
information.  Both of these potential problems involve memory.  It could
be possible that *both* problems are contributing to what you've
observed.  It's also possible that I am completely wrong and don't
understand your setup well enough to make any assessment.

One possible problem is that your heap is too small for what you have
Solr doing, causing Java to constantly perform garbage collections.  The
default heap size in recent Solr versions is 512MB, which is quite
small.  The default is intentionally small, so that Solr will start out
of the box on most hardware.  Production installations are almost
certainly going to need to increase the heap size.

The other possible problem is that you don't have enough total system
memory for good performance.

If you're saying that the machine has 4GB of total system memory, then I
can almost guarantee that you don't have enough.  For an index size of
24GB, if that is the only index on the system, you're going to want the
OS to be able to cache several gigabytes of index data in memory.  What
I would want for that index is a machine with between 16GB and 32GB of
total memory, possibly more.  Some of that memory will be assigned to
programs, including Solr's heap, and whatever is left will be used by
the OS to cache data.

If your statement about 4GB memory is only talking about the Java heap,
then it will be important to know how much memory is left and whether
there is other software on the machine.

https://wiki.apache.org/solr/SolrPerformanceProblems#RAM

If there is insufficient memory for caching, then Solr will be forced to
read data from the disk to perform its most basic functions.  Disks are
SLOW, and when processes like Solr are waiting for disk access, the
system load average will usually be high.

Later in the thread, you mention that you're looking at "top" on a Linux
system.  It would be useful to see the top display.  Run top, press
shift-M to sort the list by memory usage, and grab a screenshot.  Share
that screenshot with us using a file sharing website.

Thanks,
Shawn

Reply via email to