Skip to content

Commit

Permalink
remove reduced stack size
Browse files Browse the repository at this point in the history
related to elastic/elasticsearch#9135
also sync JAVA_OPTS with current ES opts
  • Loading branch information
seut committed Nov 4, 2016
1 parent 07e1b27 commit f36ec12
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGES.txt
Expand Up @@ -5,6 +5,9 @@ Changes for Crate
Unreleased
==========

- Removed reduced thread stack size java option, stack size defaults
to JVM defaults now.

- Fix: selecting os_info['jvm']['vm_vendor'] and os_info['jvm']['name'] caused
ColumnUnknownExceptions

Expand Down
22 changes: 18 additions & 4 deletions app/src/bin/crate.in.sh
Expand Up @@ -38,9 +38,6 @@ if [ "x$CRATE_DIRECT_SIZE" != "x" ]; then
JAVA_OPTS="$JAVA_OPTS -XX:MaxDirectMemorySize=${CRATE_DIRECT_SIZE}"
fi

# reduce the per-thread stack size
JAVA_OPTS="$JAVA_OPTS -Xss256k"

# set to headless, just in case
JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true"

Expand All @@ -59,11 +56,28 @@ JAVA_OPTS="$JAVA_OPTS -XX:+UseCMSInitiatingOccupancyOnly"
if [ "x$CRATE_USE_GC_LOGGING" != "x" ]; then
JAVA_OPTS="$JAVA_OPTS -XX:+PrintGCDetails"
JAVA_OPTS="$JAVA_OPTS -XX:+PrintGCTimeStamps"
JAVA_OPTS="$JAVA_OPTS -XX:+PrintGCDateStamps"
JAVA_OPTS="$JAVA_OPTS -XX:+PrintClassHistogram"
JAVA_OPTS="$JAVA_OPTS -XX:+PrintTenuringDistribution"
JAVA_OPTS="$JAVA_OPTS -XX:+PrintGCApplicationStoppedTime"
JAVA_OPTS="$JAVA_OPTS -Xloggc:/var/log/crate/gc.log"

GC_LOG_DIR="$CRATE_HOME/logs";
JAVA_OPTS="$JAVA_OPTS -Xloggc:$GC_LOG_DIR/gc.log"

# Ensure that the directory for the log file exists: the JVM will not create it.
if [[ ! -d "$GC_LOG_DIR" || ! -x "$GC_LOG_DIR" ]]; then
cat >&2 << EOF
Error: GC log directory '$GC_LOG_DIR' does not exist or is not accessible.
EOF
exit 1
fi
fi

# Disables explicit GC
JAVA_OPTS="$JAVA_OPTS -XX:+DisableExplicitGC"

# Ensure UTF-8 encoding by default (e.g. filenames)
JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF-8"

# Use our provided JNA always versus the system one
JAVA_OPTS="$JAVA_OPTS -Djna.nosys=true"
Expand Up @@ -71,6 +71,9 @@
* (...)
* CC-RR.finish()
* all finished -> RR.finish
*
* Note: As this collector combines multiple collectors in 1 thread, due to current resume/repeat architecture,
* number of collectors (shards) is limited by the configured thread stack size (default: 1024k on 64bit).
*/
public class CompositeCollector implements CrateCollector {

Expand Down

0 comments on commit f36ec12

Please sign in to comment.