Skip to content

Commit

Permalink
Make it possible to override the +A VM flag with an env variable
Browse files Browse the repository at this point in the history
For easier tweaking. References #178.
  • Loading branch information
michaelklishin committed Jun 3, 2015
1 parent 73f4763 commit 8ac7702
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
5 changes: 4 additions & 1 deletion scripts/rabbitmq-env
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ RABBITMQ_HOME="${SCRIPT_DIR}/.."
## Set defaults
. ${SCRIPT_DIR}/rabbitmq-defaults

DEFAULT_IO_THREAD_POOL_SIZE=30
[ "x" = "x$RABBITMQ_IO_THREAD_POOL_SIZE" ] && RABBITMQ_IO_THREAD_POOL_SIZE=${DEFAULT_IO_THREAD_POOL_SIZE}

## Common defaults
SERVER_ERL_ARGS="+K true +A30 +P 1048576 \
SERVER_ERL_ARGS="+K true +A $RABBITMQ_IO_THREAD_POOL_SIZE +P 1048576 \
-kernel inet_default_connect_options [{nodelay,true}]"

# warn about old rabbitmq.conf file, if no new one
Expand Down
6 changes: 5 additions & 1 deletion scripts/rabbitmq-server.bat
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ if "!RABBITMQ_NODE_ONLY!"=="" (
set RABBITMQ_START_RABBIT=-s rabbit boot
)

if "!RABBITMQ_IO_THREAD_POOL_SIZE!"=="" {
set set RABBITMQ_IO_THREAD_POOL_ARG=30
}

"!ERLANG_HOME!\bin\erl.exe" ^
-pa "!RABBITMQ_EBIN_ROOT!" ^
-noinput ^
Expand All @@ -155,7 +159,7 @@ if "!RABBITMQ_NODE_ONLY!"=="" (
!RABBITMQ_CONFIG_ARG! ^
!RABBITMQ_NAME_TYPE! !RABBITMQ_NODENAME! ^
+W w ^
+A30 ^
+A "!RABBITMQ_IO_THREAD_POOL_SIZE!" ^
+P 1048576 ^
-kernel inet_default_connect_options "[{nodelay, true}]" ^
!RABBITMQ_LISTEN_ARG! ^
Expand Down
6 changes: 5 additions & 1 deletion scripts/rabbitmq-service.bat
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,17 @@ if "!RABBITMQ_NODE_ONLY!"=="" (
set RABBITMQ_START_RABBIT=-s rabbit boot
)

if "!RABBITMQ_IO_THREAD_POOL_SIZE!"=="" {
set RABBITMQ_IO_THREAD_POOL_SIZE=30
}

set ERLANG_SERVICE_ARGUMENTS= ^
-pa "!RABBITMQ_EBIN_ROOT!" ^
!RABBITMQ_START_RABBIT! ^
-s rabbit boot ^
!RABBITMQ_CONFIG_ARG! ^
+W w ^
+A30 ^
+A "!RABBITMQ_IO_THREAD_POOL_SIZE!" ^
+P 1048576 ^
-kernel inet_default_connect_options "[{nodelay,true}]" ^
!RABBITMQ_LISTEN_ARG! ^
Expand Down

0 comments on commit 8ac7702

Please sign in to comment.