[ 
https://issues.apache.org/jira/browse/SOLR-13446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16832929#comment-16832929
 ] 

Shawn Heisey commented on SOLR-13446:
-------------------------------------

{quote}Just let the JVM do it's thing?
{quote}
I'm ambivalent about this idea.

On the negative side, I think that doing this would contribute to the general 
misconception people have that "Java is a memory hog." Although I do not agree 
with that perception, I'm not going to try and disprove it here.

On the plus side, there's near zero chance that the heap will be too large.  It 
could end up being too small!

Incorporating your idea, here's a more fleshed out proposal:
 * If explicit memory options are such that the max heap is above the 
threshold, or the admin has configured the option to disable logging, then 
nothing will be logged. We could consider trying to detect when the heap size 
is way too big for the available memory in the server, but I'm not sure we need 
to do that.
 * If no memory options are given, and/or the max heap size is below a certain 
threshold, we log one or two warnings, with text like the following:
 ** "The heap size was not restricted at startup. Java has chosen a max heap 
size of XXXX. If this is not acceptable, please configure Solr to use a 
specific heap size. See [https://blahblah|https://blahblah/] for details."
 ** "Solr is running with a heap size of XXXX. This is a small heap, which 
might cause operational or performance problems. See 
[https://blahblah|https://blahblah/] for details."

 

> Improve default heap size and related handling
> ----------------------------------------------
>
>                 Key: SOLR-13446
>                 URL: https://issues.apache.org/jira/browse/SOLR-13446
>             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 
> https://lucene.apache.org/solr/path/to/ref/guide/location 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 setup.
> 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
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to