WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Save boot time when mounting big extensions  (Read 2878 times)

Offline zab

  • Jr. Member
  • **
  • Posts: 51
Save boot time when mounting big extensions
« on: June 22, 2010, 11:41:55 PM »
Hi List,

My private extensions repo is increasing (which is good).
Mainly, 2 of my mandatory extensions are very big (respectively ~40MB and ~53MB) and
they are eating all my boot time (more that 26sec to boot with them, and less than 10sec without).

How one can speedup the boot time but still have this 2 extensions loaded?

Regards
Zab

Offline althalus

  • Sr. Member
  • ****
  • Posts: 351
Re: Save boot time when mounting big extensions
« Reply #1 on: June 22, 2010, 11:55:00 PM »
Easiest way is to not load the extensions til you need them. Perhaps consider using ondemand?

EDIT: Another approach for things that you dont launch via a menu item is to do something like this:
Code: [Select]
mkdir /home/tc/.local/bin -p
cat > /home/tc/.local/bin/example << EOF
#!/bin/sh
[ -e /usr/local/tce.installed/example-extension ] || tce-load -i `cat /opt/.tce_dir`/optional/example-extension.tcz
/usr/local/bin/example
EOF
chmod +x /home/tc/.local/bin/example
Things that start up via entries in .X.d or don't have menu entries I have scripts like this set up.
« Last Edit: June 22, 2010, 11:59:27 PM by althalus »

Offline zab

  • Jr. Member
  • **
  • Posts: 51
Re: Save boot time when mounting big extensions
« Reply #2 on: June 23, 2010, 12:23:08 AM »
Quote
Easiest way is to not load the extensions til you need them. Perhaps consider using ondemand?

Even after reading the wiki more than 10 times, I'm still unable to understand the "on demand" principal!
Could someone show me please how to load/unload extension ondemand?
« Last Edit: June 23, 2010, 02:00:01 AM by zab »

Offline limeblack

  • Jr. Member
  • **
  • Posts: 69
Re: Save boot time when mounting big extensions
« Reply #3 on: June 23, 2010, 08:41:43 PM »
I think you could also remaster tiny core linux with the extensions already installed.  I believe that would improve boot time because there would be no need to extract and install the extensions on each boot.

Correct me if I am wrong.  I'm not really sure?1  :P

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Save boot time when mounting big extensions
« Reply #4 on: June 24, 2010, 06:22:28 AM »
If you always choose Install when using Appbrowser then you may have a longer boot time than necessary as you are loading every extension at boot time.

Use Appsaudit to improve boot time with OnBoot and OnDemand options. OnBoot controls which extensions get loaded at boot time. OnDemand allows for easy (menu) access to load less used (only needed upon demand) extensions. So my adjusting OnBoot and OnDemand in Appsaudit you can improve boot time.
10+ Years Contributing to Linux Open Source Projects.

Offline zab

  • Jr. Member
  • **
  • Posts: 51
Re: Save boot time when mounting big extensions
« Reply #5 on: June 24, 2010, 12:05:44 PM »
Quote
If you always choose Install when using Appbrowser then you may have a longer boot time than necessary as you are loading every extension at boot time.

Yep. This is the case.

Quote
Use Appsaudit to improve boot time with OnBoot and OnDemand options. OnBoot controls which extensions get loaded at boot time.
I understood the OnBoot way to do it. But not the OnDemand.

Quote
OnDemand allows for easy (menu) access to load less used (only needed upon demand) extensions. So my adjusting OnBoot and OnDemand in Appsaudit you can improve boot time.
Oh. Are you saying that when I click on an extension in the right side panel of the "OnDemand" GUI, the extension is loaded? If this is the case, I can save time for the small sized extensions.

But this can't fix my original problem as I really need to load 2 big extensions at boot time.

Offline zab

  • Jr. Member
  • **
  • Posts: 51
Re: Save boot time when mounting big extensions
« Reply #6 on: June 24, 2010, 12:07:00 PM »
Quote
I think you could also remaster tiny core linux with the extensions already installed.  I believe that would improve boot time because there would be no need to extract and install the extensions on each boot.

Interesting.

Quote
Correct me if I am wrong.  I'm not really sure?


Could an expert confirm that guys?

Offline jano

  • Newbie
  • *
  • Posts: 37
Re: Save boot time when mounting big extensions
« Reply #7 on: June 24, 2010, 12:08:12 PM »
I think a personal persistent installation PPI would do the trick (however, I'm not sure as I haven't been able to make it work)

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: Save boot time when mounting big extensions
« Reply #8 on: June 24, 2010, 03:39:17 PM »
May I ask what are the 2 big extension for?

Offline zab

  • Jr. Member
  • **
  • Posts: 51
Re: Save boot time when mounting big extensions
« Reply #9 on: June 24, 2010, 05:08:23 PM »
Quote
May I ask what are the 2 big extension for?

Pure research university extensions for "parallel computing" ;-)
« Last Edit: June 24, 2010, 05:14:36 PM by zab »

Offline zab

  • Jr. Member
  • **
  • Posts: 51
Re: Save boot time when mounting big extensions
« Reply #10 on: June 24, 2010, 05:10:22 PM »
Quote
I think a personal persistent installation PPI would do the trick (however, I'm not sure as I haven't been able to make it work)

Could someone explain how a PPI could be created and deployed?
Please don't tell me have a look to the wiki, I already did ;-)

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: Save boot time when mounting big extensions
« Reply #11 on: June 24, 2010, 07:15:54 PM »
If I may make a suggestion, it seems the 2 big extensions are not required to be loaded during boot, as from what I am guessing they are not required to get tc desktop up and running (aasuming you have a desktop).

If so, you could list them in .X.d to be loaded after the desktop is up.

Offline zab

  • Jr. Member
  • **
  • Posts: 51
Re: Save boot time when mounting big extensions
« Reply #12 on: June 25, 2010, 01:55:48 AM »
Quote
If so, you could list them in .X.d to be loaded after the desktop is up.
So, simply putting them inside ".X.d", and they'll be automatically loaded?
Is that right?

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: Save boot time when mounting big extensions
« Reply #13 on: June 25, 2010, 02:27:19 AM »
No leave them in /tce/optional.

In .X.d, create a blank file anyname and write these lines:

Code: [Select]
tce-load -i /mnt/sdXX/tce/optional/bigapp1.tcz
tce-load -i /mnt/sdXX/tce/optional/bigapp2.tcz

That's all. You can see the example for the wbar file.

These extensions will be loaded after X has started.

Offline zab

  • Jr. Member
  • **
  • Posts: 51
Re: Save boot time when mounting big extensions
« Reply #14 on: June 25, 2010, 07:02:22 AM »
Thanks a lot.
I'll give it a try and come back ;-)