Skip to content

Commit

Permalink
Added another parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Valeria Sakovskaya committed Dec 13, 2023
1 parent a8ef4ea commit f2ec575
Show file tree
Hide file tree
Showing 5 changed files with 351 additions and 175 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ wget -O jdk.tar.gz https://download.bell-sw.com/java/11.0.20+8/bellsoft-jdk11.0.
Unpack `jdk.tar.gz` and remove the archive.
```
tar xzf jdk.tar.gz && rm -fv jdk.tar.gz
cd jdk-11.0.20.8 & java -version
```

## 2. Prepare a dataset
Expand Down
362 changes: 269 additions & 93 deletions dataset_util.ipynb

Large diffs are not rendered by default.

74 changes: 37 additions & 37 deletions datasets/ext_avrora_real_saved_states.csv
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
MaxTenuringThreshold,ParallelGCThreads,avgGCPause,totalTenuredUsedMax,avgPause,freedMemoryByFullGC,avgPromotion
10,20,0.01203,4747.0,0.05439,3072.0,-439501.0
10,16,0.00983,4773.0,0.05349,3072.0,-306176.0
7,24,0.01115,4724.0,0.0562,3072.0,-419430.0
16,8,0.00665,4720.0,0.04569,3072.0,-280576.0
1,20,0.00989,4800.0,0.0547,4096.0,-270541.0
13,20,0.00954,4747.0,0.05559,4096.0,-169574.0
16,4,0.00755,4720.0,0.05242,3072.0,-127590.0
13,16,0.01032,4720.0,0.05476,3072.0,-445030.0
4,24,0.01006,4751.0,0.05766,5120.0,-216269.0
13,8,0.0078,4804.0,0.05248,3072.0,-338330.0
4,20,0.01106,4720.0,0.05025,3072.0,-366797.0
16,20,0.01081,4720.0,0.05464,3072.0,-365158.0
13,4,0.00627,4752.0,0.04415,3072.0,-137421.0
16,16,0.00939,4768.0,0.05536,3072.0,-307405.0
1,24,0.01077,4804.0,0.05559,4096.0,-276275.0
7,20,0.00937,4755.0,0.05372,4096.0,-187187.0
10,8,0.00817,4804.0,0.04846,3072.0,-311091.0
10,4,0.00832,4724.0,0.04957,3072.0,-140493.0
16,12,0.00863,4804.0,0.05054,3072.0,-273408.0
16,24,0.01444,4804.0,0.05637,3072.0,-455066.0
7,4,0.00722,4724.0,0.04797,3072.0,-127386.0
4,4,0.00742,4720.0,0.05059,3072.0,-201933.0
10,12,0.00832,4720.0,0.05032,3072.0,-396902.0
10,24,0.01179,4799.0,0.05708,5120.0,-33178.0
1,4,0.0061,4805.0,0.04756,3072.0,-285901.0
13,12,0.00843,4804.0,0.05272,3072.0,-349389.0
13,24,0.01022,4755.0,0.05086,4096.0,-363520.0
7,12,0.01047,4777.0,0.05264,3072.0,-329318.0
1,8,0.00792,4720.0,0.05448,3072.0,-181862.0
4,12,0.009,4804.0,0.05416,3072.0,-382566.0
1,16,0.01116,4804.0,0.05404,4096.0,-222618.0
4,8,0.00762,4751.0,0.04953,3072.0,-345088.0
1,12,0.01112,4720.0,0.05078,3072.0,-299827.0
4,16,0.00969,4752.0,0.05483,3072.0,-301261.0
7,8,0.00692,4746.0,0.0487,3072.0,-311706.0
7,16,0.00889,4804.0,0.05341,4096.0,-244531.0
MaxTenuringThreshold,ParallelGCThreads,avgGCPause,avgPromotion,promotionTotal,totalHeapUsedMaxpc,totalHeapUsedMax,totalYoungUsedMax,totalYoungUsedMaxpc,totalTenuredUsedMax
10,20,0.01203,-439501.0,-2197504.0,5.6,1832.0,1828.775,16.9,4747.0
10,16,0.00983,-306176.0,-1530880.0,6.1,1993.0,1990.138,18.4,4773.0
7,24,0.01115,-419430.0,-2097152.0,6.1,1993.0,1990.138,18.4,4724.0
16,8,0.00665,-280576.0,-1402880.0,5.6,1832.0,1828.775,16.9,4720.0
1,20,0.00989,-270541.0,-1352704.0,6.1,1993.0,1990.138,18.4,4800.0
13,20,0.00954,-169574.0,-847872.0,5.6,1832.0,1828.775,16.9,4747.0
16,4,0.00755,-127590.0,-637952.0,6.1,1993.0,1990.138,18.4,4720.0
13,16,0.01032,-445030.0,-2225152.0,5.6,1832.0,1828.775,16.9,4720.0
4,24,0.01006,-216269.0,-1081344.0,5.6,1832.0,1828.775,16.9,4751.0
13,8,0.0078,-338330.0,-1691648.0,6.1,1993.0,1990.138,18.4,4804.0
4,20,0.01106,-366797.0,-1833984.0,6.1,1993.0,1990.138,18.4,4720.0
16,20,0.01081,-365158.0,-1825792.0,6.1,1993.0,1990.138,18.4,4720.0
13,4,0.00627,-137421.0,-687104.0,6.1,1993.0,1990.138,18.4,4752.0
16,16,0.00939,-307405.0,-1537024.0,6.1,1993.0,1990.138,18.4,4768.0
1,24,0.01077,-276275.0,-1381376.0,5.6,1832.0,1828.775,16.9,4804.0
7,20,0.00937,-187187.0,-935936.0,6.1,1993.0,1990.138,18.4,4755.0
10,8,0.00817,-311091.0,-1555456.0,5.6,1832.0,1828.775,16.9,4804.0
10,4,0.00832,-140493.0,-702464.0,5.6,1832.0,1828.775,16.9,4724.0
16,12,0.00863,-273408.0,-1367040.0,6.1,1993.0,1990.138,18.4,4804.0
16,24,0.01444,-455066.0,-2275328.0,6.1,1993.0,1990.138,18.4,4804.0
7,4,0.00722,-127386.0,-636928.0,5.6,1832.0,1828.775,16.9,4724.0
4,4,0.00742,-201933.0,-1009664.0,6.1,1993.0,1990.138,18.4,4720.0
10,12,0.00832,-396902.0,-1984512.0,6.1,1993.0,1990.138,18.4,4720.0
10,24,0.01179,-33178.0,-165888.0,6.1,1993.0,1990.138,18.4,4799.0
1,4,0.0061,-285901.0,-1429504.0,6.1,1993.0,1990.138,18.4,4805.0
13,12,0.00843,-349389.0,-1746944.0,6.1,1993.0,1990.138,18.4,4804.0
13,24,0.01022,-363520.0,-1817600.0,6.1,1993.0,1990.138,18.4,4755.0
7,12,0.01047,-329318.0,-1646592.0,5.6,1832.0,1828.775,16.9,4777.0
1,8,0.00792,-181862.0,-909312.0,6.1,1993.0,1990.138,18.4,4720.0
4,12,0.009,-382566.0,-1912832.0,6.1,1993.0,1990.138,18.4,4804.0
1,16,0.01116,-222618.0,-1113088.0,6.1,1993.0,1990.138,18.4,4804.0
4,8,0.00762,-345088.0,-1725440.0,5.6,1832.0,1828.775,16.9,4751.0
1,12,0.01112,-299827.0,-1499136.0,6.1,1993.0,1990.138,18.4,4720.0
4,16,0.00969,-301261.0,-1506304.0,6.1,1993.0,1990.138,18.4,4752.0
7,8,0.00692,-311706.0,-1558528.0,6.1,1993.0,1990.138,18.4,4746.0
7,16,0.00889,-244531.0,-1222656.0,6.1,1993.0,1990.138,18.4,4804.0
74 changes: 37 additions & 37 deletions datasets/ext_kafka_real_saved_states.csv
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
MaxTenuringThreshold,ParallelGCThreads,avgGCPause,totalTenuredUsedMax,avgPause,freedMemoryByFullGC,avgPromotion
10,12,0.02917,166.521,0.16942,27.0,18.142
10,8,0.0274,166.475,0.15709,18.0,17.913
7,20,0.03037,166.423,0.17345,29.0,18.347
10,4,0.03058,166.504,0.15914,18.0,18.038
10,24,0.03323,166.503,0.1763,29.0,18.145
13,12,0.03009,166.436,0.16704,27.0,18.063
4,20,0.03266,166.521,0.18241,30.0,18.378
13,8,0.02878,166.459,0.17115,27.0,18.194
13,4,0.03171,166.444,0.16729,25.0,18.165
1,24,0.03256,166.475,0.17121,22.0,18.286
13,24,0.03018,166.503,0.16624,22.0,18.562
16,12,0.03385,166.444,0.16493,18.0,18.156
1,20,0.02915,166.499,0.16858,21.0,18.374
16,8,0.03115,166.475,0.18118,26.0,18.029
16,4,0.02861,166.416,0.1614,18.0,18.28
4,24,0.02787,166.419,0.17396,29.0,18.305
16,24,0.03204,166.496,0.17775,30.0,18.334
7,24,0.03193,166.414,0.17381,21.0,18.391
16,20,0.03056,166.502,0.18729,30.0,18.463
1,4,0.02897,166.486,0.17083,26.0,18.046
16,16,0.03027,166.449,0.17019,20.0,18.141
10,20,0.03255,166.437,0.17825,30.0,18.379
7,4,0.02989,166.469,0.15961,18.0,18.215
10,16,0.02917,166.51,0.16492,21.0,18.467
13,20,0.03337,166.47,0.17083,21.0,18.609
4,4,0.02805,166.516,0.17052,26.0,18.133
13,16,0.0307,166.507,0.17482,29.0,18.334
7,16,0.02677,166.472,0.1669,20.0,18.06
4,8,0.02824,166.421,0.1606,18.0,18.166
1,12,0.02957,166.419,0.17192,27.0,18.065
4,16,0.02815,166.424,0.17159,21.0,18.409
7,8,0.02848,166.513,0.1737,28.0,18.287
4,12,0.02978,166.51,0.16125,20.0,18.303
1,16,0.02857,166.478,0.16242,21.0,18.551
7,12,0.03281,166.507,0.1767,29.0,18.423
1,8,0.02813,166.473,0.16467,28.0,18.626
MaxTenuringThreshold,ParallelGCThreads,avgGCPause,avgPromotion,promotionTotal,totalHeapUsedMaxpc,totalHeapUsedMax,totalYoungUsedMax,totalYoungUsedMaxpc,totalTenuredUsedMax
10,12,0.02917,18.142,126.997,21.7,7096.0,6942.777,64.0,166.521
10,8,0.0274,17.913,125.389,22.6,7382.0,7228.855,66.7,166.475
7,20,0.03037,18.347,128.429,21.8,7133.0,6980.122,64.4,166.423
10,4,0.03058,18.038,126.269,22.7,7429.0,7276.107,67.1,166.504
10,24,0.03323,18.145,127.018,22.7,7428.0,7274.998,67.1,166.503
13,12,0.03009,18.063,126.444,21.3,6948.0,6795.241,62.7,166.436
4,20,0.03266,18.378,128.643,20.9,6826.0,6673.153,61.6,166.521
13,8,0.02878,18.194,127.359,21.5,7036.0,6882.947,63.5,166.459
13,4,0.03171,18.165,127.153,22.6,7385.0,7232.28,66.7,166.444
1,24,0.03256,18.286,128.003,22.0,7198.0,7044.833,65.0,166.475
13,24,0.03018,18.562,129.931,22.7,7417.0,7264.747,67.0,166.503
16,12,0.03385,18.156,127.093,22.6,7392.0,7239.152,66.8,166.444
1,20,0.02915,18.374,128.621,20.6,6746.0,6592.859,60.8,166.499
16,8,0.03115,18.029,126.202,22.6,7395.0,7241.959,66.8,166.475
16,4,0.02861,18.28,127.962,22.3,7289.0,7136.673,65.8,166.416
4,24,0.02787,18.305,128.135,21.8,7117.0,6964.479,64.2,166.419
16,24,0.03204,18.334,128.338,21.8,7113.0,6959.995,64.2,166.496
7,24,0.03193,18.391,128.736,22.6,7400.0,7247.415,66.9,166.414
16,20,0.03056,18.463,129.239,22.5,7368.0,7215.266,66.6,166.502
1,4,0.02897,18.046,126.321,22.1,7216.0,7062.881,65.2,166.486
16,16,0.03027,18.141,126.988,22.0,7180.0,7026.876,64.8,166.449
10,20,0.03255,18.379,128.654,21.6,7076.0,6923.376,63.9,166.437
7,4,0.02989,18.215,127.503,23.0,7502.0,7349.542,67.8,166.469
10,16,0.02917,18.467,129.266,22.0,7190.0,7037.095,64.9,166.51
13,20,0.03337,18.609,130.26,21.9,7149.0,6996.392,64.5,166.47
4,4,0.02805,18.133,126.928,22.1,7222.0,7068.982,65.2,166.516
13,16,0.0307,18.334,128.336,22.4,7337.0,7184.147,66.3,166.507
7,16,0.02677,18.06,126.418,22.6,7400.0,7246.817,66.9,166.472
4,8,0.02824,18.166,127.165,22.7,7419.0,7266.142,67.0,166.421
1,12,0.02957,18.065,126.453,22.7,7428.0,7275.169,67.1,166.419
4,16,0.02815,18.409,128.862,22.4,7309.0,7156.656,66.0,166.424
7,8,0.02848,18.287,128.008,21.6,7049.0,6895.873,63.6,166.513
4,12,0.02978,18.303,128.119,22.4,7333.0,7180.376,66.2,166.51
1,16,0.02857,18.551,129.854,22.4,7333.0,7180.651,66.2,166.478
7,12,0.03281,18.423,128.963,22.4,7328.0,7175.531,66.2,166.507
1,8,0.02813,18.626,130.38,22.3,7279.0,7126.767,65.7,166.473
15 changes: 8 additions & 7 deletions env/PyEnvironmentsTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ def __init__(
)

