Skip to content

Commit 08f0cb9

Browse files
lhoguinLoïc Hoguin
authored andcommitted
Merge pull request #2854 from rabbitmq/dirty-io-warnings
Replace Async threads warning with Dirty I/O schedulers warning (cherry picked from commit 4bc2bb0)
1 parent 76bc589 commit 08f0cb9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

deps/rabbit/src/rabbit.erl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@
257257

258258
-define(APPS, [os_mon, mnesia, rabbit_common, rabbitmq_prelaunch, ra, sysmon_handler, rabbit]).
259259

260-
-define(ASYNC_THREADS_WARNING_THRESHOLD, 8).
260+
-define(DIRTY_IO_SCHEDULERS_WARNING_THRESHOLD, 10).
261261

262262
%% 1 minute
263263
-define(BOOT_START_TIMEOUT, 1 * 60 * 1000).
@@ -1214,11 +1214,11 @@ warn_if_kernel_config_dubious() ->
12141214
"and CPU utilization may worsen.~n")
12151215
end
12161216
end,
1217-
AsyncThreads = erlang:system_info(thread_pool_size),
1218-
case AsyncThreads < ?ASYNC_THREADS_WARNING_THRESHOLD of
1217+
DirtyIOSchedulers = erlang:system_info(dirty_io_schedulers),
1218+
case DirtyIOSchedulers < ?DIRTY_IO_SCHEDULERS_WARNING_THRESHOLD of
12191219
true -> rabbit_log:warning(
1220-
"Erlang VM is running with ~b I/O threads, "
1221-
"file I/O performance may worsen~n", [AsyncThreads]);
1220+
"Erlang VM is running with ~b dirty I/O schedulers, "
1221+
"file I/O performance may worsen~n", [DirtyIOSchedulers]);
12221222
false -> ok
12231223
end,
12241224
IDCOpts = case application:get_env(kernel, inet_default_connect_options) of

0 commit comments

Comments
 (0)