org.jppf.server.scheduler.bundle.impl
Class AbstractAutoTunedBundler
java.lang.Object
org.jppf.server.scheduler.bundle.AbstractBundler
org.jppf.server.scheduler.bundle.impl.AbstractAutoTunedBundler
- All Implemented Interfaces:
- Bundler
- Direct Known Subclasses:
- AutoTunedBundler
public abstract class AbstractAutoTunedBundler
- extends AbstractBundler
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
|
Field Summary |
protected int |
currentSize
The currrent bundle size. |
protected Random |
rnd
Used to compute a pseudo-random increment to the bundle size, as part of a Monte Carlo random walk
towards a good solution. |
protected Map<Integer,BundlePerformanceSample> |
samplesMap
A map of performance samples, aorted by increasing bundle size. |
|
Method Summary |
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jppf.server.scheduler.bundle.Bundler |
copy |
currentSize
protected int currentSize
- The currrent bundle size.
rnd
protected Random rnd
- Used to compute a pseudo-random increment to the bundle size, as part of a Monte Carlo random walk
towards a good solution.
samplesMap
protected Map<Integer,BundlePerformanceSample> samplesMap
- A map of performance samples, aorted by increasing bundle size.
AbstractAutoTunedBundler
public AbstractAutoTunedBundler(AnnealingTuneProfile 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.
getBundleSize
public int getBundleSize()
- Get the latest bundle size computed by this bundler.
- 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:
- samples collection (unconditional)
- detection of performance profile changes, if not currently being done
- when a performance profile change is detected, recompute the bundle size.
- Specified by:
feedback in interface Bundler- Overrides:
feedback in class AbstractBundler
- Parameters:
bundleSize - bundle size of the new performance sample.time - total execution time of the new sample.- See Also:
Bundler.feedback(int, double)
Copyright © 2005-2010 JPPF Team.