Chapter 14. 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 teletype0
(/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:
-
Removing the
tty0
definition. - Changing the order of console definitions.
-
Turning off most
printk()
functions and ensuring that you set theignore_loglevel
kernel parameter tonot configured
.
By disabling the graphics console output from logging on and by controlling the messages that print on the graphics console, you can improve latency on sensitive workloads.
14.1. Disabling graphics console logging to graphics adapter
The teletype
(tty
) default kernel console enables your interaction with the system by passing input data to the system and displaying the output information about 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 journalctl
or dmesg
utilities.
Procedure
Remove the
console=tty0
option from the kernel configuration:# grubby --update-kernel=ALL --remove-args="console=tty0"
14.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 /proc/sys/kernel/printk
file.
Procedure
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
/proc/sys/kernel/printk
file.$ 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.