Added 3 Oracle hidden knobs

This commit is contained in:
dvanaken 2019-12-09 21:32:45 +01:00 committed by Dana Van Aken
parent 02c40f5cea
commit b0cddcc289
4 changed files with 207 additions and 0 deletions

View File

@ -36,6 +36,41 @@ from operator import itemgetter
# cursor_sharing # cursor_sharing
EXTRA_KNOBS = {
'_pga_max_size': {
'default': 200000000,
},
'_smm_max_size': {
'default': 100000,
},
'_smm_px_max_size': {
'default': 300000,
},
}
def add_fields(fields_list, version):
for name, custom_fields in EXTRA_KNOBS.items():
new_field = dict(
name=('global.' + name).lower(),
scope='global',
dbms=version,
category='',
enumvals=None,
context='',
unit=3, # other
tunable=False,
description='',
summary='',
vartype=2, # integer
minval=0,
maxval=2000000000,
default=500000,
)
new_field.update(custom_fields)
fields_list.append(new_field)
def set_field(fields): def set_field(fields):
if fields['name'].upper() == 'MEMORY_TARGET': if fields['name'].upper() == 'MEMORY_TARGET':
fields['tunable'] = False fields['tunable'] = False
@ -202,6 +237,7 @@ COLNAMES = ("NAME", "TYPE", "DEFAULT_VALUE", "DESCRIPTION")
def process_version(version, delim=','): def process_version(version, delim=','):
fields_list = [] fields_list = []
add_fields(fields_list, version)
with open('oracle{}.csv'.format(version), 'r', newline='') as f: with open('oracle{}.csv'.format(version), 'r', newline='') as f:
reader = csv.reader(f, delimiter=delim) reader = csv.reader(f, delimiter=delim)
header = [h.upper() for h in next(reader)] header = [h.upper() for h in next(reader)]

View File

@ -1,4 +1,61 @@
[ [
{
"model": "website.KnobCatalog",
"fields": {
"name": "global._pga_max_size",
"scope": "global",
"dbms": 121,
"category": "",
"enumvals": null,
"context": "",
"unit": 3,
"tunable": false,
"description": "",
"summary": "",
"vartype": 2,
"minval": 0,
"maxval": 2000000000,
"default": 200000000
}
},
{
"model": "website.KnobCatalog",
"fields": {
"name": "global._smm_max_size",
"scope": "global",
"dbms": 121,
"category": "",
"enumvals": null,
"context": "",
"unit": 3,
"tunable": false,
"description": "",
"summary": "",
"vartype": 2,
"minval": 0,
"maxval": 2000000000,
"default": 100000
}
},
{
"model": "website.KnobCatalog",
"fields": {
"name": "global._smm_px_max_size",
"scope": "global",
"dbms": 121,
"category": "",
"enumvals": null,
"context": "",
"unit": 3,
"tunable": false,
"description": "",
"summary": "",
"vartype": 2,
"minval": 0,
"maxval": 2000000000,
"default": 300000
}
},
{ {
"model": "website.KnobCatalog", "model": "website.KnobCatalog",
"fields": { "fields": {

View File

@ -1,4 +1,61 @@
[ [
{
"model": "website.KnobCatalog",
"fields": {
"name": "global._pga_max_size",
"scope": "global",
"dbms": 12,
"category": "",
"enumvals": null,
"context": "",
"unit": 3,
"tunable": false,
"description": "",
"summary": "",
"vartype": 2,
"minval": 0,
"maxval": 2000000000,
"default": 200000000
}
},
{
"model": "website.KnobCatalog",
"fields": {
"name": "global._smm_max_size",
"scope": "global",
"dbms": 12,
"category": "",
"enumvals": null,
"context": "",
"unit": 3,
"tunable": false,
"description": "",
"summary": "",
"vartype": 2,
"minval": 0,
"maxval": 2000000000,
"default": 100000
}
},
{
"model": "website.KnobCatalog",
"fields": {
"name": "global._smm_px_max_size",
"scope": "global",
"dbms": 12,
"category": "",
"enumvals": null,
"context": "",
"unit": 3,
"tunable": false,
"description": "",
"summary": "",
"vartype": 2,
"minval": 0,
"maxval": 2000000000,
"default": 300000
}
},
{ {
"model": "website.KnobCatalog", "model": "website.KnobCatalog",
"fields": { "fields": {

View File

@ -1,4 +1,61 @@
[ [
{
"model": "website.KnobCatalog",
"fields": {
"name": "global._pga_max_size",
"scope": "global",
"dbms": 19,
"category": "",
"enumvals": null,
"context": "",
"unit": 3,
"tunable": false,
"description": "",
"summary": "",
"vartype": 2,
"minval": 0,
"maxval": 2000000000,
"default": 200000000
}
},
{
"model": "website.KnobCatalog",
"fields": {
"name": "global._smm_max_size",
"scope": "global",
"dbms": 19,
"category": "",
"enumvals": null,
"context": "",
"unit": 3,
"tunable": false,
"description": "",
"summary": "",
"vartype": 2,
"minval": 0,
"maxval": 2000000000,
"default": 100000
}
},
{
"model": "website.KnobCatalog",
"fields": {
"name": "global._smm_px_max_size",
"scope": "global",
"dbms": 19,
"category": "",
"enumvals": null,
"context": "",
"unit": 3,
"tunable": false,
"description": "",
"summary": "",
"vartype": 2,
"minval": 0,
"maxval": 2000000000,
"default": 300000
}
},
{ {
"model": "website.KnobCatalog", "model": "website.KnobCatalog",
"fields": { "fields": {