You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Kamal Kishore Aggarwal <kk...@gmail.com> on 2015/04/18 04:14:34 UTC

Solr Performance with Ram size variation

Hi,

As per this article, the linux machine is preferred to have 1.5 times RAM
with respect to index size. So, to verify this, I tried testing the solr
performance in different volumes of RAM allocation keeping other
configuration (i.e Solid State Drives, 8 core processor, 64-Bit) to be same
in both the cases. I am using solr 4.8.1 with tomcat server.

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

1) Initially, the linux machine had 32 GB RAM, out of which I allocated
14GB to solr.

export CATALINA_OPTS="-Xms2048m -Xmx14336m -XX:+UseConcMarkSweepGC
-XX:+PrintGCApplicationStoppedTime -XX:+PrintGCDetails
-XX:+PrintGCTimeStamps -Xloggc:./logs/info_error/tomcat_gcdetails.log"

The average search time for 1000 queries 300ms.

2) After that, RAM was increased to 68 GB, out of which I allocated 40GB to
Solr. Now, on a strange note, the average search time for the same set of
queries was 3000ms.

Now, after this, I reduced solr allocated RAM to 25GB on 68GB machine. But,
still the search time was higher as compared to first case.

What am I missing. Please suggest.

Re: Solr Performance with Ram size variation

Posted by Shawn Heisey <ap...@elyograg.org>.
On 4/17/2015 8:14 PM, Kamal Kishore Aggarwal wrote:
> Hi,
>
> As per this article, the linux machine is preferred to have 1.5 times RAM
> with respect to index size. So, to verify this, I tried testing the solr
> performance in different volumes of RAM allocation keeping other
> configuration (i.e Solid State Drives, 8 core processor, 64-Bit) to be same
> in both the cases. I am using solr 4.8.1 with tomcat server.
>
> https://wiki.apache.org/solr/SolrPerformanceProblems
>
> 1) Initially, the linux machine had 32 GB RAM, out of which I allocated
> 14GB to solr.
>
> export CATALINA_OPTS="-Xms2048m -Xmx14336m -XX:+UseConcMarkSweepGC
> -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCDetails
> -XX:+PrintGCTimeStamps -Xloggc:./logs/info_error/tomcat_gcdetails.log"
>
> The average search time for 1000 queries 300ms.
>
> 2) After that, RAM was increased to 68 GB, out of which I allocated 40GB to
> Solr. Now, on a strange note, the average search time for the same set of
> queries was 3000ms.
>
> Now, after this, I reduced solr allocated RAM to 25GB on 68GB machine. But,
> still the search time was higher as compared to first case.
>
> What am I missing. Please suggest.

How much disk space do all your indexes on that Solr server use?

The discrepancy in query time is almost guaranteed to be because of 
garbage collection pauses.  There is no need to increase the Solr heap 
size ... if you had kept the heap at 14GB while increasing the RAM, the 
average qtime would have either stayed the same or decreased.

GC tuning is required for large heaps in Solr, which typically means 
anything over about 2GB.  You have enabled the concurrent mark sweep 
collector, but you have no other tuning.  I bet that if you tune your 
GC, you can get a lot better than 300ms average.

On the following wiki page, I have condensed all the knowledge I have 
about GC tuning for Solr:

http://wiki.apache.org/solr/ShawnHeisey

The "bin/solr" script that starts Solr 5.x uses a heavily tuned CMS 
config, very similar to the CMS config that's on my wiki page.

Here's some more info about Solr performance with respect to RAM:

http://wiki.apache.org/solr/SolrPerformanceProblems

Thanks,
Shawn


Re: Solr Performance with Ram size variation

Posted by Otis Gospodnetic <ot...@gmail.com>.
Hi,

Because you went over 31-32 GB heap you lost the benefit of compressed
pointers and even though you gave the JVM more memory the GC may have had
to work harder.  This is a relatively well educated guess, which you can
confirm if you run tests and look at GC counts, times, JVM heap memory pool
utilization, etc.

Otis
--
Monitoring * Alerting * Anomaly Detection * Centralized Log Management
Solr & Elasticsearch Support * http://sematext.com/


On Fri, Apr 17, 2015 at 10:14 PM, Kamal Kishore Aggarwal <
kkroyal.192@gmail.com> wrote:

> Hi,
>
> As per this article, the linux machine is preferred to have 1.5 times RAM
> with respect to index size. So, to verify this, I tried testing the solr
> performance in different volumes of RAM allocation keeping other
> configuration (i.e Solid State Drives, 8 core processor, 64-Bit) to be same
> in both the cases. I am using solr 4.8.1 with tomcat server.
>
> https://wiki.apache.org/solr/SolrPerformanceProblems
>
> 1) Initially, the linux machine had 32 GB RAM, out of which I allocated
> 14GB to solr.
>
> export CATALINA_OPTS="-Xms2048m -Xmx14336m -XX:+UseConcMarkSweepGC
> -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCDetails
> -XX:+PrintGCTimeStamps -Xloggc:./logs/info_error/tomcat_gcdetails.log"
>
> The average search time for 1000 queries 300ms.
>
> 2) After that, RAM was increased to 68 GB, out of which I allocated 40GB to
> Solr. Now, on a strange note, the average search time for the same set of
> queries was 3000ms.
>
> Now, after this, I reduced solr allocated RAM to 25GB on 68GB machine. But,
> still the search time was higher as compared to first case.
>
> What am I missing. Please suggest.
>

Re: Solr Performance with Ram size variation

Posted by Puneet Pawaia <pu...@gmail.com>.
Hi,
This may be irrelevant but your machine configuration reminded me of some
reading I had done some time back on memory vs ssd.
Do a search on solr ssd and you should get some meaningful posts.
Like this one https://sbdevel.wordpress.com/2013/06/06/memory-is-overrated/

Regards
Puneet
On 18 Apr 2015 07:45, "Kamal Kishore Aggarwal" <kk...@gmail.com>
wrote:

> Hi,
>
> As per this article, the linux machine is preferred to have 1.5 times RAM
> with respect to index size. So, to verify this, I tried testing the solr
> performance in different volumes of RAM allocation keeping other
> configuration (i.e Solid State Drives, 8 core processor, 64-Bit) to be same
> in both the cases. I am using solr 4.8.1 with tomcat server.
>
> https://wiki.apache.org/solr/SolrPerformanceProblems
>
> 1) Initially, the linux machine had 32 GB RAM, out of which I allocated
> 14GB to solr.
>
> export CATALINA_OPTS="-Xms2048m -Xmx14336m -XX:+UseConcMarkSweepGC
> -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCDetails
> -XX:+PrintGCTimeStamps -Xloggc:./logs/info_error/tomcat_gcdetails.log"
>
> The average search time for 1000 queries 300ms.
>
> 2) After that, RAM was increased to 68 GB, out of which I allocated 40GB to
> Solr. Now, on a strange note, the average search time for the same set of
> queries was 3000ms.
>
> Now, after this, I reduced solr allocated RAM to 25GB on 68GB machine. But,
> still the search time was higher as compared to first case.
>
> What am I missing. Please suggest.
>