[Bug 2059976] Re: unmkinitramfs is very slow on initrd from ubuntu 23.10+, solution proposed

2024-07-12 Thread Benjamin Drung
** Changed in: initramfs-tools (Ubuntu)
   Importance: Undecided => Medium

** Changed in: initramfs-tools (Ubuntu)
   Status: New => Triaged

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2059976

Title:
  unmkinitramfs is very slow on initrd from ubuntu 23.10+, solution
  proposed

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/2059976/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 2059976] Re: unmkinitramfs is very slow on initrd from ubuntu 23.10+, solution proposed

2024-04-15 Thread Benjamin Drung
I published the first version of the Rust implementation:
https://github.com/bdrung/icpio

icpio is 88 to 274 times faster than lsinitramfs. See README.md from
icpio.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2059976

Title:
  unmkinitramfs is very slow on initrd from ubuntu 23.10+, solution
  proposed

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/2059976/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 2059976] Re: unmkinitramfs is very slow on initrd from ubuntu 23.10+, solution proposed

2024-04-08 Thread Benjamin Drung
I could easily add an examine option to show what the initramfs consists
of, e.g.

$ init-cpio --examine /boot/initrd.img
0: uncompressed cpio
123: uncompressed cpio
456: uncompressed cpio
7890: zstd compressd cpio

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2059976

Title:
  unmkinitramfs is very slow on initrd from ubuntu 23.10+, solution
  proposed

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/2059976/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 2059976] Re: unmkinitramfs is very slow on initrd from ubuntu 23.10+, solution proposed

2024-04-08 Thread Adam Vodopjan
> I have implemented the listing of uncompressed cpio archives (roughly
120 lines of code). Now I have to add the decompression support

Finding offsets of the embedded archives is the only time consuming part
of the whole script. Mby it is better to create a separate tool, say
"scaninitramfs", to only list offsets and size of embedded archives,
just like my tools' "-s" option does, and use it in the original script?

Scan output can be of interest beyond unmkinitramfs. For example, if you
need to know the compression used in some initrd. With a scan tool you
can quickly get the offset of the compressed cpio and "dd .. | file .."

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2059976

Title:
  unmkinitramfs is very slow on initrd from ubuntu 23.10+, solution
  proposed

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/2059976/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 2059976] Re: unmkinitramfs is very slow on initrd from ubuntu 23.10+, solution proposed

2024-04-07 Thread Benjamin Drung
The result is promising. I tested on my Ryzen 5700G desktop with the
mantic initrd:

```
$ ls /boot/initrd.img-6.5.0-26-generic -l
-rw-r--r-- 1 root root 106445830 Mär 18 18:30 /boot/initrd.img-6.5.0-26-generic
$ time lsinitramfs /boot/initrd.img-6.5.0-26-generic > /dev/null

real0m13,960s
user0m17,944s
sys 0m5,098s
$ time ./unmkinitramfs-turbo -l /boot/initrd.img > /dev/null

real0m1,824s
user0m2,099s
sys 0m0,915s
$ time cargo run > /dev/null

real0m0,190s
user0m0,037s
sys 0m0,147s
$ cargo build --release
$ time target/release/init-cpio > /dev/null

real0m0,155s
user0m0,027s
sys 0m0,121s
```

Cutting the time to list the content from roughly 14 second down to 160
ms (1% of the time or factor of 90). Compared to your unmkinitramfs-
turbo it is still over 11 times faster.

Okay, I still have to add some consistency check (check the magic), but
I can still optimize the code. But before doing that, I need to clean up
the code to publish it somewhere.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2059976

Title:
  unmkinitramfs is very slow on initrd from ubuntu 23.10+, solution
  proposed

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/2059976/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 2059976] Re: unmkinitramfs is very slow on initrd from ubuntu 23.10+, solution proposed

2024-04-07 Thread Benjamin Drung
Your bug report triggered me to write a command that can list or extract
the content of the initramfs in Rust, since Rust would be a good
language for that task. I have implemented the listing of uncompressed
cpio archives (roughly 120 lines of code). Now I have to add the
decompression support. Then I will share my results.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2059976

Title:
  unmkinitramfs is very slow on initrd from ubuntu 23.10+, solution
  proposed

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/2059976/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 2059976] Re: unmkinitramfs is very slow on initrd from ubuntu 23.10+, solution proposed

2024-04-02 Thread Benjamin Drung
Thank you for taking the time to report this bug and helping to make
Ubuntu better. Speed improvements are welcome. Please submit those
changes (preferred in the smallest possible chunks).

Maybe we should rewrite splitinitramfs (or the complete script) in C.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2059976

Title:
  unmkinitramfs is very slow on initrd from ubuntu 23.10+, solution
  proposed

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/2059976/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs