WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: optimizing boot  (Read 1593 times)

Offline kevinfish

  • Jr. Member
  • **
  • Posts: 72
optimizing boot
« on: June 25, 2016, 07:07:58 PM »
I recall reading that one should look for the dependencies that may be shared by different applications, and sce-import those separately so they can be shared among them without each having to be packed into their own package and all the symlinks set up redundantly upon boot (correct me if I'm wrong).

It seems that once a person gets their system all set up without this consideration, rebuilding it so it takes this into account should be a fairly trivial program to write.

Is anyone working on this?

The reason why I'm asking is because its something I'm tempted to start on but I don't want to duplicate anyone else's work.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: optimizing boot
« Reply #1 on: June 25, 2016, 07:54:01 PM »
Are you wanting to find the package set of the current running session, ie all the packages installed and combine them into one SCE?

Offline kevinfish

  • Jr. Member
  • **
  • Posts: 72
Re: optimizing boot
« Reply #2 on: June 26, 2016, 07:38:32 AM »
Well, it was my understanding that say if two applications you want to install share the same library, the best policy would be to install that library's sce independently then install the two applications that way you would save the time of having to symlink that library's files into the ramdisk twice.  That when the sce was created by import it wouldn't include that library if it was already installed in the system with its own sce.

I may be full of hot air about this (and it seems like a highly unstable way of doing things considering that when you actually end up loading that sce the other one may not be present).

But perhaps that might be one way, is to take your system once you have it the way you like it and turn all the loaded sce's into one super-sce with all the apps and libraries included!

I'm just trying to make it boot faster and it seems that if it relinks the same libraries over and over that are included in several sce's then that must be wasting a lot of time.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: optimizing boot
« Reply #3 on: June 26, 2016, 09:17:05 AM »
Using a file list to create an SCE from is the most efficient, one can have as many packages in it as they want.

The other way is to use the -d option of sce-import to use an existing SCE as a dependency so as to not have duplicate files between the SCEs. 

Of course, a combination of both can be used. 

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: optimizing boot
« Reply #4 on: June 26, 2016, 09:26:38 AM »
Hi kevinfish.

Run  sce-import --help  and consider using the  sce-import -d  and  sce-import -l  options, they can make your extensions considerably more efficient. Many advanced users prefer the -l (list option), personally i prefer the -d (dependency) option.

Also look at  sce.purge  , can read an example here and see how it can reduce boot time: http://forum.tinycorelinux.net/index.php/topic,19543.msg120876.html#msg120876. Being overly aggressive can break extensions, this technique requires experimentation. I still use the example in the link, works well.

On an old system these techniques result in measured boot time improvement. The Advanced dCore Extension Strategies wiki section will eventually be updated with more information: http://wiki.tinycorelinux.net/dcore:extensions

In my experience both the size of the SCE and the number of repeated SCE libraries make a difference. When loading an SCE, for example, running an md5sum check on a larger extension takes longer. Likewise having to check the same libraries repeatedly for linking slows things down.

Edit: Jason posted first, this has some bonus information so posting anyway.