Bug 29422 - removing old kernel packages is EXTREMELY slow
Summary: removing old kernel packages is EXTREMELY slow
Status: RESOLVED WORKSFORME
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 8
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-28 17:09 CEST by Pierre Fortin
Modified: 2021-08-29 03:14 CEST (History)
1 user (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments
Script to remove old kernels (1.41 KB, text/plain)
2021-08-28 23:40 CEST, Dave Hodgins
Details

Description Pierre Fortin 2021-08-28 17:09:18 CEST
Description of problem: While working on 29418, I noticed that there are 65 kernels sitting in /boot.  Trying to remove old ones (via mcc's Software Management), just de-selecting a kernel takes a long time only to come up with 2 other packages to remove.  I de-selected 4-5 kernels after several minutes, then hitting Apply takes a LONG time...  I'm still waiting for these removals to complete after over an hour on this aging; but still very capable system:
$ inxi -CMSGxx
System:    Host: prf.pfortin.com Kernel: 5.10.56-server-1.mga8 x86_64 bits: 64 compiler: gcc v: 10.3.0 Console: tty 23 
           wm: kwin_x11 DM: SDDM Distro: Mageia 8 mga8 
Machine:   Type: Laptop System: Dell product: Precision M6800 v: 00 serial: 3JGYG12 Chassis: type: 9 serial: 3JGYG12 
           Mobo: Dell model: 0XWC1M serial: /3JGYG12/CN129634B401E3/ UEFI: Dell v: A25 date: 10/08/2018 
CPU:       Info: Quad Core model: Intel Core i7-4710MQ bits: 64 type: MT MCP arch: Haswell rev: 3 L1 cache: 256 KiB 
           L2 cache: 6 MiB L3 cache: 5.9 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 39910 
           Speed: 3369 MHz min/max: 800/3500 MHz Core speeds (MHz): 1: 3369 2: 3251 3: 3249 4: 3351 5: 3359 6: 3299 7: 3265 
           8: 3355 
Graphics:  Device-1: Intel 4th Gen Core Processor Integrated Graphics vendor: Dell driver: i915 v: kernel bus ID: 00:02.0 
           chip ID: 8086:0416 
           Device-2: Advanced Micro Devices [AMD/ATI] Saturn XT [FirePro M6100] vendor: Dell driver: amdgpu v: kernel 
           bus ID: 01:00.0 chip ID: 1002:6640 
           Device-3: Sunplus Innovation Laptop_Integrated_Webcam_HD type: USB driver: uvcvideo bus ID: 1-1.5:3 
           chip ID: 1bcf:2984 
           Display: server: Mageia X.org 1.20.12 compositor: kwin_x11 driver: amdgpu,ati,intel 
           unloaded: fbdev,modesetting,vesa resolution: 1366x768~60Hz s-dpi: 96 
           OpenGL: renderer: llvmpipe (LLVM 11.0.1 256 bits) v: 4.5 Mesa 21.2.1 compat-v: 3.1 direct render: Yes 





Version-Release number of selected component (if applicable):


How reproducible: always


Steps to Reproduce:
1. de-select 1 or more packages to remove
2. Apply
3. W..A..I..T......

PS: The latest loaded kernel is kernel-server-5.10.56-1.mga8-1-1.mga8; but it should be kernel-server-5.10.60-2.mga8-1-1.mga8...  Beginning to wonder if this latest kernel is ignored because I have over 64 (power of 2) installed kernel packages...?

PPS: I've also noticed that some updates speed through the installs; but take a very long time removing old packages...
Comment 1 Dave Hodgins 2021-08-28 23:40:55 CEST
Created attachment 12921 [details]
Script to remove old kernels

Removing packages is slow due to the way the rpm database is updated. It's done
the way it is to minimize the chance of damage should anything interrupt the
updating, such as a reboot or power failure.

Attached is the script I use to remove old kernels and associated packages.

CC: (none) => davidwhodgins

Comment 2 Pierre Fortin 2021-08-29 03:14:46 CEST
Thanks!!

Status: NEW => RESOLVED
Resolution: (none) => WORKSFORME


Note You need to log in before you can comment on or make changes to this bug.