anagainaru / iSBatch

Code to compute the optimal request time for applications submitted for execution using HPC batch schedulers
Other
0 stars 1 forks source link

Variability in the discretization #86

Open anagainaru opened 4 years ago

anagainaru commented 4 years ago

For the resource_discretization parameter set to x and no interpolation allowed, the sequences generated are slightly different for every execution.

    history = np.loadtxt(file_name, delimiter=' ')
    params = rqs.ResourceParameters()
    params.resource_discretization = 20
    params.interpolation_model = []
    params.submissions_limit = 2
    params.submissions_limit_strategy = rqs.LimitStrategy.AverageBased
    #params.submissions_limit_strategy = rqs.LimitStrategy.ThresholdBased
    params.CR_strategy = rqs.CRStrategy.AdaptiveCheckpoint
    wl = rqs.ResourceEstimator(history, params=params)
    sequence = wl.compute_request_sequence()
    print("Request sequence: %s" %(sequence))

Example outputs (print discrete values and cdf for the sequence class):

[2.708648433704945, 5.248860196336077, 5.6039132003274785, 5.816865403446767, 5.893487330257736, 6.502585701735988, 6.88605460411328, 6.939877402811501, 7.2583872921350725, 7.8353367604822575, 7.954694125513323, 8.990206244058943, 9.140393558734237, 9.350790284574856, 9.479535903441512, 9.573651788913272, 11.431532480900561, 11.637350249722044, 11.667685262964483, 13.33928544239686] [0.0039999999999999975, 0.08, 0.11200000000000002, 0.135, 0.14200000000000002, 0.23900000000000002, 0.303, 0.318, 0.36700000000000005, 0.464, 0.48500000000000004, 0.674, 0.7040000000000001, 0.7400000000000001, 0.767, 0.785, 0.9570000000000001, 0.9650000000000001, 0.9670000000000001, 1.0]
Request sequence: [(7.954694125513323, 1), (1.6189576633999492, 0), (3.7129911374511595, 1), (1.671600179432378, 0)]

and

[4.434416019924845, 4.653343482129835, 5.1462080229391525, 5.99051311275971, 6.491010466725066, 7.391806418137004, 7.683235846915063, 7.983304638261996, 8.111120559483009, 8.285142782384286, 8.593691971849676, 8.702105862636046, 8.723284709398857, 8.815352257734062, 8.816103545868128, 8.974097591548023, 9.250412858609508, 9.644804821749176, 10.541376826163638, 13.33928544239686] [0.036000000000000004, 0.049, 0.074, 0.159, 0.23600000000000002, 0.393, 0.43800000000000006, 0.49000000000000005, 0.512, 0.542, 0.596, 0.618, 0.622, 0.641, 0.642, 0.67, 0.7210000000000001, 0.794, 0.8960000000000001, 1.0]
Request sequence: [(9.644804821749176, 1), (0.8965720044144625, 0), (3.694480620647685, 0)]
anagainaru commented 4 years ago

The code with limited number of submissions might give sequences with an average submission higher than the threshold (for the average based code) With a discretization of 10, the unit test can return: [1.104, 2.364, 1.751] (not always so it's again non deterministic)