In the China-domestically developed GBase 8a MPP database from GBASE, the gcware component handles cluster management, and its log records INFO messages by default. Under complex workloads that can produce very large log files. This post shows how to change the log priority with a parameter so unnecessary output — and the disk I/O behind it — goes away.
The parameter applies to the corosync service in V8 and the gcware service in V9. Restart gcware after changing it.
Why INFO logs pile up
Each connection that logs in and runs SQL requests an internal session ID (register session); on exit, including abnormal disconnects, the session is destroyed. If clients connect, execute and disconnect frequently, gcware.log fills with entries like these and can reach GB per day:
Jun 05 08:29:30.011092 WARN [GCWARE] server force to close session with session ID:3423
Jun 05 08:29:30.011095 INFO [GCWARE] CCS destroy session 3423
Jun 05 08:29:30.011098 INFO [LCK ] lck destroy session:3423
Jun 05 08:29:30.011100 INFO [LCK ] qlm unlock batch gc-event-lock with session 3423
Jun 05 08:29:30.011103 INFO [CRM ] CrmDestroySession,SessionID is:3423!
Jun 05 08:29:30.011105 INFO [GCWARE] node 3372351498 state plan change to 1
Jun 05 08:29:30.011108 INFO [GCWARE] node 3372351498 state change to 1
Jun 05 08:29:30.166465 INFO [GCWARE] CCS create session 6,1,43,3986,20
Jun 05 08:29:30.166514 INFO [GCWARE] register session with sessionid 3986
Jun 05 08:29:30.167375 INFO [GCWARE] session 3986 set session timeout to 90
logfile_priority
This parameter is not present in gcware.conf or corosync.conf by default — add it by hand to the logging section:
logging {
fileline: off
to_stderr: no
to_file: yes
to_syslog: no
logfile: /opt/10.0.2.201/gcware/log/gcware.log
gcware_system_log: /opt/10.0.2.201/gcware/log/gcware_system.log
debug: off
timestamp: on
logfile_priority:err
If debug is on, this parameter is ignored. Its default value is INFO. Setting a lower threshold emits more log levels — INFO keeps everything with severity >= 1, while err keeps only severity >= 4, dropping the warning, notice and info classes. Allowed values:
emerg : system log messages for emergencies (7).
alert : keeps messages of severity alert (6) and above.
crit : keeps messages of severity critical (5) and above.
err : keeps messages of severity error (4) and above.
warning : keeps messages of severity warning (3) and above.
notice : keeps syslog messages of severity notice (2) and above.
info : keeps system log messages of severity info (1) and above.
debug : keeps messages of severity debug (0) and above.
syslog_priority
syslog_priority works exactly like logfile_priority, but controls the priority of messages sent to syslog. to_syslog is off by default.
Going forward, the trade-off is straightforward: pick the lowest priority that still captures what your on-call team needs, and the gbase cluster stops paying for session churn in disk writes. It is a small config change, but on a busy gbase node it is often the cheapest way to reclaim I/O budget for the database itself.
Top comments (0)