Skip to content

Tune scheduling bind flags for Erlang VM #873

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion scripts/rabbitmq-env
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,11 @@ RABBITMQ_HOME="$(rmq_realpath "${RABBITMQ_SCRIPTS_DIR}/..")"
## Set defaults
. ${RABBITMQ_SCRIPTS_DIR}/rabbitmq-defaults

DEFAULT_SCHEDULER_BIND_TYPE="db"
[ "x" = "x$RABBITMQ_SCHEDULER_BIND_TYPE" ] && RABBITMQ_SCHEDULER_BIND_TYPE=${DEFAULT_SCHEDULER_BIND_TYPE}

## Common defaults
SERVER_ERL_ARGS="+P 1048576"
SERVER_ERL_ARGS="+P 1048576 +stbt $RABBITMQ_SCHEDULER_BIND_TYPE "

# We save the current value of $RABBITMQ_PID_FILE in case it was set by
# an init script. If $CONF_ENV_FILE overrides it again, we must ignore
Expand Down
23 changes: 14 additions & 9 deletions scripts/rabbitmq-env.bat
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,23 @@ REM ## Set defaults
REM . ${SCRIPT_DIR}/rabbitmq-defaults
call "%SCRIPT_DIR%\rabbitmq-defaults.bat"

REM These common defaults aren't referenced in the batch scripts
REM ## Common defaults
REM SERVER_ERL_ARGS="+P 1048576"
REM
set DEFAULT_SCHEDULER_BIND_TYPE=db

REM [ "x" = "x$RABBITMQ_SCHEDULER_BIND_TYPE" ] && RABBITMQ_SCHEDULER_BIND_TYPE=${DEFAULT_SCHEDULER_BIND_TYPE}
REM set the default scheduling bind type
if "!RABBITMQ_SCHEDULER_BIND_TYPE!"=="" (
set RABBITMQ_SCHEDULER_BIND_TYPE=!DEFAULT_SCHEDULER_BIND_TYPE!
)

REM # warn about old rabbitmq.conf file, if no new one
REM if [ -f /etc/rabbitmq/rabbitmq.conf ] && \
REM [ ! -f ${CONF_ENV_FILE} ] ; then
REM echo -n "WARNING: ignoring /etc/rabbitmq/rabbitmq.conf -- "
REM echo "location has moved to ${CONF_ENV_FILE}"
REM fi

REM ERL_ARGS aren't referenced in the batch scripts
REM Common defaults
REM set SERVER_ERL_ARGS=+P 1048576
set SERVER_ERL_ARGS=+P 1048576 +stbt !RABBITMQ_SCHEDULER_BIND_TYPE!

REM ## Get configuration variables from the configure environment file
REM [ -f ${CONF_ENV_FILE} ] && . ${CONF_ENV_FILE} || true
Expand Down Expand Up @@ -151,7 +154,9 @@ if "!RABBITMQ_DIST_PORT!"=="" (
)

REM [ "x" = "x$RABBITMQ_SERVER_ERL_ARGS" ] && RABBITMQ_SERVER_ERL_ARGS=${SERVER_ERL_ARGS}
REM No Windows equivalent
if "!RABBITMQ_SERVER_ERL_ARGS!"=="" (
set RABBITMQ_SERVER_ERL_ARGS=!SERVER_ERL_ARGS!
)

REM [ "x" = "x$RABBITMQ_CONFIG_FILE" ] && RABBITMQ_CONFIG_FILE=${CONFIG_FILE}
if "!RABBITMQ_CONFIG_FILE!"=="" (
Expand Down Expand Up @@ -386,8 +391,8 @@ goto :filter_paths_done
set paths=%1
set paths=%paths:"=%
for /f "tokens=1* delims=;" %%a in ("%paths%") do (
if not "%%a" == "" call :filter_path %%a
if not "%%b" == "" call :filter_paths %%b
if not "%%a" == "" call :filter_path "%%a"
if not "%%b" == "" call :filter_paths "%%b"
)
set paths=
exit /b
Expand Down
3 changes: 1 addition & 2 deletions scripts/rabbitmq-server.bat
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,8 @@ if "!ENV_OK!"=="false" (
!RABBITMQ_NAME_TYPE! !RABBITMQ_NODENAME! ^
+W w ^
+A "!RABBITMQ_IO_THREAD_POOL_SIZE!" ^
+P 1048576 ^
!RABBITMQ_LISTEN_ARG! ^
!RABBITMQ_SERVER_ERL_ARGS! ^
!RABBITMQ_LISTEN_ARG! ^
-kernel inet_default_connect_options "[{nodelay, true}]" ^
!RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS! ^
-sasl errlog_type error ^
Expand Down
3 changes: 1 addition & 2 deletions scripts/rabbitmq-service.bat
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,8 @@ set ERLANG_SERVICE_ARGUMENTS= ^
!RABBITMQ_CONFIG_ARG! ^
+W w ^
+A "!RABBITMQ_IO_THREAD_POOL_SIZE!" ^
+P 1048576 ^
!RABBITMQ_LISTEN_ARG! ^
!RABBITMQ_SERVER_ERL_ARGS! ^
!RABBITMQ_LISTEN_ARG! ^
-kernel inet_default_connect_options "[{nodelay,true}]" ^
!RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS! ^
-sasl errlog_type error ^
Expand Down