Re: Do I have to do anything to make sure ext4lazyinit works as being advertised ?
at bottom :- On 01/02/2017, Lennart Sorensenwrote: > On Wed, Feb 01, 2017 at 02:27:39PM +0530, shirish शिरीष wrote: >>> My patch was fix for bug which was spotted on large disk arrays, >>> 36 in my case. So itable initialization was active all the time >>> while holding global lock. >> >> From this, it seems there aren't any limits except for 10% of whatever >> the link between > > Why would a large array make a difference to the algorithm if it aims > to use 1/10 of the bandwidth? Hi Lennart, I dunno (not an expert in large disk arrays) . For this you would have to look at https://patchwork.kernel.org/patch/9285509/ titled - "Patchwork ext4/023: add regression test for ext4lazyinit_task deadlock V2" >From the title it seems some sort of deadlock was occurring. For what reason can probably be garnered by reading the code or/and talking with Dmitry Monakhov who wrote that patch. FWIW he wrote couple of patches this month as well - https://patchwork.kernel.org/project/fstests/list/?submitter=172391 > -- > Len Sorensen > -- Regards, Shirish Agarwal शिरीष अग्रवाल My quotes in this email licensed under CC 3.0 http://creativecommons.org/licenses/by-nc/3.0/ http://flossexperiences.wordpress.com EB80 462B 08E1 A0DE A73A 2C2F 9F3D C7A4 E1C4 D2D8
Re: Do I have to do anything to make sure ext4lazyinit works as being advertised ?
On Wed, Feb 01, 2017 at 02:27:39PM +0530, shirish शिरीष wrote: > Basically the article's statement is wrong. > There is no such thing as explicit itable initialization IO bandwidth > restriction in MB/s. itable initialization rate is controlled by init_itable=N > see: https://www.kernel.org/doc/Documentation/filesystems/ext4.txt > """ > The lazy itable init code will wait n times the > number of milliseconds it took to zero out the > previous block group's inode table. This > minimizes the impact on the system performance > while file system's inode table is being initialized. > """ > By default init_itable=10, so it use 1/10th bandwidth of the disk. > And if we back to original article this means author used generic > HDD with 160Mb/s sequential write performance. Oh OK, that sounds even better. > My patch was fix for bug which was spotted on large disk arrays, > 36 in my case. So itable initialization was active all the time > while holding global lock. > > From this, it seems there aren't any limits except for 10% of whatever > the link between Why would a large array make a difference to the algorithm if it aims to use 1/10 of the bandwidth? -- Len Sorensen
Re: Do I have to do anything to make sure ext4lazyinit works as being advertised ?
On Wed, Feb 01, 2017 at 04:53:34AM +0530, shirish शिरीष wrote: > hmm From what little I understand, it always the slowest interface > that needs to be supported. > > And IIUC , in ext4lazyinit's case it is probably some of the MMC cards > due to which the 16 MB/S transmission is kept - although some of them > are at 104 MB/S as well. > > https://en.wikipedia.org/wiki/MultiMediaCard#Table > > Whereas USB are at - > > https://en.wikipedia.org/wiki/USB_3.1 > > USB 2.0 - 35 MB/S > > USB 3.0 - 400 MB/S > > USB 3.1 - Gen 1 - 400 MB/S > > USB 3.2 - Gen 2 - 1280 MB/S > > For HDD - > > https://en.wikipedia.org/wiki/Serial_ATA > > SATA 1 - starts at 150 MB/S Well they wanted to keep the rate low enough that you could still use the disk while it was doing the background init work. Most disks can do more than 16MB/s so that leaves some for other use, like doing your install. > Another query - if instead ext4lazyinit IF - > > mkfs.ext4 -E lazy_itable_init=0,lazy_journal_init=0 /dev/mapper/fc-root > > is applied then would it would start formatting and making inodes at a > much faster rate - i.e. slowest between the USB Drive and HDD in a > typical workstation - which probably would be a jump 3-4 times the > speed that ext4lazyinit would employ. Well it would have to do the whole init up front, meaning you have to wait for all of it to finish before doing the install. > WDYT ? > > If yes, how as a user could I apply/use the above command while using > debian-installer ? Not sure. It has been a while since I poked at the installer code. I don't think it's worth trying to poke at it. I think the default behavour sounce very sensible and I doubt for most use cases doing it differently would be an improvement, most like it would make it worse. -- Len Sorensen
Re: Do I have to do anything to make sure ext4lazyinit works as being advertised ?
Hi all, Please see below - shirish शिरीषwrites: > Dear Dmitry, > > I saw your patch about regression testing for ext4lazyinit > > https://patchwork.kernel.org/patch/9285509/ - that is where I got your mail > id. > > > I am a bit curious to know as to why the author/ess chose to > keep 16 MB/S as the highest speed ? > > https://www.thomas-krenn.com/en/wiki/Ext4_Filesystem Basically the article's statement is wrong. There is no such thing as explicit itable initialization IO bandwidth restriction in MB/s. itable initialization rate is controlled by init_itable=N see: https://www.kernel.org/doc/Documentation/filesystems/ext4.txt """ The lazy itable init code will wait n times the number of milliseconds it took to zero out the previous block group's inode table. This minimizes the impact on the system performance while file system's inode table is being initialized. """ By default init_itable=10, so it use 1/10th bandwidth of the disk. And if we back to original article this means author used generic HDD with 160Mb/s sequential write performance. My patch was fix for bug which was spotted on large disk arrays, 36 in my case. So itable initialization was active all the time while holding global lock. >From this, it seems there aren't any limits except for 10% of whatever the link between On 01/02/2017, shirish शिरीष wrote: > in-line :- > > On 01/02/2017, Lennart Sorensen wrote: >> On Wed, Feb 01, 2017 at 12:46:48AM +0530, shirish शिरीष wrote: > > > >>> Now I have few queries - >>> >>> a. Are my assumptions wrong ? >> >> About the doing the init on a future boot, yes you are wrong. > > Ah...ok. > > > >> >> 2.6.37 apparently. > > My bad ... > > > >> >> I believe it is on by default. However, the lazy init takes >> place in the background on first mount (so that means during >> the install), not some later boot. It apparently will use >> up to 16MB/s for initializing in the background according to >> https://www.thomas-krenn.com/en/wiki/Ext4_Filesystem >> >> I suspect it is already doing the best you are going to get. > > hmm From what little I understand, it always the slowest interface > that needs to be supported. > > And IIUC , in ext4lazyinit's case it is probably some of the MMC cards > due to which the 16 MB/S transmission is kept - although some of them > are at 104 MB/S as well. > > https://en.wikipedia.org/wiki/MultiMediaCard#Table > > Whereas USB are at - > > https://en.wikipedia.org/wiki/USB_3.1 > > USB 2.0 - 35 MB/S > > USB 3.0 - 400 MB/S > > USB 3.1 - Gen 1 - 400 MB/S > > USB 3.2 - Gen 2 - 1280 MB/S > > For HDD - > > https://en.wikipedia.org/wiki/Serial_ATA > > SATA 1 - starts at 150 MB/S > > Another query - if instead ext4lazyinit IF - > > mkfs.ext4 -E lazy_itable_init=0,lazy_journal_init=0 /dev/mapper/fc-root > > is applied then would it would start formatting and making inodes at a > much faster rate - i.e. slowest between the USB Drive and HDD in a > typical workstation - which probably would be a jump 3-4 times the > speed that ext4lazyinit would employ. > > WDYT ? > > If yes, how as a user could I apply/use the above command while using > debian-installer ? > >> -- >> Len Sorensen >> > > > -- > Regards, > Shirish Agarwal शिरीष अग्रवाल > My quotes in this email licensed under CC 3.0 > http://creativecommons.org/licenses/by-nc/3.0/ > http://flossexperiences.wordpress.com > EB80 462B 08E1 A0DE A73A 2C2F 9F3D C7A4 E1C4 D2D8 > -- Regards, Shirish Agarwal शिरीष अग्रवाल My quotes in this email licensed under CC 3.0 http://creativecommons.org/licenses/by-nc/3.0/ http://flossexperiences.wordpress.com EB80 462B 08E1 A0DE A73A 2C2F 9F3D C7A4 E1C4 D2D8
Re: Do I have to do anything to make sure ext4lazyinit works as being advertised ?
in-line :- On 01/02/2017, Lennart Sorensenwrote: > On Wed, Feb 01, 2017 at 12:46:48AM +0530, shirish शिरीष wrote: >> Now I have few queries - >> >> a. Are my assumptions wrong ? > > About the doing the init on a future boot, yes you are wrong. Ah...ok. > > 2.6.37 apparently. My bad ... > > I believe it is on by default. However, the lazy init takes > place in the background on first mount (so that means during > the install), not some later boot. It apparently will use > up to 16MB/s for initializing in the background according to > https://www.thomas-krenn.com/en/wiki/Ext4_Filesystem > > I suspect it is already doing the best you are going to get. hmm From what little I understand, it always the slowest interface that needs to be supported. And IIUC , in ext4lazyinit's case it is probably some of the MMC cards due to which the 16 MB/S transmission is kept - although some of them are at 104 MB/S as well. https://en.wikipedia.org/wiki/MultiMediaCard#Table Whereas USB are at - https://en.wikipedia.org/wiki/USB_3.1 USB 2.0 - 35 MB/S USB 3.0 - 400 MB/S USB 3.1 - Gen 1 - 400 MB/S USB 3.2 - Gen 2 - 1280 MB/S For HDD - https://en.wikipedia.org/wiki/Serial_ATA SATA 1 - starts at 150 MB/S Another query - if instead ext4lazyinit IF - mkfs.ext4 -E lazy_itable_init=0,lazy_journal_init=0 /dev/mapper/fc-root is applied then would it would start formatting and making inodes at a much faster rate - i.e. slowest between the USB Drive and HDD in a typical workstation - which probably would be a jump 3-4 times the speed that ext4lazyinit would employ. WDYT ? If yes, how as a user could I apply/use the above command while using debian-installer ? > -- > Len Sorensen > -- Regards, Shirish Agarwal शिरीष अग्रवाल My quotes in this email licensed under CC 3.0 http://creativecommons.org/licenses/by-nc/3.0/ http://flossexperiences.wordpress.com EB80 462B 08E1 A0DE A73A 2C2F 9F3D C7A4 E1C4 D2D8
Re: Do I have to do anything to make sure ext4lazyinit works as being advertised ?
On Wed, Feb 01, 2017 at 12:46:48AM +0530, shirish शिरीष wrote: > Hi all, > > Warning - is a bit of a long read. > > >From what all I read and understood, ext4lazyinit simply makes you > start using the hdd without creating all the inodes for your system. > The only way that you know ext4lazyinit is working is when you see it > via iotop. But when using debian-installer is there something I could > do, umm...some switch or something to make sure that ext4lazyinit > works in the background ? > > To elaborate it a bit further. Let's say I get one of those monster > drives (which are probably insanely expensive atm) > https://www.hgst.com/products/hard-drives/ultrastar-he12 > > While I would go bankrupt if I got this sort of hdd today, such drives > were probably is the reason why ext4lazyinit was invented. > > FWIW I would be working with a 3/4 TB HDD in the near future hence > want to be ready before-hand. > > Now let's say I use the current debian-installer for stretch - say > either the net installer or the CD version - > > http://cdimage.debian.org/cdimage/stretch_di_rc1/amd64/iso-cd/debian-stretch-DI-rc1-amd64-netinst.iso > > http://cdimage.debian.org/cdimage/stretch_di_rc1/amd64/iso-cd/debian-stretch-DI-rc1-amd64-xfce-CD-1.iso > > The reason to use ext4lazyinit is light at my end is pretty erratic > and many a times a UPS is not available. > > Having ext4lazyinit would be great if I am able to finish the > installation fast and let it do inode creation on future boot-ups > while I do the rest of the configuration, setting up the machine. > updating/upgrading packages etc. > > Now I have few queries - > > a. Are my assumptions wrong ? About the doing the init on a future boot, yes you are wrong. > b. I don't know how much part of this question is debian-kernel > related and how much of it is debian-installer related hence sending > the mail to both the lists ? > > AIUI ext4lazyinit is a filesystem utility created for kernel during > the end of 2.6.32.x series, hence couple of years ago - hence it > relates to debian-kernel the most. 2.6.37 apparently. > Current kernel is 4.9 in Debian stretch - > > [$] uname -r > > 4.9.0-1-amd64 > > I do not know much of debian-installer support is/was needed to make > sure the feature works as desired - hence the need to also mail > debian-boot. > > I ask as I still have memories of 2-3 years sitting all night long at > friend's places who had access to an offline UPS to partition, format > and then do the installation. The partitioning and formatting taking > the most time even with the Large-File Support under ext3. > > Looking forward to know. I believe it is on by default. However, the lazy init takes place in the background on first mount (so that means during the install), not some later boot. It apparently will use up to 16MB/s for initializing in the background according to https://www.thomas-krenn.com/en/wiki/Ext4_Filesystem I suspect it is already doing the best you are going to get. -- Len Sorensen
Do I have to do anything to make sure ext4lazyinit works as being advertised ?
Hi all, Warning - is a bit of a long read. >From what all I read and understood, ext4lazyinit simply makes you start using the hdd without creating all the inodes for your system. The only way that you know ext4lazyinit is working is when you see it via iotop. But when using debian-installer is there something I could do, umm...some switch or something to make sure that ext4lazyinit works in the background ? To elaborate it a bit further. Let's say I get one of those monster drives (which are probably insanely expensive atm) https://www.hgst.com/products/hard-drives/ultrastar-he12 While I would go bankrupt if I got this sort of hdd today, such drives were probably is the reason why ext4lazyinit was invented. FWIW I would be working with a 3/4 TB HDD in the near future hence want to be ready before-hand. Now let's say I use the current debian-installer for stretch - say either the net installer or the CD version - http://cdimage.debian.org/cdimage/stretch_di_rc1/amd64/iso-cd/debian-stretch-DI-rc1-amd64-netinst.iso http://cdimage.debian.org/cdimage/stretch_di_rc1/amd64/iso-cd/debian-stretch-DI-rc1-amd64-xfce-CD-1.iso The reason to use ext4lazyinit is light at my end is pretty erratic and many a times a UPS is not available. Having ext4lazyinit would be great if I am able to finish the installation fast and let it do inode creation on future boot-ups while I do the rest of the configuration, setting up the machine. updating/upgrading packages etc. Now I have few queries - a. Are my assumptions wrong ? b. I don't know how much part of this question is debian-kernel related and how much of it is debian-installer related hence sending the mail to both the lists ? AIUI ext4lazyinit is a filesystem utility created for kernel during the end of 2.6.32.x series, hence couple of years ago - hence it relates to debian-kernel the most. Current kernel is 4.9 in Debian stretch - [$] uname -r 4.9.0-1-amd64 I do not know much of debian-installer support is/was needed to make sure the feature works as desired - hence the need to also mail debian-boot. I ask as I still have memories of 2-3 years sitting all night long at friend's places who had access to an offline UPS to partition, format and then do the installation. The partitioning and formatting taking the most time even with the Large-File Support under ext3. Looking forward to know. -- Regards, Shirish Agarwal शिरीष अग्रवाल My quotes in this email licensed under CC 3.0 http://creativecommons.org/licenses/by-nc/3.0/ http://flossexperiences.wordpress.com EB80 462B 08E1 A0DE A73A 2C2F 9F3D C7A4 E1C4 D2D8