lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Gerlowski (JIRA)" <>
Subject [jira] [Commented] (SOLR-13446) Improve default heap size and related handling
Date Tue, 07 May 2019 14:32:00 GMT


Jason Gerlowski commented on SOLR-13446:

To offer an unpopular opinion (you did ask for bike-shedding), I think the default max-heap
is fine where it is.

Yes, 512mb can be problematic for production use cases, but it's ideal for local development
and testing, where resources are tighter and developers have lots of other apps competing
for RAM.  Bumping up Solr's max-heap to 2gb would be a pain for developers already stretching
their workstations thin.

It's a bit counter-intuitive, but I think the current max-heap is ideal for production too,
at least in one narrow sense.  As a community, we advocate in the strongest terms for Solr
admins to examine and harden their config before going to production - including their heap
settings.  Not following this advice is going to hurt users in the long run.  So it's good
then, when inexperienced admins run into performance problems early on in their testing, and
realize that Solr has a max heap of 512mb.  It nudges them into complying with our best practices
around config-hardening.  512mb is "so bad it's good" :)  With a less obviously-bad max-heap,
I think we'd find more deployments going live with unhardened-configs, ultimately hurting
users/admins more.

Consider this opinion a -0 though.  I don't want to block progress if I'm clearly in the minority,
which I might be.


I'm all in favor of the other suggestion here: adding a warning log message on startup if
max-heap is below a particular threshold. 

> Improve default heap size and related handling
> ----------------------------------------------
>                 Key: SOLR-13446
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: scripts and tools
>    Affects Versions: 8.0
>            Reporter: Shawn Heisey
>            Priority: Minor
> Solr's scripts have a default max heap setting of 512MB.  I think it's fair to say that
for a production install, this is ridiculously small.  Nearly everyone who runs a Solr server
will need to increase this value.
> I think it would be useful to issue a warning in the log when the heap size is below
a certain value.  Text like "Detected max heap size is XXXX.  It might be necessary to increase
the heap size for proper operation.  See
for details."
> For people who are running very small servers, there should be a config option to turn
off that logging when somebody knows that the default heap size is perfectly fine for their
> At the same time, we also need to improve the default heap size.  I'm going to ask everyone
to bikeshed about what the new default should be.  Initial thought is a 2GB default, to be
made smaller automatically if detected system memory is low.  If the admin has explicitly
set the heap size, then none of this will take place.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message