org.jppf.server.scheduler.bundle.impl
Class AutoTunedBundler

java.lang.Object
  extended by org.jppf.server.scheduler.bundle.AbstractBundler
      extended by org.jppf.server.scheduler.bundle.impl.AbstractAutoTunedBundler
          extended by org.jppf.server.scheduler.bundle.impl.AutoTunedBundler
All Implemented Interfaces:
Bundler

public class AutoTunedBundler
extends AbstractAutoTunedBundler

This class implements a self tuned bundle size algorithm. It starts using the bundle size defined in property file and starts changing it to find a better performance. The algorithm starts making The algorithm waits for some execution to get a mean execution time, and them make a change in bundle size Each time the change is done, it is done over a smaller range randomly selected (like Monte Carlo algorithm).

Author:
Domingos Creado, Laurent Cohen

Field Summary
 
Fields inherited from class org.jppf.server.scheduler.bundle.impl.AbstractAutoTunedBundler
currentSize, rnd, samplesMap
 
Fields inherited from class org.jppf.server.scheduler.bundle.AbstractBundler
bundlerNumber, profile, timestamp
 
Constructor Summary
AutoTunedBundler(LoadBalancingProfile profile)
          Creates a new instance with the initial size of bundle as the start size.
 
Method Summary
 Bundler copy()
          Make a copy of this bundler.
 void feedback(int bundleSize, double time)
          This method performs the actual bundle size computation, based on current and past performance data.
 int getBundleSize()
          Get the latest bundle size computed by this bundler.
protected  int maxSize()
          Get the max bundle size that can be used for this bundler.
 
Methods inherited from class org.jppf.server.scheduler.bundle.AbstractBundler
dispose, getBundlerNumber, getProfile, getTimestamp, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoTunedBundler

public AutoTunedBundler(LoadBalancingProfile profile)
Creates a new instance with the initial size of bundle as the start size.

Parameters:
profile - the parameters of the auto-tuning algorithm, grouped as a performance analysis profile.
Method Detail

getBundleSize

public int getBundleSize()
Get the latest bundle size computed by this bundler.

Specified by:
getBundleSize in interface Bundler
Overrides:
getBundleSize in class AbstractAutoTunedBundler
Returns:
the bundle size as an int.
See Also:
Bundler.getBundleSize()

feedback

public void feedback(int bundleSize,
                     double time)
This method performs the actual bundle size computation, based on current and past performance data.
Depending on the the performance samples and profile parameters, the following actions may be triggered in this method:

Specified by:
feedback in interface Bundler
Overrides:
feedback in class AbstractAutoTunedBundler
Parameters:
bundleSize - bundle size of the new performance sample.
time - total execution time of the new sample.
See Also:
Bundler.feedback(int, double)

copy

public Bundler copy()
Make a copy of this bundler.

Returns:
a new AutoTunedBundler instance.
See Also:
Bundler.copy()

maxSize

protected int maxSize()
Get the max bundle size that can be used for this bundler.

Specified by:
maxSize in class AbstractBundler
Returns:
the bundle size as an int.
See Also:
AbstractBundler.maxSize()


Copyright © 2005-2010 JPPF Team.