summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Klishin <mklishin@pivotal.io>2017-10-02 09:34:56 +0300
committerMichael Klishin <mklishin@pivotal.io>2017-10-02 09:34:56 +0300
commit7e64d485e196c1791df6eff07940a6c5f368a7a0 (patch)
tree84addcc149d28929a4b199ece22e29c9942812d0
parentf2286b22f929d6b499964b95ad311cf1f634090b (diff)
parent9e7cea3ae6dfb89bc14e562812420ee846486220 (diff)
downloadrabbitmq-server-git-7e64d485e196c1791df6eff07940a6c5f368a7a0.tar.gz
Merge branch 'stable'
Conflicts: src/rabbit_amqqueue_process.erl
-rw-r--r--src/rabbit_amqqueue_process.erl18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl
index 678f1136c3..9b7a569e94 100644
--- a/src/rabbit_amqqueue_process.erl
+++ b/src/rabbit_amqqueue_process.erl
@@ -22,7 +22,6 @@
-define(SYNC_INTERVAL, 200). %% milliseconds
-define(RAM_DURATION_UPDATE_INTERVAL, 5000).
--define(CONSUMER_BIAS_RATIO, 1.1). %% i.e. consume 10% faster
-export([info_keys/0]).
@@ -1014,18 +1013,18 @@ emit_consumer_deleted(ChPid, ConsumerTag, QName, ActingUser) ->
%%----------------------------------------------------------------------------
-prioritise_call(Msg, _From, _Len, State) ->
+prioritise_call(Msg, _From, _Len, _State) ->
case Msg of
info -> 9;
{info, _Items} -> 9;
consumers -> 9;
stat -> 7;
- {basic_consume, _, _, _, _, _, _, _, _, _, _} -> consumer_bias(State);
- {basic_cancel, _, _, _} -> consumer_bias(State);
+ {basic_consume, _, _, _, _, _, _, _, _, _, _} -> 1;
+ {basic_cancel, _, _, _} -> 1;
_ -> 0
end.
-prioritise_cast(Msg, _Len, State) ->
+prioritise_cast(Msg, _Len, _State) ->
case Msg of
delete_immediately -> 8;
{delete_exclusive, _Pid} -> 8;
@@ -1034,7 +1033,7 @@ prioritise_cast(Msg, _Len, State) ->
{run_backing_queue, _Mod, _Fun} -> 6;
{ack, _AckTags, _ChPid} -> 3; %% [1]
{resume, _ChPid} -> 2;
- {notify_sent, _ChPid, _Credit} -> consumer_bias(State);
+ {notify_sent, _ChPid, _Credit} -> 1;
_ -> 0
end.
@@ -1047,13 +1046,6 @@ prioritise_cast(Msg, _Len, State) ->
%% about. Finally, we prioritise ack over resume since it should
%% always reduce memory use.
-consumer_bias(#q{backing_queue = BQ, backing_queue_state = BQS}) ->
- case BQ:msg_rates(BQS) of
- {0.0, _} -> 0;
- {Ingress, Egress} when Egress / Ingress < ?CONSUMER_BIAS_RATIO -> 1;
- {_, _} -> 0
- end.
-
prioritise_info(Msg, _Len, #q{q = #amqqueue{exclusive_owner = DownPid}}) ->
case Msg of
{'DOWN', _, process, DownPid, _} -> 8;