17
User Group Informix France New Environment and Dynamic Setting in IDS 12.10 [email protected] Jeudi 12 Septembre 2013

Ugif 09 2013 new environment and dynamic setting in ids 12.10

  • Upload
    ugif

  • View
    121

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Ugif 09 2013   new environment and dynamic setting in ids 12.10

User Group Informix

France

New Environment and Dynamic Setting in IDS 12.10

[email protected]

Jeudi 12 Septembre 2013

Page 2: Ugif 09 2013   new environment and dynamic setting in ids 12.10

User Group Informix

France 2

Agenda

Legacy Engine Environment and Setting

New Environment Management

New Onconfig Dynamic Setting

New Sysadmin API

Example

Page 3: Ugif 09 2013   new environment and dynamic setting in ids 12.10

User Group Informix

France 3

Legacy Engine Environment and Setting

Environment variable

– INFORMIXDIR, ONCONFIG, INFORMIXSERVER, INFORMIXSQLHOSTS, PATH

ONCONFIG file

– Static setting

– Dynamic setting

• Onmode -wf / -wm

– Deprecated parameter

Page 4: Ugif 09 2013   new environment and dynamic setting in ids 12.10

User Group Informix

France 4

New Server Environment Management

Ability for DBA to start database server reading the environment to use from a file

Ability to run Informix utility/binary without having to set environment in the shell before

Ability for DBA to start database server from a remote machine without creating specific environment files and „‟wrappers‟

Set environment reading a file during binary execution using new -FILE option

– -FILE=/path_to_file_that_contains_env

The format of the file is #$NAME VALUE

Onconfig file can be used to set environment variables

Page 5: Ugif 09 2013   new environment and dynamic setting in ids 12.10

User Group Informix

France 5

New Server Environment Management (cont)

Supported binaries:

– oninit, onstat, onmode,oncheck, ontape,onclean,onload, onlog, onunload, onparams,onspaces

Values in –FILE option take precedence over values that are set in local shell environment

INFORMIXDIR environment variable is set based on binary path.

– If INFORMIXDIR is not set in the environment or is not set from the environment file then the PATH to the binary is used

– binary assumed to be in subdirectory of INFORMIXDIR

Page 6: Ugif 09 2013   new environment and dynamic setting in ids 12.10

User Group Informix

France 6

New Server Environment Management (cont)

Environment Variable can be embedeed in onconfig file

– Syntax: PARAMETER_NAME $ENVIRONMENT_VAR # comments

Example: $ cat IDS1210FC1.env #$ONLINELOG1 /usr2/support/chunks/IDS1210FC1/online1.log In ONCONFIG: MSGPATH $ONLINELOGINST1 $ oninit -FILE=IDS1210FC1.env

Environment variable must be set for any program that read onconfig file:

– Oninit, oncheck, onbar, ontape, onlog and archecker utilities

Page 7: Ugif 09 2013   new environment and dynamic setting in ids 12.10

User Group Informix

France 7

New Server Environment Management - Example

Environment File: $ cat IDS1210FC1.env #$INFORMIXSERVER sar12101shm #$INFORMIXSQLHOSTS /usr2/support/products/sqlhosts #$ONCONFIG onconfig.saroumane

PATH Setting $ echo $PATH /usr2/support/products/IDS1210FC1B4/bin:/usr/local/bin:/bin:/usr/bin

Binary execution $ oninit -FILE=IDS1210FC1.env $ onstat -FILE=IDS1210FC1.env – IBM Informix Dynamic Server Version 12.10.FC1 -- On-Line -- Up 00:00:19 -- 149788 Kbytes $ onmode -FILE=IDS1210FC1.env -ky $ onstat -FILE=IDS1210FC1.env - shared memory not initialized for INFORMIXSERVER 'sar12101shm'

Page 8: Ugif 09 2013   new environment and dynamic setting in ids 12.10

User Group Informix

France 8

New Onconfig Dynamic Setting

Generalize dynamic tuning for all parameters

Onconfig parameter cleanup

New onstat -g cfg command to manage onconfig parameter

New SQL admin API command for onconfig dynamic setting

New SQL admin API command for onconfig parameter export and import

– Configuration snapshot can be exported to a file

– Configuration file can be imported to a running server

Avoid to shutdown IDS when changing a configuration parameter

Long term goal is IDS self-tuning

Page 9: Ugif 09 2013   new environment and dynamic setting in ids 12.10

User Group Informix

France 9

Onconfig Parameters Cleanup

Deprecated Parameters Removed AFF_NPROCS AFF_SPROCBUFFERS DRNODEJDKVERSION LOG_BACKUP_MODELRU_MAX_DIRTY LRU_MIN_DIRTYLRUPOLICY LRUSNOAGE NUMAIOVPSNUMCPUVPS OPCACHEMAXOPTICAL_LIB_PATH RA_THRESHOLDSPINCNT STAGEBLOB

