WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Detailed info on how extencions(.tcz) are mounted/loaded.  (Read 238 times)

Offline TeMaToS

  • Newbie
  • *
  • Posts: 7
Detailed info on how extencions(.tcz) are mounted/loaded.
« on: September 25, 2024, 07:54:58 PM »
    I finally understand, that if .tcz was loaded from any drive and not from root derived directory(which is RAM field) it is not installed to RAM, but rather linked through virtual mounted drive. And it is awesome, exactly what I wanted, OS on one drive and apps and files on another. I am very gratefull for that.
    But, I am concerned that it is not so fast as could be, because according to docs, they are compressed too.
    So my question is. How it is mounted in low details? If it decompresses package, then where it holds decompressed files? If no, is it decompress file on each use of its files?
Because I think decompression is what slows down boot time, if there is included a lot of packages.

    Thank you for attantion, good luck and take care;)

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1223
Re: Detailed info on how extencions(.tcz) are mounted/loaded.
« Reply #1 on: September 25, 2024, 08:01:45 PM »
The extensions are loop mounted.  The kernel handles the  decompression automatically.

Offline TeMaToS

  • Newbie
  • *
  • Posts: 7
Re: Detailed info on how extencions(.tcz) are mounted/loaded.
« Reply #2 on: September 25, 2024, 08:12:46 PM »
Thank you.
But where it decompress files? And when?
Info that i found is next:
    1) .tcz packages are not decompressed during mount;
    2) only files that are used on the fly are decompressed automatically;
    3) decompressed files located in RAM temporary during usage;

Is it right statements?

Also, is it possible to avoid compression just in case?
« Last Edit: September 25, 2024, 08:19:05 PM by TeMaToS »

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1223
Re: Detailed info on how extencions(.tcz) are mounted/loaded.
« Reply #3 on: September 25, 2024, 08:51:51 PM »
That’s all correct. The initrd is compressed too. Compression is our standard.  Only way to avoid it it’s to build your own initrd and your own extensions.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11026
Re: Detailed info on how extencions(.tcz) are mounted/loaded.
« Reply #4 on: September 26, 2024, 01:55:02 AM »
Also, unless your storage speed is very fast and cpu slow, compression is almost always worth it. It takes longer to read the larger size off disk than to read and decompress a compressed one.
The only barriers that can stop you are the ones you create yourself.

Offline TeMaToS

  • Newbie
  • *
  • Posts: 7
Re: Detailed info on how extencions(.tcz) are mounted/loaded.
« Reply #5 on: September 27, 2024, 02:24:10 AM »
    Oh, great thought. Thank you guys.
    I was booting from USB 2.0, and for full setup for coding Vulkan apps 1:50 mins to boot is good result. In one of regular distros on desktop boot time sometimes much longer. So after swap to USB 3.0 i think it will be good enough.
    But what do you think about making another type of loader like  tce-loader, which will be really unloading apps to specific drive? Because I think mount process is consuming some time in case of a lot of pkgs.
    For core and necessary stuff to be mounted its not a problem, but to have option to have extensions persistance could be great deal for those who have slow devices. And each boot just make sym links like with mounted pkgs.
    I can try to do that and maybe you would don't mind to add it to new releases. Just like additional option for those who wants.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11026
Re: Detailed info on how extencions(.tcz) are mounted/loaded.
« Reply #6 on: September 27, 2024, 02:47:26 AM »
If you want an extracted setup, perhaps another distro would fit your needs better? Keeping the extensions separate is a "core" idea of TC.
The only barriers that can stop you are the ones you create yourself.

Offline gadget42

  • Hero Member
  • *****
  • Posts: 717
Re: Detailed info on how extencions(.tcz) are mounted/loaded.
« Reply #7 on: September 27, 2024, 05:00:59 AM »
there are several ways to reduce your _boot-time_ (always start from known power off completely state, commonly referred to as a "cold-boot")

for the most accurate timings you will need to remove every component that is not essential for very basic hardware operation.
(no drives of any kind/type, no unnecessary pci/pcmcia/usb/etc cards/boards/dongles/etc, and the BIOS reset to factory defaults)

once you have recorded timings for this basic assembly to repeatedly come up from a cold-boot, then add in each item one at a time and check/record the new timings.

usually it becomes obvious where the bottlenecks _really_ are.

even the amount of ram in a machine makes a difference(cold-boot a workstation with three-digit ram numbers for example).

storage cards and thumbdrives can behave in strange ways, especially with dirty/poor connections and/or insufficient voltage/current.

also as an additional example see previous post/thread:
https://forum.tinycorelinux.net/index.php/topic,26176.msg168388.html#msg168388

as always, your mileage will vary

