seda.sandStorm.internal
Class ResponseTimeControllerMM1

java.lang.Object
  extended by seda.sandStorm.internal.ResponseTimeController
      extended by seda.sandStorm.internal.ResponseTimeControllerMM1
All Implemented Interfaces:
ResponseTimeControllerIF

public class ResponseTimeControllerMM1
extends ResponseTimeController

An implementation of ResponseTimeController that models the stage as an M/M/1 queue.


Field Summary
private static boolean ADJUST_RATE
           
private static boolean ADJUST_THRESHOLD
           
private  double avgNumThreads
           
private static boolean BIDIRECTIONAL_FILTER
           
private  double count_est_ninetiethRT
           
private  double count_measured_lambda
           
private  double count_measured_mu
           
private  int countNinetiethRT
           
private  int countNumThreads
           
private  int cur_measurement
           
private  double curRate
           
private  int curThreshold
           
private static boolean DEBUG
           
private static boolean DEBUG_CAP_RATE
           
private static double DEBUG_RATE
           
private  boolean enabled
           
private  long endProcTime
           
private  double est_ninetiethRT
           
private static int ESTIMATION_SIZE
           
private static long ESTIMATION_TIME
           
private static int INIT_DEPTH
           
private static double INIT_RATE
           
protected static int INIT_THRESHOLD
           
private  long lasttime
           
protected static int MAX_THRESHOLD
           
private  double measured_lambda
           
private  double measured_mu
           
private static int MEASUREMENT_SIZE
           
private  long[] measurements
           
private static double MIN_RATE
           
protected static int MIN_THRESHOLD
           
private static boolean MOVING_AVERAGE
           
private static int NINETIETH
           
private  double ninetiethRT
           
private  int numEst
           
private  int numProcessed
           
private  int numReceived
           
private  SinkProxy sinkProxy
           
private static double SMOOTH_CONST
           
private static double SMOOTH_CONST_DOWN
           
private static double SMOOTH_CONST_UP
           
private  long[] sortedmeasurements
           
private  long startProcTime
           
private  double total_est_ninetiethRT
           
private  double total_measured_lambda
           
private  double total_measured_mu
           
private  double totalNinetiethRT
           
private  int totalNumThreads
           
private  long totalProcTime
           
 
Fields inherited from class seda.sandStorm.internal.ResponseTimeController
pred, stage, targetRT
 
Constructor Summary
ResponseTimeControllerMM1(ManagerIF mgr, StageWrapperIF stage)
           
 
Method Summary
 void adjustThreshold(QueueElementIF[] fetched, long procTime)
          Invoked by the stage's thread manager to adjust admission control parameters.
 void adjustThreshold(QueueElementIF[] fetched, long startTime, long endTime, boolean isFirst, int numThreads)
           
 void disable()
          Disable the response time controller.
 void enable()
          Enable the response time controller.
 
Methods inherited from class seda.sandStorm.internal.ResponseTimeController
getTarget, setTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

private static final boolean DEBUG
See Also:
Constant Field Values

ADJUST_THRESHOLD

private static final boolean ADJUST_THRESHOLD
See Also:
Constant Field Values

ADJUST_RATE

private static final boolean ADJUST_RATE
See Also:
Constant Field Values

INIT_THRESHOLD

protected static final int INIT_THRESHOLD
See Also:
Constant Field Values

MIN_THRESHOLD

protected static final int MIN_THRESHOLD
See Also:
Constant Field Values

MAX_THRESHOLD

protected static final int MAX_THRESHOLD
See Also:
Constant Field Values

INIT_RATE

private static final double INIT_RATE
See Also:
Constant Field Values

INIT_DEPTH

private static final int INIT_DEPTH
See Also:
Constant Field Values

MIN_RATE

private static final double MIN_RATE
See Also:
Constant Field Values

DEBUG_CAP_RATE

private static final boolean DEBUG_CAP_RATE
See Also:
Constant Field Values

DEBUG_RATE

private static final double DEBUG_RATE
See Also:
Constant Field Values

MOVING_AVERAGE

private static final boolean MOVING_AVERAGE
See Also:
Constant Field Values

MEASUREMENT_SIZE

private static final int MEASUREMENT_SIZE
See Also:
Constant Field Values

ESTIMATION_SIZE

private static final int ESTIMATION_SIZE
See Also:
Constant Field Values

ESTIMATION_TIME

private static final long ESTIMATION_TIME
See Also:
Constant Field Values

SMOOTH_CONST

private static final double SMOOTH_CONST
See Also:
Constant Field Values

NINETIETH

private static final int NINETIETH
See Also:
Constant Field Values

BIDIRECTIONAL_FILTER

private static final boolean BIDIRECTIONAL_FILTER
See Also:
Constant Field Values

SMOOTH_CONST_UP

private static final double SMOOTH_CONST_UP
See Also:
Constant Field Values

SMOOTH_CONST_DOWN

private static final double SMOOTH_CONST_DOWN
See Also:
Constant Field Values

sinkProxy

private SinkProxy sinkProxy

measurements

private long[] measurements

sortedmeasurements

private long[] sortedmeasurements

curThreshold

private int curThreshold

cur_measurement

private int cur_measurement

curRate

private double curRate

measured_mu

private double measured_mu

measured_lambda

private double measured_lambda

est_ninetiethRT

private double est_ninetiethRT

total_measured_mu

private double total_measured_mu

count_measured_mu

private double count_measured_mu

total_measured_lambda

private double total_measured_lambda

count_measured_lambda

private double count_measured_lambda

total_est_ninetiethRT

private double total_est_ninetiethRT

count_est_ninetiethRT

private double count_est_ninetiethRT

ninetiethRT

private double ninetiethRT

totalNinetiethRT

private double totalNinetiethRT

countNinetiethRT

private int countNinetiethRT

lasttime

private long lasttime

totalProcTime

private long totalProcTime

startProcTime

private long startProcTime

endProcTime

private long endProcTime

numProcessed

private int numProcessed

numReceived

private int numReceived

numEst

private int numEst

avgNumThreads

private double avgNumThreads

totalNumThreads

private int totalNumThreads

countNumThreads

private int countNumThreads

enabled

private boolean enabled
Constructor Detail

ResponseTimeControllerMM1

public ResponseTimeControllerMM1(ManagerIF mgr,
                                 StageWrapperIF stage)
                          throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException
Method Detail

enable

public void enable()
Description copied from interface: ResponseTimeControllerIF
Enable the response time controller.

Specified by:
enable in interface ResponseTimeControllerIF
Specified by:
enable in class ResponseTimeController

disable

public void disable()
Description copied from interface: ResponseTimeControllerIF
Disable the response time controller.

Specified by:
disable in interface ResponseTimeControllerIF
Specified by:
disable in class ResponseTimeController

adjustThreshold

public void adjustThreshold(QueueElementIF[] fetched,
                            long startTime,
                            long endTime,
                            boolean isFirst,
                            int numThreads)

adjustThreshold

public void adjustThreshold(QueueElementIF[] fetched,
                            long procTime)
Description copied from interface: ResponseTimeControllerIF
Invoked by the stage's thread manager to adjust admission control parameters.

Specified by:
adjustThreshold in interface ResponseTimeControllerIF
Specified by:
adjustThreshold in class ResponseTimeController