An unknown parameter in your config file will now produce this message during startup

– attn: Ignoring unknown or deprecated config parameter (%s)

Page 10: Ugif 09 2013   new environment and dynamic setting in ids 12.10

User Group Informix

France 10

Dynamic Setting Parameter

More Parameters can be modified on the fly BAR_ACT_LOG BAR_BSALIB_PATH BAR_DEBUG BAR_HISTORY BAR_IXBAR_PATH BAR_MAX_BACKUP DS_POOLSIZE DUMPCORE PC_POOLSIZE RAS_LLOG_SPEED RAS_PLOG_SPEED SDS_ENABLE SDS_FLOW_CONTROL SMX_PING_INTERVAL SMX_PING_RETRY STMT_CACHE STMT_CACHE_HITS etc...

Page 11: Ugif 09 2013   new environment and dynamic setting in ids 12.10

User Group Informix

France 11

Onstat -g cfg

Onstat –g cfg / onstat –g cfg <param>

– Displays the current value of all, or given parameter

Onstat –g cfg full

– Display full info of parameter (defaut, onconfig and current value + message)

onstat -g cfg tunable

– Displays full info for all dynamically tunable parameters

onstat -g cfg diff

– Displays full info for all parameters whose current value differs from that of the config file

onstat -g cfg msg

– Displays any error or warning messages associated with parameters

Page 12: Ugif 09 2013   new environment and dynamic setting in ids 12.10

User Group Informix

France 12

Example: onstat -g cfg

$ onstat -g cfg IBM Informix Dynamic Server Version 12.10.FC1 -- On-Line – Up 02:41:38 -- 149788 Kbytes Configuration Parameter List name current Value ROOTNAME rootdbs ROOTPATH /work//rootchunk ROOTOFFSET 0 ROOTSIZE 200000 MIRROR 1 MIRRORPATH MIRROROFFSET 0 DBSERVERNAME mors SERVERNUM 43 MSGPATH /work/online.log ...

Page 13: Ugif 09 2013   new environment and dynamic setting in ids 12.10

User Group Informix

France 13

Example: onstat -g cfg full <parameter>

$ onstat -g cfg full MSGPATH Configuration Parameter Info id name type maxlen units rsvd tunable 10 MSGPATH CHAR 257 * * default : /dev/tty onconfig: $ONLINELOG1 current : /usr2/support/chunks/IDS1210FC1/online1.log Description: Use the MSGPATH configuration parameter to specify the full pathname of the message-log file. The database server writes status messages and diagnostic messages to this file during operation.

Page 14: Ugif 09 2013   new environment and dynamic setting in ids 12.10

User Group Informix

France 14

new SQL admin API commands

modify config [persistent]

– EXECUTE FUNCTION task("modify config", "LTAPEDEV", "/dev/null");

• Modify onconfig parameter in memory

– EXECUTE FUNCTION task("modify config persistent", "LTXHWM", "75");

• Modify onconfig parameter in memory and in onconfig file

reset config [all]

– Reset command synchronizes parameter value in memory with parameter onconfig value as shown by onstat -g cfg full.

– EXECUTE FUNCTION task("reset config", "LTAPEDEV");

– EXECUTE FUNCTION task("reset config all");

Page 15: Ugif 09 2013   new environment and dynamic setting in ids 12.10

User Group Informix

France 15

SQL Admin API Onconfig Dynamic Setting - Example

> onstat -g cfg full LTXEHWM IBM Informix Dynamic Server Version 12.10.FC1 -- On-Line -- Up 03:13:07 – 149788 Kbytes Configuration Parameter Info id name type maxlen units rsvd tunable 25 LTXEHWM INT4 12 % * * min/max : 1,100 default : 80 onconfig: 80 current : 80 > execute function task("modify config", "LTXEHWM", "70"); > onstat -g cfg full LTXEHWM IBM Informix Dynamic Server Version 12.10.FC1 -- On-Line -- Up 03:17:36 – 149788 Kbytes Configuration Parameter Info id name type maxlen units rsvd tunable 25 LTXEHWM INT4 12 % * * min/max : 1,100 default : 80 onconfig: 80 current : 70

Page 16: Ugif 09 2013   new environment and dynamic setting in ids 12.10

User Group Informix

France 16

Export and Import of Configuration Parameters

Export Configuration Parameters

– onmode –we <filename>

– EXECUTE FUNCTION task(“export config”, “filename”);

– All parameters are exported

– Template used: $INFORMIXDIR/etc/onconfig.std

Import Configuration Parameters

– onmode –wi <filename>

– EXECUTE FUNCTION task(“import config”, “filename”);

– Only tunable parameters in the file are modifed – Others are ignored

– Convenient way to modify mutiple parameters with one command

Page 17: Ugif 09 2013   new environment and dynamic setting in ids 12.10

User Group Informix

France 17

Thank you!