<@U0A71G31CDV> Are the rotation settings for the ...
# questions-and-troubleshooting
a
@Rocky Are the rotation settings for the following log files applied globally based on the CN configuration? •
{be or cn}.INFO.log
•
{be or cn}.WARN.log
•
{be or cn}.ERROR.log
•
{be or cn}.FATAL.log
For example, if the rotation settings are configured to roll at 1 GB and retain up to 5 files, does that limit apply independently to each log level? In that case, would the theoretical maximum disk usage be 20 GB in total?
INFO (1 GB × 5) + WARN (1 GB × 5) + ERROR (1 GB × 5) + FATAL (1 GB × 5) = 20 GB
r
Yes, your understanding is correct. The rotation settings for StarRocks Backend (BE) and Compute Node (CN) logs apply independently to each log level stream based on the global configuration in
be.conf
(or
cn.conf
). 1. Independent Application Even though you define the settings once (e.g.,
sys_log_roll_num = 5
), the BE/CN process applies these limits to each log file type separately. StarRocks uses a version of
glog
where: *
<http://be.INFO|be.INFO>
maintains its own set of 5 rolled files. *
be.WARNING
maintains its own set of 5 rolled files. *
be.ERROR
maintains its own set of 5 rolled files. *
be.FATAL
maintains its own set of 5 rolled files. 2. Theoretical Maximum Disk Usage Your calculation is correct. If each of the four log levels reaches its rotation limit, the theoretical maximum disk usage for system logs would be:
1 GB (limit) × 5 (files) × 4 (levels: INFO, WARN, ERROR, FATAL) = 20 GB
Important Considerations: * Log Mirroring: In StarRocks (via
glog
), log levels are inclusive. An
ERROR
message is written to the
ERROR
,
WARN
, and
INFO
log files simultaneously. This means that during a period of high error volume, all three files will grow at once, consuming disk space for the same data across multiple files. *
be.out
Log:
Note that there is also a
be.out
file which captures
stdout
and
stderr
. This file is not managed by the
sys_log_roll_num
or
sys_log_roll_mode
parameters. It typically only grows significantly if the process is crashing or printing non-standard output. * Import Error Logs: Logs related to data loading (stored in
storage/error_log
) are handled separately by the
load_error_log_reserve_hours
parameter and do not count toward this 20 GB total. Summary of Configuration Parameters: * `sys_log_roll_mode`: Set to
SIZE-MB-1024
for 1 GB rolls. * `sys_log_roll_num`: Set to
5
to retain 5 files per level. * `sys_log_dir`: The directory where these files are stored (default
${STARROCKS_HOME}/log
). References • administration/management/logs.md • administration/management/BE_configuration.md • administration/management/FE_configuration.md