Skip to content

Commit

Permalink
Introduce ES_USE_IPV4 flag in .bat files
Browse files Browse the repository at this point in the history
Synchronize the .bat files with the .sh ones by adding ES_USE_IPV4
flag. Higher branches (from 1.4 included) extend this functionality by
introducing elasticsearch.in.bat to mirror elasticsearch.in for *nix
systems.

Relates elastic#8237
  • Loading branch information
costin committed Oct 28, 2014
1 parent 349bc3c commit 534345e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
8 changes: 8 additions & 0 deletions bin/elasticsearch.bat
Expand Up @@ -35,6 +35,14 @@ set JAVA_OPTS=%JAVA_OPTS% -XX:MaxDirectMemorySize=%ES_DIRECT_SIZE%

set JAVA_OPTS=%JAVA_OPTS% -Xss256k

REM set to headless, just in case
set JAVA_OPTS=%JAVA_OPTS% -Djava.awt.headless=true

REM Force the JVM to use IPv4 stack
if NOT "%ES_USE_IPV4%" == "" (
set JAVA_OPTS=%JAVA_OPTS% -Djava.net.preferIPv4Stack=true
)

REM Enable aggressive optimizations in the JVM
REM - Disabled by default as it might cause the JVM to crash
REM set JAVA_OPTS=%JAVA_OPTS% -XX:+AggressiveOpts
Expand Down
9 changes: 8 additions & 1 deletion bin/service.bat
Expand Up @@ -138,11 +138,18 @@ if NOT "%ES_DIRECT_SIZE%" == "" set JAVA_OPTS=%JAVA_OPTS% -XX:MaxDirectMemorySiz
rem thread stack size
set JVM_SS=256

REM set to headless, just in case
set JAVA_OPTS=%JAVA_OPTS% -Djava.awt.headless=true

REM Force the JVM to use IPv4 stack
if NOT "%ES_USE_IPV4%" == "" (
set JAVA_OPTS=%JAVA_OPTS% -Djava.net.preferIPv4Stack=true
)

REM Enable aggressive optimizations in the JVM
REM - Disabled by default as it might cause the JVM to crash
REM set JAVA_OPTS=%JAVA_OPTS% -XX:+AggressiveOpts


set JAVA_OPTS=%JAVA_OPTS% -XX:+UseConcMarkSweepGC

set JAVA_OPTS=%JAVA_OPTS% -XX:CMSInitiatingOccupancyFraction=75
Expand Down

0 comments on commit 534345e

Please sign in to comment.