self._observation_spec = array_spec.BoundedArraySpec(
shape=(self._num_variables + 1 + 4,), # 1 goal, 4 external vars
shape=(self._num_variables + 1 + 7,), # 1 goal, {X} external vars
dtype=np.float32,
# minimum=self._flags_min_values,
# maximum=self._flags_max_values,
minimum=[1, 4, 0.0, 0.0, 0.0, 0.0, 0.0],
maximum=[16, 24, 3.0, 200.0, 5.0, 30.0, 30.0],
# minimum=[1, 4, 0.0, 0.0, 0.0, 0.0, 0.0],
# maximum=[16, 24, 3.0, 200.0, 5.0, 30.0, 30.0],
name='observation'
)

Expand Down Expand Up @@ -182,7 +182,6 @@ def _step(self, action: types.NestedArray):
# Ignore the current action and start a new episode.
logging.debug(f"[EPISODE ENDED] {self._get_info()}, target: {self._state[self._goal_idx]}")
return self.reset()

# Apply an action based on the mapping: decrease/increase <flag.value>.
self._action_mapping.get(int(action))()

Expand All @@ -191,7 +190,7 @@ def _step(self, action: types.NestedArray):

# Check if the current JVM configuration is cached.
# Add `state` to cache if new.
self._state = self._state_merging(self._state[:self._num_variables])
self._state = copy.deepcopy(self._state_merging(self._state[:self._num_variables]))

# Termination criteria
if self._state[self._goal_idx] <= self._default_state[self._goal_idx] * 0.04:
Expand All @@ -203,6 +202,8 @@ def _step(self, action: types.NestedArray):
lower_is_better=True,
beta=0.0) # ! No intrinsic reward

logging.debug(f"[STEP] {self._get_info()}, target: {self._state[self._goal_idx]}")

if self._episode_ended:
return ts.termination(
np.array(self._state, dtype=np.float32), reward=2.0)
Expand Down Expand Up @@ -438,8 +439,8 @@ def _get_reward(
if lower_is_better:
coef = -1

current_goal = current_state[1]
previous_goal = previous_state[1]
current_goal = current_state[self._goal_idx]
previous_goal = previous_state[self._goal_idx]

if coef * current_goal <= previous_goal:
for i in self._perf_states.keys():
Expand Down

0 comments on commit f2ec575

Please sign in to comment.