On 24/01/2022 00:30, Robert-André Mauchin wrote:

During the installation, all the files are copied, then renamed by rpm (no idea why it works like this).

Probably so the file is replaced atomically, and you either
have the old or new version but never a partial version.

It works fast in a Mock chroot but incredibly slow on bare metal.

I've done a small test of moving files:

[root@cassini icons]# mkdir test
[root@cassini icons]# for (( i = 0; i < 10000; i++ )) do > test/file_$i; done
[root@cassini icons]# cd test

On host:

time $(for f in *; do     mv "$f" "${f%}.txt"; done)
real    2m3,500s
user    0m3,966s
sys     2m0,431s

In nspawn container:

<mock-chroot> sh-5.1# time $(for f in *; do     mv "$f" "${f%}.txt"; done)
real    0m6.702s
user    0m4.237s
sys     0m3.344s

Since papirus-icon-theme contains more than 100,000 (small) files, it is a problem. One minute of waiting is ok, 20 mn is not.

What can cause this? I read that nspawn virtualizes the file system, could it be file system related on the host? (I use btrfs btw)

Do you have the nosync plugin enabled in your mock? That
will shim system calls that try and sync to disk and suppress
the actual sync in the name of greater performance.

Tom

--
Tom Hughes (t...@compton.nu)
http://compton.nu/
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to