20240927-0403am-cdt-usa-modified: corrected grammar/spelling...sigh...
« Last Edit: September 27, 2024, 05:03:21 AM by gadget42 »
The fluctuation theorem has long been known for a sudden switch of the Hamiltonian of a classical system Z54 . For a quantum system with a Hamiltonian changing from... https://forum.tinycorelinux.net/index.php/topic,25972.msg166580.html#msg166580

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11512
Re: Detailed info on how extencions(.tcz) are mounted/loaded.
« Reply #8 on: September 27, 2024, 10:19:50 AM »
Hi TeMaToS
Add the following boot code:
Code: [Select]
showappsYou will see each extension name printed to the screen in yellow
text after it has been loaded during the boot process.

This will allow you to time how much time is being spent loading
your extensions.

If you added a lot of or large files to your backup, that will impact
your shut down and boot times.

If you don't have a persistent /home and /opt they are getting backed
up and restored. Having a lot of data in them will then also impact
your shut down and boot times.

Offline TeMaToS

  • Newbie
  • *
  • Posts: 7
Re: Detailed info on how extencions(.tcz) are mounted/loaded.
« Reply #9 on: Today at 12:50:08 AM »
If you want an extracted setup, perhaps another distro would fit your needs better? Keeping the extensions separate is a "core" idea of TC.

    I admire TCL main features *___________*.
    And what I proposed to make is just optional feature. Because i saw multiple times when people facing long boot times, so it could really help them. I understood pros and cons, but for some people it would be great to be able to install for example huge apps without compression and some with.
    Runtime should be slower but it could be less noticable, because not all apps running at the same time, but booting of all apps is done by one shot. It could be just .tcz extension, that can optionally  be installed.
    And most importantly if you don't like that idea, of course I will be not insisting.
« Last Edit: Today at 12:51:50 AM by TeMaToS »

Offline TeMaToS

  • Newbie
  • *
  • Posts: 7
Re: Detailed info on how extencions(.tcz) are mounted/loaded.
« Reply #10 on: Today at 01:12:43 AM »
there are several ways to reduce your _boot-time_ (always start from known power off completely state, commonly referred to as a "cold-boot")

for the most accurate timings you will need to remove every component that is not essential for very basic hardware operation.
(no drives of any kind/type, no unnecessary pci/pcmcia/usb/etc cards/boards/dongles/etc, and the BIOS reset to factory defaults)

once you have recorded timings for this basic assembly to repeatedly come up from a cold-boot, then add in each item one at a time and check/record the new timings.

usually it becomes obvious where the bottlenecks _really_ are.

even the amount of ram in a machine makes a difference(cold-boot a workstation with three-digit ram numbers for example).

storage cards and thumbdrives can behave in strange ways, especially with dirty/poor connections and/or insufficient voltage/current.

also as an additional example see previous post/thread:
https://forum.tinycorelinux.net/index.php/topic,26176.msg168388.html#msg168388

as always, your mileage will vary

20240927-0403am-cdt-usa-modified: corrected grammar/spelling...sigh...

Great, thank you sir :3

   Btw i spent today all day on interactive installer for bundles of extensions. It has interactive CLI interface and you can create your bundles like: programming, drawing, networking and than just pick each with digit keys.
   Maybe its not so useful but for me sounds convenient, i am curious to practice with it and sounds more convenient than making shell scripts for each bundle and exec each one by one. So if anybody would be interested in it, would be glad to share ;)

Offline TeMaToS

  • Newbie
  • *
  • Posts: 7
Re: Detailed info on how extencions(.tcz) are mounted/loaded.
« Reply #11 on: Today at 01:23:22 AM »
Hi TeMaToS
Add the following boot code:
Code: [Select]
showappsYou will see each extension name printed to the screen in yellow
text after it has been loaded during the boot process.

This will allow you to time how much time is being spent loading
your extensions.

If you added a lot of or large files to your backup, that will impact
your shut down and boot times.

If you don't have a persistent /home and /opt they are getting backed
up and restored. Having a lot of data in them will then also impact
your shut down and boot times.
Greetings, Rich:)
Thank you.
   Yeah, I read about showapps boot code and others in docs, thank you for detailed explanation. But I see response anyway, like OK or already installed. Not sure is it showed up for default extensions, but i used my custom shell script for installing my extensions and triggering it in onboot.sh.

Yep, I was aware of it, so i did persistance:tce, opt, home;

Offline TeMaToS

  • Newbie
  • *
  • Posts: 7
Re: Detailed info on how extencions(.tcz) are mounted/loaded.
« Reply #12 on: Today at 01:28:16 AM »
P.S. sorry if non-topic a bit, let me know if so and i'll keep in mind that.