Updated oracle tunable knobs

This commit is contained in:
dvanaken 2019-11-08 06:23:51 -05:00 committed by Dana Van Aken
parent a5cbb50521
commit a99cf72c6c
5 changed files with 186 additions and 101 deletions

View File

@ -25,6 +25,12 @@ from operator import itemgetter
# ENUM = 5
# TIMESTAMP = 6
# KnobResourceType
# MEMORY = 1
# CPU = 2
# STORAGE = 3
# OTHER = 4
# miss:
# OPTIMIZER_MODE
# cursor_sharing
@ -36,94 +42,117 @@ def set_field(fields):
fields['minval'] = 0
fields['maxval'] = 33000000000 # 33G
fields['default'] = 0
fields['resource'] = 1
if fields['name'].upper() == 'MEMORY_MAX_TARGET':
fields['tunable'] = False
fields['minval'] = 0
fields['maxval'] = 33000000000 # 33G
fields['default'] = 0
fields['resource'] = 1
if fields['name'].upper() == 'SGA_TARGET':
fields['tunable'] = False
fields['minval'] = 0
fields['maxval'] = 33000000000 # 33G
fields['default'] = 0
fields['resource'] = 1
if fields['name'].upper() == 'SGA_MAX_SIZE':
fields['tunable'] = False
fields['minval'] = 0
fields['maxval'] = 33000000000 # 33G
fields['default'] = 0
fields['resource'] = 1
if fields['name'].upper() == 'DB_CACHE_SIZE':
fields['tunable'] = True
fields['minval'] = 0
fields['maxval'] = 25000000000 # 24G
fields['default'] = 4000000000 # 4G
fields['resource'] = 1
if fields['name'].upper() == 'SHARED_POOL_SIZE':
fields['tunable'] = True
fields['minval'] = 0
fields['maxval'] = 4000000000 # 4G
fields['default'] = 1000000000 # 1G
fields['resource'] = 1
if fields['name'].upper() == 'SHARED_POOL_RESERVED_SIZE':
fields['tunable'] = True
fields['minval'] = 0
fields['maxval'] = 4000000000 # 4G
fields['default'] = 1000000000 # 1G
fields['resource'] = 1
if fields['name'].upper() == 'SHARED_IO_POOL_SIZE':
fields['tunable'] = False
fields['minval'] = 0
fields['maxval'] = 4000000000 # 4G
fields['default'] = 1000000000 # 1G
fields['resource'] = 1
if fields['name'].upper() == 'STREAMS_POOL_SIZE':
fields['tunable'] = True
fields['minval'] = 0
fields['maxval'] = 4000000000 # 4G
fields['default'] = 20000000 # 20M
fields['resource'] = 1
if fields['name'].upper() == 'LOG_BUFFER':
fields['tunable'] = True
fields['minval'] = 0
fields['maxval'] = 2000000000 # 2GB
fields['default'] = 50000000 # 50M
fields['resource'] = 1
if fields['name'].upper() == 'DB_KEEP_CACHE_SIZE':
fields['tunable'] = False
fields['minval'] = 0
fields['maxval'] = 2000000000 # 2GB
fields['default'] = 500000000 # 500M
fields['resource'] = 1
if fields['name'].upper() == 'DB_RECYCLE_CACHE_SIZE':
fields['tunable'] = False
fields['minval'] = 0
fields['maxval'] = 2000000000 # 2GB
fields['default'] = 500000000 # 500M
fields['resource'] = 1
if fields['name'].upper() == 'LARGE_POOL_SIZE':
fields['tunable'] = True
fields['minval'] = 0
fields['maxval'] = 2000000000 # 2GB
fields['default'] = 500000000 # 500M
fields['resource'] = 1
if fields['name'].upper() == 'PGA_AGGREGATE_TARGET':
fields['tunable'] = False
fields['tunable'] = True
fields['minval'] = 0
fields['maxval'] = 33000000000 # 33G
fields['default'] = 0
fields['resource'] = 1
if fields['name'].lower() == 'bitmap_merge_area_size':
fields['tunable'] = True
fields['minval'] = 0
fields['maxval'] = 5000000000 # 3G
fields['default'] = 0
fields['resource'] = 1
if fields['name'].lower() == 'create_bitmap_area_size':
fields['tunable'] = True
fields['minval'] = 0
fields['maxval'] = 5000000000 # 3G
fields['default'] = 0
fields['resource'] = 1
if fields['name'].lower() == 'hash_area_size':
fields['tunable'] = True
fields['minval'] = 0
fields['maxval'] = 3000000000 # 3G
fields['default'] = 0
fields['resource'] = 1
if fields['name'].lower() == 'sort_area_size':
fields['tunable'] = True
fields['minval'] = 0
fields['maxval'] = 3000000000 # 3G
fields['default'] = 0
fields['resource'] = 1
if fields['name'].upper() == 'OPEN_CURSORS':
fields['tunable'] = False
fields['tunable'] = True
fields['minval'] = 200
fields['maxval'] = 400
fields['default'] = 300
if fields['name'].upper() == 'DB_FILE_MULTIBLOCK_READ_COUNT':
fields['tunable'] = False
fields['minval'] = 64
fields['tunable'] = True
fields['minval'] = 20
fields['maxval'] = 256
fields['default'] = 128
if fields['name'].upper() == 'optimizer_index_cost_adj'.upper():
@ -151,6 +180,16 @@ def set_field(fields):
fields['minval'] = None
fields['maxval'] = None
fields['default'] = False
if fields['name'].lower() == 'optimizer_dynamic_sampling':
fields['tunable'] = True
fields['minval'] = 0
fields['maxval'] = 11
fields['default'] = 2
if fields['name'].lower() == 'optimizer_adaptive_plans':
fields['tunable'] = True
fields['minval'] = None
fields['maxval'] = None
fields['default'] = True
if fields['name'].upper() == 'DISK_ASYNCH_IO':
fields['tunable'] = True
fields['vartype'] = 5

