support oracle v12 in ottertune server
This commit is contained in:
committed by
Dana Van Aken
parent
494b23678e
commit
8743c0c2b1
33
client/driver/oracleScripts/oracle_pfile_example.ora
Executable file
33
client/driver/oracleScripts/oracle_pfile_example.ora
Executable file
@@ -0,0 +1,33 @@
|
|||||||
|
ORCL.__data_transfer_cache_size=0
|
||||||
|
ORCL.__db_cache_size=16039018496
|
||||||
|
ORCL.__inmemory_ext_roarea=0
|
||||||
|
ORCL.__inmemory_ext_rwarea=0
|
||||||
|
ORCL.__java_pool_size=268435456
|
||||||
|
ORCL.__large_pool_size=1140850688
|
||||||
|
ORCL.__oracle_base='/opt/oracle'#ORACLE_BASE set from environment
|
||||||
|
ORCL.__pga_aggregate_target=6777995264
|
||||||
|
ORCL.__sga_target=20266876928
|
||||||
|
ORCL.__shared_io_pool_size=536870912
|
||||||
|
ORCL.__shared_pool_size=2214592512
|
||||||
|
ORCL.__streams_pool_size=0
|
||||||
|
*.audit_file_dest='/opt/oracle/admin/ORCL/adump'
|
||||||
|
*.audit_sys_operations=false
|
||||||
|
*.audit_trail='none'
|
||||||
|
*.compatible='12.2.0'
|
||||||
|
*.control_files='/opt/oracle/oradata/ORCL/control01.ctl'
|
||||||
|
*.db_block_size=8192
|
||||||
|
*.db_name='ORCL'
|
||||||
|
*.diagnostic_dest='/opt/oracle'
|
||||||
|
*.dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'
|
||||||
|
*.enable_pluggable_database=true
|
||||||
|
*.nls_language='AMERICAN'
|
||||||
|
*.nls_territory='AMERICA'
|
||||||
|
*.open_cursors=400
|
||||||
|
*.pga_aggregate_target=6434m
|
||||||
|
*.processes=2560
|
||||||
|
*.remote_login_passwordfile='EXCLUSIVE'
|
||||||
|
*.sga_target=19302m
|
||||||
|
*.undo_tablespace='UNDOTBS1'
|
||||||
|
|
||||||
|
# configurations recommended by ottertune:
|
||||||
|
*.log_buffer = 817730432
|
||||||
@@ -158,7 +158,7 @@ def set_field(fields):
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
final_metrics = []
|
final_metrics = []
|
||||||
with open('oracle.txt', 'r') as f:
|
with open('oracle12.txt', 'r') as f:
|
||||||
num = 0
|
num = 0
|
||||||
|
|
||||||
lines = f.readlines()
|
lines = f.readlines()
|
||||||
@@ -186,7 +186,7 @@ def main():
|
|||||||
elif num == 2:
|
elif num == 2:
|
||||||
fields['summary'] = line
|
fields['summary'] = line
|
||||||
fields['scope'] = 'global'
|
fields['scope'] = 'global'
|
||||||
fields['dbms'] = 18 # oracle
|
fields['dbms'] = 12 # oracle
|
||||||
fields['category'] = ''
|
fields['category'] = ''
|
||||||
fields['enumvals'] = None
|
fields['enumvals'] = None
|
||||||
fields['context'] = ''
|
fields['context'] = ''
|
||||||
@@ -201,9 +201,9 @@ def main():
|
|||||||
entry['fields'] = fields
|
entry['fields'] = fields
|
||||||
final_metrics.append(entry)
|
final_metrics.append(entry)
|
||||||
num = (num + 1) % 3
|
num = (num + 1) % 3
|
||||||
with open('oracle_knobs.json', 'w') as f:
|
with open('oracle-12_knobs.json', 'w') as f:
|
||||||
json.dump(final_metrics, f, indent=4)
|
json.dump(final_metrics, f, indent=4)
|
||||||
shutil.copy("oracle_knobs.json", "../../../../website/fixtures/oracle_knobs.json")
|
shutil.copy("oracle-12_knobs.json", "../../../../website/fixtures/oracle-12_knobs.json")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -9,7 +9,7 @@ import shutil
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
final_metrics = []
|
final_metrics = []
|
||||||
with open('oracle.txt', 'r') as f:
|
with open('oracle12.txt', 'r') as f:
|
||||||
odd = 0
|
odd = 0
|
||||||
entry = {}
|
entry = {}
|
||||||
fields = {}
|
fields = {}
|
||||||
@@ -31,12 +31,12 @@ def main():
|
|||||||
fields['metric_type'] = 3 # stat
|
fields['metric_type'] = 3 # stat
|
||||||
if fields['name'] == "global.user commits":
|
if fields['name'] == "global.user commits":
|
||||||
fields['metric_type'] = 1 # counter
|
fields['metric_type'] = 1 # counter
|
||||||
fields['dbms'] = 18 # oracle
|
fields['dbms'] = 12 # oracle
|
||||||
entry['fields'] = fields
|
entry['fields'] = fields
|
||||||
final_metrics.append(entry)
|
final_metrics.append(entry)
|
||||||
with open('oracle_metrics.json', 'w') as f:
|
with open('oracle-12_metrics.json', 'w') as f:
|
||||||
json.dump(final_metrics, f, indent=4)
|
json.dump(final_metrics, f, indent=4)
|
||||||
shutil.copy('oracle_metrics.json', '../../../../website/fixtures/oracle_metrics.json')
|
shutil.copy('oracle-12_metrics.json', '../../../../website/fixtures/oracle-12_metrics.json')
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,51 +1,59 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"model":"website.DBMSCatalog",
|
"model":"website.DBMSCatalog",
|
||||||
"pk":2,
|
"pk":2,
|
||||||
"fields":{
|
"fields":{
|
||||||
"type":2,
|
"type":2,
|
||||||
"version":"9.2"
|
"version":"9.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"model":"website.DBMSCatalog",
|
"model":"website.DBMSCatalog",
|
||||||
"pk":3,
|
"pk":3,
|
||||||
"fields":{
|
"fields":{
|
||||||
"type":2,
|
"type":2,
|
||||||
"version":"9.3"
|
"version":"9.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"model":"website.DBMSCatalog",
|
"model":"website.DBMSCatalog",
|
||||||
"pk":4,
|
"pk":4,
|
||||||
"fields":{
|
"fields":{
|
||||||
"type":2,
|
"type":2,
|
||||||
"version":"9.4"
|
"version":"9.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"model":"website.DBMSCatalog",
|
"model":"website.DBMSCatalog",
|
||||||
"pk":1,
|
"pk":1,
|
||||||
"fields":{
|
"fields":{
|
||||||
"type":2,
|
"type":2,
|
||||||
"version":"9.6"
|
"version":"9.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"model":"website.DBMSCatalog",
|
"model":"website.DBMSCatalog",
|
||||||
"pk":9,
|
"pk":9,
|
||||||
"fields":{
|
"fields":{
|
||||||
"type":9,
|
"type":9,
|
||||||
"version":"5.6"
|
"version":"5.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"model":"website.DBMSCatalog",
|
"model":"website.DBMSCatalog",
|
||||||
"pk":18,
|
"pk":12,
|
||||||
"fields":{
|
"fields":{
|
||||||
"type":4,
|
"type":4,
|
||||||
"version":"19.0.0.0.0"
|
"version":"12.2.0.1.0"
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
{
|
||||||
]
|
"model":"website.DBMSCatalog",
|
||||||
|
"pk":19,
|
||||||
|
"fields":{
|
||||||
|
"type":4,
|
||||||
|
"version":"19.0.0.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
]
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
8229
server/website/website/fixtures/oracle-19_knobs.json
Normal file
8229
server/website/website/fixtures/oracle-19_knobs.json
Normal file
File diff suppressed because it is too large
Load Diff
22123
server/website/website/fixtures/oracle-19_metrics.json
Normal file
22123
server/website/website/fixtures/oracle-19_metrics.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -19,8 +19,10 @@ def load_initial_data(apps, schema_editor):
|
|||||||
"postgres-94_metrics.json",
|
"postgres-94_metrics.json",
|
||||||
"myrocks-5.6_knobs.json",
|
"myrocks-5.6_knobs.json",
|
||||||
"myrocks-5.6_metrics.json",
|
"myrocks-5.6_metrics.json",
|
||||||
"oracle_knobs.json",
|
"oracle-12_knobs.json",
|
||||||
"oracle_metrics.json"
|
"oracle-12_metrics.json",
|
||||||
|
"oracle-19_knobs.json",
|
||||||
|
"oracle-19_metrics.json",
|
||||||
]
|
]
|
||||||
for fixture in initial_data_fixtures:
|
for fixture in initial_data_fixtures:
|
||||||
call_command("loaddata", fixture, app_label="website")
|
call_command("loaddata", fixture, app_label="website")
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ class ConfigurationRecommendation(UpdateTask): # pylint: disable=abstract-metho
|
|||||||
def on_success(self, retval, task_id, args, kwargs):
|
def on_success(self, retval, task_id, args, kwargs):
|
||||||
super(ConfigurationRecommendation, self).on_success(retval, task_id, args, kwargs)
|
super(ConfigurationRecommendation, self).on_success(retval, task_id, args, kwargs)
|
||||||
|
|
||||||
result_id = args[0][0]['newest_result_id']
|
result_id = retval['result_id']
|
||||||
result = Result.objects.get(pk=result_id)
|
result = Result.objects.get(pk=result_id)
|
||||||
|
|
||||||
# Replace result with formatted result
|
# Replace result with formatted result
|
||||||
@@ -324,6 +324,7 @@ def configuration_recommendation_ddpg(result_info): # pylint: disable=invalid-n
|
|||||||
conf_map = {k: knob_data[i] for i, k in enumerate(knob_labels)}
|
conf_map = {k: knob_data[i] for i, k in enumerate(knob_labels)}
|
||||||
conf_map_res = {}
|
conf_map_res = {}
|
||||||
conf_map_res['status'] = 'good'
|
conf_map_res['status'] = 'good'
|
||||||
|
conf_map_res['result_id'] = result_id
|
||||||
conf_map_res['recommendation'] = conf_map
|
conf_map_res['recommendation'] = conf_map
|
||||||
conf_map_res['info'] = 'INFO: ddpg'
|
conf_map_res['info'] = 'INFO: ddpg'
|
||||||
for k in knob_labels:
|
for k in knob_labels:
|
||||||
@@ -340,6 +341,7 @@ def configuration_recommendation(recommendation_input):
|
|||||||
if target_data['bad'] is True:
|
if target_data['bad'] is True:
|
||||||
target_data_res = {}
|
target_data_res = {}
|
||||||
target_data_res['status'] = 'bad'
|
target_data_res['status'] = 'bad'
|
||||||
|
target_data_res['result_id'] = target_data['newest_result_id']
|
||||||
target_data_res['info'] = 'WARNING: no training data, the config is generated randomly'
|
target_data_res['info'] = 'WARNING: no training data, the config is generated randomly'
|
||||||
target_data_res['recommendation'] = target_data['config_recommend']
|
target_data_res['recommendation'] = target_data['config_recommend']
|
||||||
return target_data_res
|
return target_data_res
|
||||||
@@ -595,6 +597,7 @@ def configuration_recommendation(recommendation_input):
|
|||||||
conf_map = {k: best_config[i] for i, k in enumerate(X_columnlabels)}
|
conf_map = {k: best_config[i] for i, k in enumerate(X_columnlabels)}
|
||||||
conf_map_res = {}
|
conf_map_res = {}
|
||||||
conf_map_res['status'] = 'good'
|
conf_map_res['status'] = 'good'
|
||||||
|
conf_map_res['result_id'] = target_data['newest_result_id']
|
||||||
conf_map_res['recommendation'] = conf_map
|
conf_map_res['recommendation'] = conf_map
|
||||||
conf_map_res['info'] = 'INFO: training data size is {}'.format(X_scaled.shape[0])
|
conf_map_res['info'] = 'INFO: training data size is {}'.format(X_scaled.shape[0])
|
||||||
return conf_map_res
|
return conf_map_res
|
||||||
|
|||||||
Reference in New Issue
Block a user