描述
使用show proxyconfig [like 'xx']
语句:
这里所展示的配置项可以分为3种类型况来说明:
第一种是proxy注册到内部表
ob_all_proxy_config
中的配置项,这些配置项可供用户根据使用场景进行配置和更新。- 第二种是proxy内部自己使用,对一般用户不可见的配置项,不会注册到内部表中。
第三种是proxy从config server中获取到的配置信息(包括版本号、meta table信息、cluster信息、bin url和更新时间),这些信息只用来展示config server的配置,不会注册到内部表或者dump到本地配置文件中,并且它们全部以字符串“json_config”开头,查询时可以使用like进行过滤。
上述的前两种配置信息会在本地生产一个配置文件,默认保存在proxy运行目录的etc目录下,文件名为obproxy_config.bin,第三种配置信息仅保存在proxy内存中。
- 支持like模糊匹配(支持’%’和’
_
‘的匹配)。
示例
OceanBase (root@oceanbase)> show proxyconfig;
+-----------------------------------------+--------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+---------------+
| name | value | info | need_reboot | visible_level |
+-----------------------------------------+--------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+---------------+
| client_max_memory_size | 8MB | max dynamic alloc memory size of one client session | false | SYS |
| max_connections | 60000 | max fd proxy could use | false | SYS |
| current_local_config_version | 100 | current local config version | false | SYS |
| proxy_local_cmd | 0 | proxy local cmd type: 0->none(default), 1->exit, 2->restart, 3->commit, 4->rollback | false | MEMORY |
| syslog_level | DEBUG | specifies the current level of logging: DEBUG, TRACE, INFO, WARN, USER_ERR, ERROR | false | USER |
| server_routing_mode | oceanbase | server routing mode: 1.oceanbase(default mode); 2.random; 3.mock; 4.mysql | false | SYS |
| test_server_addr | | proxy will choose this addr(if not empty) as observer addr forcibly, format ip1:sql_port1;ip2:sql_port2 | false | USER |
| internal_cmd_mem_limited | 64K | internal cmd response memory limited, [0, 64MB], 0 means unlimited | false | USER |
| sqlaudit_mem_limited | 0 | sqlaudit memory limited, [0, 1GB] | false | USER |
| limited_pl_update_threshold | 10 | in merging state, max partition location update task processing per second | false | SYS |
| normal_pl_update_threshold | 100 | max partition location update task processing per second | false | SYS |
| enable_bad_route_reject | False | if enabled, bad route reuest will be rejected, like the first statement of a transaction block opened by begin(or start transaction) do not have table name | false | USER |
| enable_congestion | True | enable congestion feature or not | false | USER |
| congestion_retry_interval | 20s | congestion retry interval, [1s, 1h] | false | USER |
| congestion_fail_window | 120s | congestion failure window size, [1s, 1h] | false | USER |
| min_keep_congestion_interval | 20s | minimum keep congestion interval, [1s, 1d] | false | USER |
| congestion_failure_threshold | 5 | congestion failure threshold, [0, +∞], 0 means disable congestion | false | USER |
| app_name | ob1.jianhua.sjh | current application name which proxy works for, need defined | false | SYS |
| proxy_id | 0 | used to identify each obproxy, it can not be zero if proxy_service_mode is server | true | SYS |
| proxy_service_mode | client | proxy deploy and service mode: 1.client(default); 2.server | true | SYS |
| obproxy_config_server_url | http://10.111.4.23:8080/diamond/cgi/a.py?key=ob1.jianhua.sjh.10.125.224.4.proxy&method=get | url of config info(rs list and so on) | true | SYS |
| rootservice_list | | a list of servers against which election candidate is checked for validation, format ip1:sql_port1;ip2:sql_port2 | true | SYS |
| listen_port | 13203 | obproxy listen port | true | SYS |
| local_bound_ip | 0.0.0.0 | local bound ip(any) | true | SYS |
| ignore_local_config | True | ignore all local cached files, start proxy with remote json | false | USER |
| slow_proxy_process_time_threshold | 2ms | slow proxy process time threshold, [0s, 30d] | false | USER |
| slow_transaction_time_threshold | 5s | slow transaction time threshold, [0s, 30d], if set a negative value, proxy treat it as 0 | false | USER |
| enable_trace_stats | False | enable mysql trace stats | false | USER |
| enable_cpu_topology | True | enable cpu topology, work threads bind to cpu | true | USER |
| enable_strict_stat_time | True | enable strict statistic time, use gettimeofday or clock_gettime(CLOCK_REALTIME) | false | USER |
| enable_report_session_stats | False | enable report client session statistic table | false | USER |
| enable_mysqlsm_info | True | enable mysqlsm info, not used in proxy now | false | USER |
| enable_sync_all_stats | True | enable proxy sync all stats | false | USER |
| enable_trans_detail_stats | True | enable mysql transaction detail stats | false | USER |
| enable_flow_control | True | whether flow control is enabled in a mysql tunnel, applied instantly in new created tunnels after updated | false | USER |
| flow_event_queue_threshold | 5 | event queue threshold for flow control, [0, 20], if set a negative value, proxy treat it as 5 | false | USER |
| flow_consumer_reenable_threshold | 256 | consumer reenable threshold for flow control, [0, 131072], if set a negative value, proxy treat it as 256 | false | USER |
| flow_low_water_mark | 64K | flow low water mark for flow control, [0, 16MB], if set a negative value, proxy treat it as 64K | false | USER |
| flow_high_water_mark | 64K | flow high water mark for flow control, [0, 16MB], if set a negative value, proxy treat it as 64K | false | USER |
| request_buffer_length | 4KB | the max length of request buffer we will alloc for each reqeust | false | USER |
| tunnel_request_size_threshold | 8KB | use tunnel to transfer request, [4KB, 16MB], if request bigger than the threshold, 0 disable | false | USER |
| default_buffer_water_mark | 32KB | default buffer water mark, [4B, 64KB] | false | USER |
| task_thread_num | 2 | proxy task thread num, [1, 4] | true | USER |
| work_thread_num | 8 | proxy work thread num, [1, 128] | true | USER |
| routing_cache_mem_limited | 50MB | max size of all proxy routing cache size, like table cache, location cache, etc. [1KB, 100G] | false | USER |
| stack_size | 1MB | stack size of one thread, [1MB, 10MB] | true | USER |
| proxy_mem_limited | 800MB | proxy memory limited, [100MB, 100G] | false | USER |
| server_tcp_init_cwnd | 0 | the initial tcp congestion window, [0, 64] | false | USER |
| sock_packet_tos_out | 0 | sock param, packet tos out, [0, 1] | false | USER |
| sock_packet_mark_out | 0 | sock param, packet mark out, [0, 1] | false | USER |
| sock_option_flag_out | 0 | sock param, option flag out, bit 1: NO_DELAY, bit 2: KEEP_ALIVE, bit 3: LINGER_ON | false | USER |
| sock_send_buffer_size_out | 0 | sock param, send buffer size, [0, 8MB], if set a negative value, proxy treat it as 0 | false | USER |
| sock_recv_buffer_size_out | 0 | sock param, recv buffer size, [0, 8MB], if set a negative value, proxy treat it as 0 | false | USER |
| default_inactivity_timeout | 180000s | default inactivity timeout, [1s, 30d] | false | USER |
| net_config_poll_timeout | 1ms | epoll_wait timeout for net events, [0, +∞], if set a value <= 0, proxy treat it as 0 | false | USER |
| net_accept_threads | 2 | net accept threads num, [0, 8] | true | USER |
| frequent_accept | True | frequent accept | true | USER |
| connect_observer_max_retries | 3 | max retries to do connect | false | USER |
| enable_cluster_checkout | True | if enable cluster checkout, proxy will send cluster name and id when login and server will check it | false | USER |
| observer_query_timeout_delta | 20s | the delta value for @@ob_query_timeout, to cover net round trip time(proxy<->server) and task schedule time(server), [1s, 30s] | false | USER |
| client_max_connections | 8192 | client max connections for one obproxy, [0, 65535] | false | USER |
| enable_client_connection_lru_disconnect | False | if client connections reach throttle, true is that new connection will be accepted, and eliminate lru client connection, false is that new connection will disconnect, and err packet will be returned | false | SYS |
| username_separator | :;-;. | username separator | false | SYS |
| short_async_task_timeout | 5s | short async task timeout, [1s, 1h] | false | USER |
| long_async_task_timeout | 60s | long async task timeout, [1s, 1h] | false | USER |
| need_convert_vip_to_tname | False | convert vip to tenant name, which is useful in cloud | false | SYS |
| log_dir_size_threshold | 64GB | max usable space size of log dir, used to decide whether should clean up log file, [256MB, 1T] | false | USER |
| log_cleanup_interval | 10m | log file clean up task schedule interval, set 1 day or longer, [5s, 30d] | false | USER |
| log_file_percentage | 80 | max percentage of avail size occupied by proxy log file, [0, 90], 0 means ignore such limit | false | USER |
| delay_exit_time | 100ms | delay exit time, [100ms,500ms] | false | USER |
| hot_upgrade_graceful_exit_timeout | 120s | graceful exit timeout, [0s, 30d], if set a value <= 0, proxy treat it as 0 | false | USER |
| hot_upgrade_rollback_timeout | 24h | default hot upgrade rollback timeout, proxy will do rollback if receive no rollback command in such long time, [1s, 30d] | false | USER |
| hot_upgrade_failure_retries | 5 | default hot upgrade failure retries, proxy will stop handle hot_upgrade command after such retries, [1, 20] | false | USER |
| fetch_proxy_bin_timeout | 120s | default hot upgrade fetch binary timeout, proxy will stop fetching after such long time, [1s, 1200s] | false | USER |
| fetch_proxy_bin_random_time | 300s | max random waiting time of fetching proxy bin in hot upgrade, [1s, 1h] | false | USER |
| cluster_expire_time | 1d | cluster resource expire time, 0 means never expire,cluster will be deleted if it has not been accessed for more than the time,[0, ] | false | USER |
| cluster_count_high_water_mark | 256 | if cluster count is greater than this water mark, cluser will be kicked out by LRU | false | USER |
| partition_location_expire_relative_time | 0 | the unit is second, 0 means do not expire, others will expire partition location base on relative time | false | SYS |
| stat_dump_interval | 6000s | dump statistic in log interval, [0s, 1d], 0 means disable, if set a negative value, proxy treat it as 0 | false | USER |
| stat_table_sync_interval | 60s | update sync statistic to ob_all_proxy_stat table interval, [0s, 1d], 0 means disable, if set a negative value, proxy treat it as 0 | false | USER |
| config_server_refresh_interval | 60s | config server info refresh task interval, [10s, 1d] | false | USER |
| server_state_refresh_interval | 20s | the interval to refresh server state for getting zone or server newest state, (0s, 1h] | false | USER |
| cache_cleaner_clean_interval | 20s | the interval for cache cleaner to clean cache, [1s, 1d] | false | USER |
| proxy_info_check_interval | 60s | proxy info check task interval, [1s, 1h] | false | USER |
| refresh_config | False | when table processor do check work, update all proxy config if refresh_config is true | false | MEMORY |
| refresh_rslist | False | when refresh config server, update all rslist if refresh_rslist is true | false | MEMORY |
| refresh_json_config | False | force update json info if refresh_json_config is true | false | MEMORY |
| json_config_version | 9254042f506530ffe6ce1f3ac718d817 | json config info version | false | virtual |
| json_config_bin_url | http://10.111.4.23:8877 | bin url, used for hot upgrade | false | virtual |
| json_config_meta_table_db | oceanbase | meta table db name | true | virtual |
| json_config_meta_table_user | admin | meta table username, format'user@tenant#cluster' | true | virtual |
| json_config_meta_table_password | admin | meta table password | true | virtual |
| json_config_real_meta_cluster | ob1.jianhua.sjh | meta table real cluster | true | virtual |
| json_config_cluster_count | 1 | ob cluster count, meta db cluster not included | false | virtual |
| json_config_modified_time | 2016-09-29 10:38:09.193650 | json config modified time | false | virtual |
+-----------------------------------------+--------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+---------------+
95 rows in set (0.00 sec)
OceanBase (root@oceanbase)> show proxyconfig like "%json%";
+---------------------------------+----------------------------------+-------------------------------------------------------+-------------+---------------+
| name | value | info | need_reboot | visible_level |
+---------------------------------+----------------------------------+-------------------------------------------------------+-------------+---------------+
| refresh_json_config | False | force update json info if refresh_json_config is true | false | MEMORY |
| json_config_version | 9254042f506530ffe6ce1f3ac718d817 | json config info version | false | virtual |
| json_config_bin_url | http://10.111.4.23:8877 | bin url, used for hot upgrade | false | virtual |
| json_config_meta_table_db | oceanbase | meta table db name | true | virtual |
| json_config_meta_table_user | admin | meta table username, format'user@tenant#cluster' | true | virtual |
| json_config_meta_table_password | admin | meta table password | true | virtual |
| json_config_real_meta_cluster | ob1.jianhua.sjh | meta table real cluster | true | virtual |
| json_config_cluster_count | 1 | ob cluster count, meta db cluster not included | false | virtual |
| json_config_modified_time | 2016-09-29 10:38:09.193650 | json config modified time | false | virtual |
+---------------------------------+----------------------------------+-------------------------------------------------------+-------------+---------------+
9 rows in set (0.00 sec)