View File

@ -15,12 +15,7 @@ class DBTime(BaseTargetObjective):
improvement=LESS_IS_BETTER)
def compute(self, metrics, observation_time):
metric_names = (
'global.sys_time_model.db cpu',
'global.system_event.cursor: pin s wait on x.time_waited',
'global.sysstat.user i/o wait time')
db_time = float(sum(metrics[mname] for mname in metric_names)) / observation_time
return db_time
return float('global.sys_time_model.db time')
target_objective_list = tuple((DBMSType.ORACLE, target_obj) for target_obj in [ # pylint: disable=invalid-name

View File

@ -300,7 +300,8 @@
"maxval": 5000000000,
"vartype": 2,
"default": 0,
"summary": "maximum memory allow for BITMAP MERGE"
"summary": "maximum memory allow for BITMAP MERGE",
"resource": 1
}
},
{
@ -851,7 +852,8 @@
"maxval": 5000000000,
"vartype": 2,
"default": 0,
"summary": "size of create bitmap buffer for bitmap index"
"summary": "size of create bitmap buffer for bitmap index",
"resource": 1
}
},
{
@ -1155,7 +1157,8 @@
"maxval": 25000000000,
"vartype": 2,
"default": 4000000000,
"summary": "Size of DEFAULT buffer pool for standard block size buffers"
"summary": "Size of DEFAULT buffer pool for standard block size buffers",
"resource": 1
}
},
{
@ -1301,9 +1304,9 @@
"enumvals": null,
"context": "",
"unit": 3,
"tunable": false,
"tunable": true,
"description": "",
"minval": 64,
"minval": 20,
"maxval": 256,
"vartype": 2,
"default": 128,
@ -1440,7 +1443,8 @@
"maxval": 2000000000,
"vartype": 2,
"default": 500000000,
"summary": "Size of KEEP buffer pool for standard block size buffers"
"summary": "Size of KEEP buffer pool for standard block size buffers",
"resource": 1
}
},
{
@ -1554,7 +1558,8 @@
"maxval": 2000000000,
"vartype": 2,
"default": 500000000,
"summary": "Size of RECYCLE buffer pool for standard block size buffers"
"summary": "Size of RECYCLE buffer pool for standard block size buffers",
"resource": 1
}
},
{
@ -2276,7 +2281,8 @@
"maxval": 3000000000,
"vartype": 2,
"default": 0,
"summary": "size of in-memory hash work area"
"summary": "size of in-memory hash work area",
"resource": 1
}
},
{
@ -2694,7 +2700,8 @@
"maxval": 2000000000,
"vartype": 2,
"default": 500000000,
"summary": "size in bytes of large pool"
"summary": "size in bytes of large pool",
"resource": 1
}
},
{
@ -4214,7 +4221,8 @@
"maxval": 2000000000,
"vartype": 2,
"default": 50000000,
"summary": "redo circular buffer size"
"summary": "redo circular buffer size",
"resource": 1
}
},
{
@ -4404,7 +4412,8 @@
"maxval": 33000000000,
"vartype": 2,
"default": 0,
"summary": "Max size for Memory Target"
"summary": "Max size for Memory Target",
"resource": 1
}
},
{
@ -4423,7 +4432,8 @@
"maxval": 33000000000,
"vartype": 2,
"default": 0,
"summary": "Target size of Oracle SGA and PGA memory"
"summary": "Target size of Oracle SGA and PGA memory",
"resource": 1
}
},
{
@ -4854,7 +4864,7 @@
"enumvals": null,
"context": "",
"unit": 3,
"tunable": false,
"tunable": true,
"description": "",
"minval": 200,
"maxval": 400,
@ -4968,12 +4978,12 @@
"enumvals": null,
"context": "",
"unit": 3,
"tunable": false,
"tunable": true,
"description": "",
"minval": null,
"maxval": null,
"minval": 0,
"maxval": 11,
"vartype": 2,
"default": "32",
"default": 2,
"summary": "optimizer dynamic sampling"
}
},
@ -5614,13 +5624,14 @@
"enumvals": null,
"context": "",
"unit": 3,
"tunable": false,
"tunable": true,
"description": "",
"minval": 0,
"maxval": 33000000000,
"vartype": 2,
"default": 0,
"summary": "Target size for the aggregate PGA memory consumed by the instance"
"summary": "Target size for the aggregate PGA memory consumed by the instance",
"resource": 1
}
},
{
@ -6437,7 +6448,8 @@
"maxval": 33000000000,
"vartype": 2,
"default": 0,
"summary": "max total SGA size"
"summary": "max total SGA size",
"resource": 1
}
},
{
@ -6456,7 +6468,8 @@
"maxval": 33000000000,
"vartype": 2,
"default": 0,
"summary": "Target size of SGA"
"summary": "Target size of SGA",
"resource": 1
}
},
{
@ -6507,13 +6520,14 @@
"enumvals": null,
"context": "",
"unit": 3,
"tunable": false,
"tunable": true,
"description": "",
"minval": null,
"maxval": null,
"minval": 0,
"maxval": 4000000000,
"vartype": 2,
"default": "3",
"summary": "size in bytes of reserved area of shared pool"
"default": 1000000000,
"summary": "size in bytes of reserved area of shared pool",
"resource": 1
}
},
{
@ -6532,7 +6546,8 @@
"maxval": 4000000000,
"vartype": 2,
"default": 1000000000,
"summary": "size in bytes of shared pool"
"summary": "size in bytes of shared pool",
"resource": 1
}
},
{
@ -6646,7 +6661,8 @@
"maxval": 3000000000,
"vartype": 2,
"default": 0,
"summary": "size of in-memory sort work area"
"summary": "size of in-memory sort work area",
"resource": 1
}
},
{
@ -6836,7 +6852,8 @@
"maxval": 4000000000,
"vartype": 2,
"default": 20000000,
"summary": "size in bytes of the streams pool"
"summary": "size in bytes of the streams pool",
"resource": 1
}
},
{

View File

@ -452,7 +452,8 @@
"maxval": 5000000000,
"vartype": 2,
"default": 0,
"summary": "maximum memory allow for BITMAP MERGE"
"summary": "maximum memory allow for BITMAP MERGE",
"resource": 1
}
},
{
@ -1079,7 +1080,8 @@
"maxval": 5000000000,
"vartype": 2,
"default": 0,
"summary": "size of create bitmap buffer for bitmap index"
"summary": "size of create bitmap buffer for bitmap index",
"resource": 1
}
},
{
@ -1440,7 +1442,8 @@
"maxval": 25000000000,
"vartype": 2,
"default": 4000000000,
"summary": "Size of DEFAULT buffer pool for standard block size buffers"
"summary": "Size of DEFAULT buffer pool for standard block size buffers",
"resource": 1
}
},
{
@ -1586,9 +1589,9 @@
"enumvals": null,
"context": "",
"unit": 3,
"tunable": false,
"tunable": true,
"description": "",
"minval": 64,
"minval": 20,
"maxval": 256,
"vartype": 2,
"default": 128,
@ -1725,7 +1728,8 @@
"maxval": 2000000000,
"vartype": 2,
"default": 500000000,
"summary": "Size of KEEP buffer pool for standard block size buffers"
"summary": "Size of KEEP buffer pool for standard block size buffers",
"resource": 1
}
},
{
@ -1839,7 +1843,8 @@
"maxval": 2000000000,
"vartype": 2,
"default": 500000000,
"summary": "Size of RECYCLE buffer pool for standard block size buffers"
"summary": "Size of RECYCLE buffer pool for standard block size buffers",
"resource": 1
}
},
{
@ -2675,7 +2680,8 @@
"maxval": 3000000000,
"vartype": 2,
"default": 0,
"summary": "size of in-memory hash work area"
"summary": "size of in-memory hash work area",
"resource": 1
}
},
{
@ -3188,7 +3194,8 @@
"maxval": 2000000000,
"vartype": 2,
"default": 500000000,
"summary": "size in bytes of large pool"
"summary": "size in bytes of large pool",
"resource": 1
}
},
{
@ -4708,7 +4715,8 @@
"maxval": 2000000000,
"vartype": 2,
"default": 50000000,
"summary": "redo circular buffer size"
"summary": "redo circular buffer size",
"resource": 1
}
},
{
@ -4993,7 +5001,8 @@
"maxval": 33000000000,
"vartype": 2,
"default": 0,
"summary": "Max size for Memory Target"
"summary": "Max size for Memory Target",
"resource": 1
}
},
{
@ -5012,7 +5021,8 @@
"maxval": 33000000000,
"vartype": 2,
"default": 0,
"summary": "Target size of Oracle SGA and PGA memory"
"summary": "Target size of Oracle SGA and PGA memory",
"resource": 1
}
},
{
@ -5481,7 +5491,7 @@
"enumvals": null,
"context": "",
"unit": 3,
"tunable": false,
"tunable": true,
"description": "",
"minval": 200,
"maxval": 400,
@ -5538,12 +5548,12 @@
"enumvals": null,
"context": "",
"unit": 3,
"tunable": false,
"tunable": true,
"description": "",
"minval": null,
"maxval": null,
"vartype": 4,
"default": "TRUE",
"default": true,
"summary": "controls all types of adaptive plans"
}
},
@ -5614,12 +5624,12 @@
"enumvals": null,
"context": "",
"unit": 3,
"tunable": false,
"tunable": true,
"description": "",
"minval": null,
"maxval": null,
"minval": 0,
"maxval": 11,
"vartype": 2,
"default": "2",
"default": 2,
"summary": "optimizer dynamic sampling"
}
},
@ -6184,13 +6194,14 @@
"enumvals": null,
"context": "",
"unit": 3,
"tunable": false,
"tunable": true,
"description": "",
"minval": 0,
"maxval": 33000000000,
"vartype": 2,
"default": 0,
"summary": "Target size for the aggregate PGA memory consumed by the instance"
"summary": "Target size for the aggregate PGA memory consumed by the instance",
"resource": 1
}
},
{
@ -7045,7 +7056,8 @@
"maxval": 33000000000,
"vartype": 2,
"default": 0,
"summary": "max total SGA size"
"summary": "max total SGA size",
"resource": 1
}
},
{
@ -7083,7 +7095,8 @@
"maxval": 33000000000,
"vartype": 2,
"default": 0,
"summary": "Target size of SGA"
"summary": "Target size of SGA",
"resource": 1
}
},
{
@ -7134,13 +7147,14 @@
"enumvals": null,
"context": "",
"unit": 3,
"tunable": false,
"tunable": true,
"description": "",
"minval": null,
"maxval": null,
"minval": 0,
"maxval": 4000000000,
"vartype": 2,
"default": "0",
"summary": "size in bytes of reserved area of shared pool"
"default": 1000000000,
"summary": "size in bytes of reserved area of shared pool",
"resource": 1
}
},
{
@ -7159,7 +7173,8 @@
"maxval": 4000000000,
"vartype": 2,
"default": 1000000000,
"summary": "size in bytes of shared pool"
"summary": "size in bytes of shared pool",
"resource": 1
}
},
{
@ -7292,7 +7307,8 @@
"maxval": 3000000000,
"vartype": 2,
"default": 0,
"summary": "size of in-memory sort work area"
"summary": "size of in-memory sort work area",
"resource": 1
}
},
{
@ -7501,7 +7517,8 @@
"maxval": 4000000000,
"vartype": 2,
"default": 20000000,
"summary": "size in bytes of the streams pool"
"summary": "size in bytes of the streams pool",
"resource": 1
}
},
{

View File

@ -471,7 +471,8 @@
"maxval": 5000000000,
"vartype": 2,
"default": 0,
"summary": "maximum memory allow for BITMAP MERGE"
"summary": "maximum memory allow for BITMAP MERGE",
"resource": 1
}
},
{
@ -1136,7 +1137,8 @@
"maxval": 5000000000,
"vartype": 2,
"default": 0,
"summary": "size of create bitmap buffer for bitmap index"
"summary": "size of create bitmap buffer for bitmap index",
"resource": 1
}
},
{
@ -1535,7 +1537,8 @@
"maxval": 25000000000,
"vartype": 2,
"default": 4000000000,
"summary": "Size of DEFAULT buffer pool for standard block size buffers"
"summary": "Size of DEFAULT buffer pool for standard block size buffers",
"resource": 1
}
},
{
@ -1681,9 +1684,9 @@
"enumvals": null,
"context": "",
"unit": 3,
"tunable": false,
"tunable": true,
"description": "",
"minval": 64,
"minval": 20,
"maxval": 256,
"vartype": 2,
"default": 128,
@ -1820,7 +1823,8 @@
"maxval": 2000000000,
"vartype": 2,
"default": 500000000,
"summary": "Size of KEEP buffer pool for standard block size buffers"
"summary": "Size of KEEP buffer pool for standard block size buffers",
"resource": 1
}
},
{
@ -1934,7 +1938,8 @@
"maxval": 2000000000,
"vartype": 2,
"default": 500000000,
"summary": "Size of RECYCLE buffer pool for standard block size buffers"
"summary": "Size of RECYCLE buffer pool for standard block size buffers",
"resource": 1
}
},
{
@ -2789,7 +2794,8 @@
"maxval": 3000000000,
"vartype": 2,
"default": 0,
"summary": "size of in-memory hash work area"
"summary": "size of in-memory hash work area",
"resource": 1
}
},
{
@ -3416,7 +3422,8 @@
"maxval": 2000000000,
"vartype": 2,
"default": 500000000,
"summary": "size in bytes of large pool"
"summary": "size in bytes of large pool",
"resource": 1
}
},
{
@ -4955,7 +4962,8 @@
"maxval": 2000000000,
"vartype": 2,
"default": 50000000,
"summary": "redo circular buffer size"
"summary": "redo circular buffer size",
"resource": 1
}
},
{
@ -5297,7 +5305,8 @@
"maxval": 33000000000,
"vartype": 2,
"default": 0,
"summary": "Max size for Memory Target"
"summary": "Max size for Memory Target",
"resource": 1
}
},
{
@ -5316,7 +5325,8 @@
"maxval": 33000000000,
"vartype": 2,
"default": 0,
"summary": "Target size of Oracle SGA and PGA memory"
"summary": "Target size of Oracle SGA and PGA memory",
"resource": 1
}
},
{
@ -5804,7 +5814,7 @@
"enumvals": null,
"context": "",
"unit": 3,
"tunable": false,
"tunable": true,
"description": "",
"minval": 200,
"maxval": 400,
@ -5861,12 +5871,12 @@
"enumvals": null,
"context": "",
"unit": 3,
"tunable": false,
"tunable": true,
"description": "",
"minval": null,
"maxval": null,
"vartype": 4,
"default": "TRUE",
"default": true,
"summary": "controls all types of adaptive plans"
}
},
@ -5937,12 +5947,12 @@
"enumvals": null,
"context": "",
"unit": 3,
"tunable": false,
"tunable": true,
"description": "",
"minval": null,
"maxval": null,
"minval": 0,
"maxval": 11,
"vartype": 2,
"default": "2",
"default": 2,
"summary": "optimizer dynamic sampling"
}
},
@ -6583,13 +6593,14 @@
"enumvals": null,
"context": "",
"unit": 3,
"tunable": false,
"tunable": true,
"description": "",
"minval": 0,
"maxval": 33000000000,
"vartype": 2,
"default": 0,
"summary": "Target size for the aggregate PGA memory consumed by the instance"
"summary": "Target size for the aggregate PGA memory consumed by the instance",
"resource": 1
}
},
{
@ -7482,7 +7493,8 @@
"maxval": 33000000000,
"vartype": 2,
"default": 0,
"summary": "max total SGA size"
"summary": "max total SGA size",
"resource": 1
}
},
{
@ -7520,7 +7532,8 @@
"maxval": 33000000000,
"vartype": 2,
"default": 0,
"summary": "Target size of SGA"
"summary": "Target size of SGA",
"resource": 1
}
},
{
@ -7571,13 +7584,14 @@
"enumvals": null,
"context": "",
"unit": 3,
"tunable": false,
"tunable": true,
"description": "",
"minval": null,
"maxval": null,
"minval": 0,
"maxval": 4000000000,
"vartype": 2,
"default": "0",
"summary": "size in bytes of reserved area of shared pool"
"default": 1000000000,
"summary": "size in bytes of reserved area of shared pool",
"resource": 1
}
},
{
@ -7596,7 +7610,8 @@
"maxval": 4000000000,
"vartype": 2,
"default": 1000000000,
"summary": "size in bytes of shared pool"
"summary": "size in bytes of shared pool",
"resource": 1
}
},
{
@ -7729,7 +7744,8 @@
"maxval": 3000000000,
"vartype": 2,
"default": 0,
"summary": "size of in-memory sort work area"
"summary": "size of in-memory sort work area",
"resource": 1
}
},
{
@ -7976,7 +7992,8 @@
"maxval": 4000000000,
"vartype": 2,
"default": 20000000,
"summary": "size in bytes of the streams pool"
"summary": "size in bytes of the streams pool",
"resource": 1
}
},
{