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 Randy Fradin <ra...@gmail.com> on 2018/03/31 04:24:22 UTC

Safe to change numVersionBuckets?

I have a SolrCloud cluster (version 6.5.1) with around 3300 cores per
instance. I've been investigating what is driving heap utilization since it
is higher than I expected. I took a heap dump and found the largest driver
of heap utilization is the array of VersionBucket objects in the
org.apache.solr.update.VersionInfo class. The array is size 65536 and there
is one per SolrCore instance. Each instance of the array is 1.8MB so the
aggregate size is 6GB in heap.

I understand from reading the discussion in SOLR-6820 that 65536 is the
recommended default for this setting now because it results in higher
document write rates than the old default of 256. I would like to reduce my
heap utilization and I'm OK with somewhat slower document writing
throughput. My question is, it is safe to reduce the value
of numVersionBuckets on all of my existing cores without reindexing my data?

My solrconfig.xml contains this for all of my collections:

<updateHandler class="solr.DirectUpdateHandler2">
  <updateLog>
    <str name="dir">${solr.ulog.dir:}</str>
    <int name="numVersionBuckets">${solr.ulog.numVersionBuckets:65536}</int>
  </updateLog>
</updateHandler>

Assuming it is safe to change, can I just add a vm arg to the Solr process
like "-Dsolr.ulog.numVersionBuckets=256" to override the value for all
cores at once? Or do I have to change and re-upload the solrconfig.xml
files and reload the cores?

Thanks

Re: Safe to change numVersionBuckets?

Posted by Shawn Heisey <el...@elyograg.org>.
On 3/30/2018 10:24 PM, Randy Fradin wrote:
> I understand from reading the discussion in SOLR-6820 that 65536 is the
> recommended default for this setting now because it results in higher
> document write rates than the old default of 256. I would like to reduce my
> heap utilization and I'm OK with somewhat slower document writing
> throughput. My question is, it is safe to reduce the value
> of numVersionBuckets on all of my existing cores without reindexing my data?
>
> My solrconfig.xml contains this for all of my collections:
>
> <updateHandler class="solr.DirectUpdateHandler2">
>    <updateLog>
>      <str name="dir">${solr.ulog.dir:}</str>
>      <int name="numVersionBuckets">${solr.ulog.numVersionBuckets:65536}</int>
>    </updateLog>
> </updateHandler>

It looks like that is something that applies during indexing, and 
doesn't affect the data that's already indexed.

If you do heavy indexing, then you probably shouldn't reduce it quite 
that far.  If your indexing is light, then a low value is not likely to 
be problematic.

> Assuming it is safe to change, can I just add a vm arg to the Solr process
> like "-Dsolr.ulog.numVersionBuckets=256" to override the value for all
> cores at once? Or do I have to change and re-upload the solrconfig.xml
> files and reload the cores?

Setting it with the system property will require restarting every Solr 
service.  If you change it in solrconfig.xml and then upload the updated 
config to zookeeper under the same config name, all you will need to do 
to apply the change is reload collections using that config.

With 3300 cores per server, a reload is probably significantly less 
stress on the system than a full Solr restart.

Thanks,
Shawn