View previous topic :: View next topic |
Author |
Message |
Carlosk465 Tux's lil' helper
Joined: 29 May 2022 Posts: 78
|
Posted: Tue Apr 02, 2024 3:59 pm Post subject: [SOLVED] How to turn off ext4lazyinit? |
|
|
I have searched a lot but I did not find the solution, I need to turn off ext4lazyinit so that the system starts faster, when plasma starts it stays stuck for about 3 seconds.
I have read that I need to force it to terminate but this does not work, it keeps starting at the beginning.
I don't like this lazy behavior, how can I disable it? I guess this is the same culprit why the progress bar when copying files doesn't work.
Any file system with which I can format my drive that works without needing "ext4lazyinit" (evidently this is only for ext4 but I suppose other formats will have their equivalent)?
By the way, I have a 2Tb HDD and about 25Gb free, just for data, this is the problematic HDD (I don't even have /home on this disk and it still makes the system slow when starting kde plasma.), because if I remove it it works fine, I have another 120 Gb SSD for the system. _________________ Sorry for my way of writing, I try to ensure that the translator translates correctly and does not change the words.
Last edited by Carlosk465 on Wed Apr 03, 2024 2:51 pm; edited 1 time in total |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5095 Location: Bavaria
|
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22633
|
Posted: Tue Apr 02, 2024 4:25 pm Post subject: |
|
|
According to man mke2fs, you can set lazy_itable_init=0 to instruct that the inode table be initialized immediately. This will make the mkfs slower.
Alternatively, let the kernel finish initializing the inode table. This is a one-time operation. Once finished, it will not need to be done again. |
|
Back to top |
|
|
Carlosk465 Tux's lil' helper
Joined: 29 May 2022 Posts: 78
|
Posted: Tue Apr 02, 2024 4:52 pm Post subject: |
|
|
Hu wrote: | Alternatively, let the kernel finish initializing the inode table. This is a one-time operation. Once finished, it will not need to be done again. |
I did this, but it didn't take a minute, it still starts every time but after a few minutes it stops appearing in the list of processes. Eeven a simple "ls" takes a long time if I enter through tty. _________________ Sorry for my way of writing, I try to ensure that the translator translates correctly and does not change the words. |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5095 Location: Bavaria
|
|
Back to top |
|
|
Carlosk465 Tux's lil' helper
Joined: 29 May 2022 Posts: 78
|
Posted: Tue Apr 02, 2024 6:16 pm Post subject: |
|
|
pietinger wrote: | Have you done this ?
mount -o init_itable=0 <partition> <mountpoint> |
Wasn't this the command to finish creating the inodes? It only took a few seconds. _________________ Sorry for my way of writing, I try to ensure that the translator translates correctly and does not change the words. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22633
|
Posted: Tue Apr 02, 2024 8:31 pm Post subject: |
|
|
Yes, it is. How did you determine that inode creation is not finished? |
|
Back to top |
|
|
Carlosk465 Tux's lil' helper
Joined: 29 May 2022 Posts: 78
|
Posted: Tue Apr 02, 2024 10:07 pm Post subject: |
|
|
Because I have high disk activity only at power on, then it goes down and the process disappears from the list, I have also checked the file system, I have seen the SMART data. and I can't think of anything else it could be. _________________ Sorry for my way of writing, I try to ensure that the translator translates correctly and does not change the words. |
|
Back to top |
|
|
Adarion Tux's lil' helper
Joined: 22 Aug 2005 Posts: 78
|
Posted: Wed Apr 03, 2024 10:39 am Post subject: |
|
|
(my 2 cents:)
as far as I know (and always do) during FS creation
# mkfs.ext4 -E lazy_itable_init=0,lazy_journal_init=0 -other-options /dev/...
Other than that, as people wrote, it should be a one time process, so after mounting the FS it will churn on the HDD for a while and then (hopefully) be finished.
Not sure if it can be done also via tune2fs or something.
PS: To speed up things there can also be many other issues and bottlenecks.
setting "noatime" in the fstab mount options can speed up things a little (and saves write cycles on SSDs). One can optimize things during fsck and back in the days of HDDs there was also e4rat (which is not improving things on flash media, though).
But there could also be other things slowing down KDE upbringing. _________________ stop tcpa, swpatents, corrupt politicians and other scary stuff |
|
Back to top |
|
|
tholin Apprentice
Joined: 04 Oct 2008 Posts: 204
|
Posted: Wed Apr 03, 2024 12:25 pm Post subject: |
|
|
the ext4lazyinit kernel thread is used for two things:
* do lazy init of ext4 inoded after mkfs.
* prefetch block bitmaps on every mount so that the block allocator can make better decisions early on.
You are probably seeing the prefetch. This feature was turn on by default in kernel v5.13. If you don't like it you could use the ext4 mount option "no_prefetch_block_bitmaps".
https://github.com/torvalds/linux/commit/21175ca434c5d49509b73cf473618b01b0b85437 |
|
Back to top |
|
|
Carlosk465 Tux's lil' helper
Joined: 29 May 2022 Posts: 78
|
Posted: Wed Apr 03, 2024 2:50 pm Post subject: |
|
|
tholin wrote: | the ext4lazyinit kernel thread is used for two things:
* do lazy init of ext4 inoded after mkfs.
* prefetch block bitmaps on every mount so that the block allocator can make better decisions early on.
You are probably seeing the prefetch. This feature was turn on by default in kernel v5.13. If you don't like it you could use the ext4 mount option "no_prefetch_block_bitmaps".
https://github.com/torvalds/linux/commit/21175ca434c5d49509b73cf473618b01b0b85437 |
It worked, now the startup time is super fast, no_prefetch_block_bitmaps was the solution. _________________ Sorry for my way of writing, I try to ensure that the translator translates correctly and does not change the words. |
|
Back to top |
|
|
|