lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shawn Heisey (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-13446) Improve default heap size and related handling
Date Tue, 07 May 2019 18:37:00 GMT

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

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

Thanks, for your opinion, [~gerlowskija]!

I'm a little torn on changing the default also.  But if it's coded well, I think letting Java
set the heap size would be a good option.  And anytime Java does choose the heap size, we
need a log entry informing the user that it wasn't explicitly set -- because I would not want
to have somebody go into production that way without really knowing that's what they're doing.

Even if we stick with a hardcoded default, I absolutely want to have something in the log
as discussed, with a configurable threshold, and we'll need to decide where to set that threshold
default.  As mentioned, I think 2GB is a good starting point.  And we probably ought to log
something short, one line, at INFO if they're above the threshold.

Here's more detail to the nuts and bolts I was thinking about:  Write a tiny java program
that can be executed by the start script, which writes a shell (or cmd) include file in a
temp directory with data that the start script can load before starting Solr.  I'm thinking
that we call this little program solr-agent, and it can be a precursor to the ideas in SOLR-6733
and SOLR-6734.

I need to do some experiments to determine whether or not Java and our start scripts can detect
when there is not enough actual memory to satisfy the heap allocation.

> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message