2023-02-28 13:00:14

by Paul Menzel

[permalink] [raw]
Subject: Long mount time of ESP FAT partition

Dear Linux folks,


On a Dell Precision 3540 with Debian sid/unstable, Linux 6.1.12 takes
1.5 seconds to mount the 128 MB FAT partition `/dev/nvme0n1p1` to
`/boot/efi`.

```
$ lsblk --fs
NAME FSTYPE FSVER LABEL UUID
FSAVAIL FSUSE% MOUNTPOINTS
nvme0n1

├─nvme0n1p1 vfat FAT32 ESP 381C-FF6C
49.2M 61% /boot/efi
├─nvme0n1p2 crypto_LUKS 2
b88be798-13e3-4884-9748-bf7a23f0ae87
│ └─nvme0n1p2_crypt ext4 1.0
c9342a55-b747-4442-b2f4-bc03eb7a51cf 733G 17% /
└─nvme0n1p3 ext4 1.0 boot
16743b63-5a4f-404e-a46e-2db5add63980 303.6M 10% /boot
$ more /etc/fstab
[…]
/dev/disk/by-uuid/c9342a55-b747-4442-b2f4-bc03eb7a51cf / auto
defaults,errors=remount-ro 0 1
/dev/disk/by-uuid/16743b63-5a4f-404e-a46e-2db5add63980 /boot auto
defaults,errors=remount-ro 0 1
UUID=381C-FF6C /boot/efi vfat umask=0022 0 1
$ journalctl -b -u boot.mount -o short-precise
Feb 28 11:19:14.006616 morley systemd[1]: Mounting boot.mount - /boot...
Feb 28 11:19:14.013246 morley systemd[1]: Mounted boot.mount - /boot.
$ journalctl -b -u boot-efi.mount -o short-precise
Feb 28 11:19:14.014469 morley systemd[1]: Mounting boot-efi.mount -
/boot/efi...
Feb 28 11:19:15.550770 morley systemd[1]: Mounted boot-efi.mount -
/boot/efi.
```

On a Dell Latitude E7250 mounting a 128 MB FAT partition `/dev/sda1`
(SAMSUNG SSD PM851 mSATA 256GB) only takes 90 ms.

```
$ journalctl -u boot-efi.mount -o short-monotonic -b
[ 10.693263] ersatz systemd[1]: Mounting boot-efi.mount - /boot/efi...
[ 10.783176] ersatz systemd[1]: Mounted boot-efi.mount - /boot/efi.
```


Kind regards,

Paul


2023-03-01 20:17:08

by OGAWA Hirofumi

[permalink] [raw]
Subject: Re: Long mount time of ESP FAT partition

Paul Menzel <[email protected]> writes:

> $ journalctl -b -u boot-efi.mount -o short-precise
> Feb 28 11:19:14.014469 morley systemd[1]: Mounting boot-efi.mount -
> /boot/efi...
> Feb 28 11:19:15.550770 morley systemd[1]: Mounted boot-efi.mount -
> /boot/efi.
> ```

This mount is always slow? For example, simply unmount and mount by
command is also slow after finished boot sequence?

Since that operation of log would include too many syscalls, we have to
find which syscall is slow. Then check the detail of it (e.g. I/O
request).

Thanks.
--
OGAWA Hirofumi <[email protected]>