Answer the question
In order to leave comments, you need to log in
How to fix long shutdown (reboot) in ubuntu 18?
After sending the server to reboot, the server shuts down for a long time (about 3 minutes), then it starts up normally.
Before shutdown/reboot
Aug 16 20:34:35 example systemd[1]: Stopping Session 3 of user app.
Aug 16 20:34:35 example systemd[1]: Stopping Session 1 of user root.
Aug 16 20:34:35 example systemd[1]: Stopping User Manager for UID 0...
Aug 16 20:34:35 example systemd[1]: Stopping User Manager for UID 1000...
Aug 16 20:34:35 example systemd[1]: Stopped target Graphical Interface.
Aug 16 20:34:35 example systemd[1]: Stopped target Multi-User System.
Aug 16 20:37:40 example kernel: [ 0.000000] Linux version 4.15.0-112-generic ([email protected]) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 (Ubuntu 4.15.0-112.113-generic 4.15.18)
Aug 16 20:37:40 example kernel: [ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.15.0-112-generic root=UUID=25e819f2-0cf9-4be3-855c-0e000e7b1648 ro quiet
Aug 16 20:37:40 example kernel: [ 0.000000] KERNEL supported cpus:
Aug 16 20:37:40 example kernel: [ 0.000000] Intel GenuineIntel
Aug 16 20:37:40 example kernel: [ 0.000000] AMD AuthenticAMD
Aug 16 20:37:40 example kernel: [ 0.000000] Centaur CentaurHauls
Aug 16 20:37:40 example kernel: [ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
Aug 16 20:37:40 example kernel: [ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
Aug 16 20:37:40 example kernel: [ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
Aug 16 20:37:40 example kernel: [ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
Aug 16 20:37:40 example kernel: [ 0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format.
Aug 16 20:37:40 example kernel: [ 0.000000] e820: BIOS-provided physical RAM map:
.............
Answer the question
In order to leave comments, you need to log in
If you want a quick shutdown, it will work slowly.
If you want it to work quickly, it will turn off slowly.
It's normal for a server to shut down longer than it takes to load.
In order to improve performance at different levels from the kernel to the application (services, database), all kinds of caches, deferred procedures, including delayed writing to disk, are included.
The system must wait until all running services complete their work properly.
Do you seriously want to optimize your server for reactive reboot? Disable caches, disable accelerators, set the minimum number of processes, turn off unnecessary threads, use OOM_Killer to maintain this minimum number of processes.
Author, your logs show nothing.
The interval between events is less than 1 minute.
It's not something to fight for.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question