Jump to content

Disable Console

From eLinux.org

Description

You can save time during kernel bootup by disabling the console output. The easiest way to do this is to use the "quiet" option on the kernel command line (described below).

Printk output is usually directed to a serial port or a VGA console during bootup. By disabling console output, the time taken to output the characters (and perform things like software scrolling of the display buffer) is eliminated.

How to implement or use

To disable console output during kernel bootup, use the "quiet" option on the kernel command line.

To do this, just put the word "quiet" (without the quotes) in the kernel command line, with no other arguments. This will suppress printk output during booting. Note that printk messages are still buffered in the kernel and can be retrieved after booting using the "dmesg" command.

Expected Improvement

This saves time during kernel bootup by suppressing printk output. Printk output delays depend on a number of factors, but in the use cases cited below, the savings were in the range of a few hundred milliseconds.

With a serial console, the time to output characters is dependent on the serial port speed. However, with a VGA console, the time to output the characters is dependent on the speed of the processor. Therefore, the slower your processor, the more savings you will gain from this technique.

Resources

Projects

None

Specifications

None

Patches

None

Case Studies

Case 1

Hardware Raspberry Pi Zerio W, 1 cpu core, ARMv6 BCM2835, 997 BogoMIPS (from /proc/cpuinfo), 697.95 BogoMIPS (from dmesg), presumed 1GHz CPU frequency
Kernel Version 5.15.24
Configuration customized debian (Raspbian 11), using systemd 247.3
Time without "quiet" option 3.011701 sec (until /sbin/init)
Time with "quiet" option, 115200 serial console 1.714458 sec (until /sbin/init)
Time without "quiet" option, 9600 serial console 16.108101 sec (until /sbin/init)
Time savings 1.297243 sec with 115200 serial port, and 14.393643 sec with 9600 serial port

From data submitted by Marko Hoyer of Bosch (see https://lore.kernel.org/linux-embedded/b0dd83c8-eb23-494b-8f23-ea8c084405a6@freenet.de/)

Case 2

Hardware Beagleplay, TI AM625 processor, 4 CPU cores, 400 BogoMIPS (from /proc/cpuinfo), presumed 1.4GHz CPU frequency, 115200 serial console
Kernel Version 6.6.32
Configuration Yocto Project (scarthgap) Poky distribution core-image-minimal,
Time without "quiet" option 3.592722 sec (until /sbin/init)
Time with "quiet" option 1.908232 sec (until /sbin/init)
Time savings 1.68449 sec

From data submitted by Tim Bird of Sony (See https://birdcloud.org/boot-time-files/boot-data-timslab-bp1-250123-184721.txt and https://birdcloud.org/boot-time-files/boot-data-timslab-bp1-241208-191139.txt)

Case 3

Hardware Dell XPS13 laptop, Intel i7-8550U @ 1.8GHz, ~2655 cpu MHz, 8 CPU cores, 3999 BogoMIPS (from /proc/cpuinfo), no serial console
Kernel Version 5.4.0
Configuration Ubuntu 20.04
Time without "quiet" option 0.839257 sec (until /sbin/init)
Time with "quiet" option 0.767390 sec (until /sbin/init)
Time savings 0.071867 sec (72 milliseconds)

From data submitted by Tim Bird of Sony (See https://birdcloud.org/boot-time-files/boot-data-timslab-xps13-250124-030801.txt and https://birdcloud.org/boot-time-files/boot-data-timslab-xps13-250124-030311.txt)

Much older data

Case 1 (old)

Hardware KMC SH board, using VGA console
Kernel Version CELF-1 (040126)
Configuration relatively small configuration (details not available)
Time without "quiet" option 637878 usec
Time with "quiet" option 461893 usec
Time savings 176 milliseconds

From data submitted by Maruyama Kiyoyasu of Mitsubishi.

Case 2 (old)

Hardware TI OMAP board, using serial console
Kernel Version CELF-1 (040126)
Configuration Kernel booted with XIP, CRAMFS root file system, with preset-LPJ
Time without "quiet" option 551735 usec
Time with "quiet" option 280676 usec
Time savings 271 milliseconds

From data submitted by Noboru Wakabayashi of Hitachi.