Chapter 9. Disabling graphics console output for latency sensitive workloads
The kernel starts passing messages to
printk() as soon as it starts. The kernel sends messages to the log file and also displays on the graphics console even in the absence of a monitor attached to a headless server.
In some systems, the output sent to the graphics console might introduce stalls in the pipeline. This might cause potential delay in task execution while waiting for data transfers. For example, outputs sent to
(/dev/tty0), might cause potential stalls in some systems.
To prevent unexpected stalls, you can limit or disable the information that is sent to the graphic console by:
- Changing the order of console definitions.
Turning off most
printk()functions and ensuring that you set the
ignore_loglevelkernel parameter to
This section includes procedures to prevent graphics console from logging on the graphics adapter and control the messages that print on the graphics console.
9.1. Disabling graphics console logging to graphics adapter
tty) default kernel console enables your interaction with the system by passing input data to the system and displaying the output information on the graphics console.
Not configuring the graphics console, prevents it from logging on the graphics adapter. This makes
tty0 unavailable to the system and helps disable printing messages on the graphics console.
Disabling graphics console output does not delete information. The information prints in the system log and you can access them using the
console=tty0option from the kernel configuration:
# grubby --update-kernel=ALL --remove-args="console=tty0"
9.2. Disabling messages from printing on graphics console
You can control the amount of output messages that are sent to the graphics console by configuring the required log levels in the
View the current console log level:
$ cat /proc/sys/kernel/printk 7 4 1 7
The command prints the current settings for system log levels. The numbers correspond to current, default, minimum, and boot-default values for the system logger.
Configure the desired log level in the
$ echo “1” > /proc/sys/kernel/printk
The command changes the current console log level. For example, setting log level 1, will print only alert messages and prevent display of other messages on the graphics console.