WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How does PPI function or how do you make it work?  (Read 2967 times)

Offline meo

  • Hero Member
  • *****
  • Posts: 651
How does PPI function or how do you make it work?
« on: July 06, 2010, 07:32:20 AM »
Hi!

First of all I want to thank everyone that have had a part in producing this new alpha release: a big thank you! As the subject indicates I want to know how to benefit from the PPI function. I made a PPI-file and looked for any documentation about the subject but came out empty handed. So therefore I'm asking for some information that would allow me to benefit from this feature. Any hints are more than welcome.

Have fun using TC,
meo
"All that is very well," answered Candide, "but let us cultivate our garden." - Francois-Marie Arouet Voltaire

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: How does PPI function or how do you make it work?
« Reply #1 on: July 06, 2010, 08:31:13 AM »
PPI or persistent local, is the bind mounting of /usr/local to a persistent store (hard drive). This results in a hybrid installation. Whereas typically /usr/local remains in ram. PPI moves /usr/local/ to a physical device.

I do not advocate its use for the same reasons that I do not advocate a scatter mode (traditional hard drive) installation.

PPI as an option was created before Tiny Core offered tcz (mount style) extensions and before Appsaudit or tce-update.  With Tiny Core v1.0 the only extension type offered were tarballs which unpacked directory into ram. With low ram systems loading a few extensions could quickly exhaust ram. Since the tarball extension type has been dropped, the need for PPI is now IMHO obsolete. Here is why I state such:

Option I
Persistent local does not require a tce directory. In fact the greatest benefit is when no tce directory
 exists. Install once results in the fastest booting.  However, such a setup does not allow for appsaudit,  tce-update, or any method to audit extensions, .e.g., cleanly remove,  update, or check dependencies.

Option II
Using a tce directory and loading (copying) upon every boot into persistent local, gives one the impression that appsaudit and tce-update will work. But removing a tcz from tce/optional will result in an out of sync situation, that is, unless we force a clearing of persistent local.  Clearing persistent local results in the slowest possible boot. The only benefit is marginally less ram used.

I feel persistent local is very confusing and error prone. IMHO, its deployment should only be considered for very specialized needs. For example, a static appliance.  I don't believe any team member is currently using the PPI method.


 
« Last Edit: July 06, 2010, 09:26:23 AM by roberts »
10+ Years Contributing to Linux Open Source Projects.

Offline jano

  • Newbie
  • *
  • Posts: 37
Re: How does PPI function or how do you make it work?
« Reply #2 on: July 06, 2010, 02:44:46 PM »
@ roberts:  I think in my case, a PPI would be the perfect setting: I use 2 (and only 2) extensions (with all its dependencies) on every boot: alsa and vlc, which have to be mounted every time I boot TC (about 4 - 5 times a day, every day). My booting time takes about 45 seconds. I have tried booting without those extensions (faster) and then mounting them (which takes some time, so the total time until the system is up and ready is roughly the same. In this scenario, having these two extensions already mounted in PPI wouldn't give me a faster start?

Offline meo

  • Hero Member
  • *****
  • Posts: 651
Re: How does PPI function or how do you make it work?
« Reply #3 on: July 07, 2010, 08:38:15 AM »
Hi Robert!

Thanks a lot for your explanation! Now I know it isn't something for me. My thought was to have more space to download for example linux distributions (I'm kind of a distro junkie). But since it's easy to download whatever you want to the harddisk anyway, fiddling with PPI is just a waist of time in my case. Thanks again Robert!!!

Have fun developing TC further,
meo
"All that is very well," answered Candide, "but let us cultivate our garden." - Francois-Marie Arouet Voltaire

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: How does PPI function or how do you make it work?
« Reply #4 on: July 07, 2010, 01:29:23 PM »
@ roberts:  I think in my case, a PPI would be the perfect setting: I use 2 (and only 2) extensions (with all its dependencies) on every boot: alsa and vlc, which have to be mounted every time I boot TC (about 4 - 5 times a day, every day). My booting time takes about 45 seconds. I have tried booting without those extensions (faster) and then mounting them (which takes some time, so the total time until the system is up and ready is roughly the same. In this scenario, having these two extensions already mounted in PPI wouldn't give me a faster start?
With a PPI they wouldn't be mounted but actually installed to a persistent store.
Here's one way to do such:
1.  Using system menu use PPISetup to create a tclocal file or directory on a partition.
2. Reboot using options base norestore local=sdb2 (Use actual partition from step 1.
3. Next use Control Panel->Apps Audit->Install Options->Toggle Default Copy Install
4. Use appbrowser's Install option to copy install only PPI compatible extensions.
5. Reboot using the local=xxxx option as above.

* Always need to boot with local=xxx so add such to your boot loader. There is no autodetection for tclocal.

* The above method assumes you have enough memory. If you have low memory then you must use a tce directory structure temporarily. Still use local=xxx boot option, set Copy Install flag from Apps Audit, select only PPI and use appbrowser Install option. After installing then remove the entire tce directory and reboot with only local=xxx.

* Note that no further Apps Audit functionality will work.
* When you want to upgrade apps installed into tclocal you must clear/remove tclocal and start anew.

* Note too that you may setup a combination tclocal and tce mount system. This is a toolkit and your free to setup as you deem necessary. Anything installed into tclocal should be removed from any tce directory.

With PPI you can achieve a faster booting system at the expense of using auditing and upgrading tools. 
10+ Years Contributing to Linux Open Source Projects.

Offline beto

  • Newbie
  • *
  • Posts: 5
Re: How does PPI function or how do you make it work?
« Reply #5 on: July 08, 2010, 01:57:02 AM »
Robert, wouldn't it also be at the expense of reliability of the persistent storage device? If PPI would not be used then the extensions should load in a pristine state on every boot, right? 

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: How does PPI function or how do you make it work?
« Reply #6 on: July 08, 2010, 01:59:19 AM »
Correct. That is why I don't use or recommend it.
10+ Years Contributing to Linux Open Source Projects.

Offline jano

  • Newbie
  • *
  • Posts: 37
Re: How does PPI function or how do you make it work?
« Reply #7 on: July 14, 2010, 03:17:02 PM »
@ roberts : Sorry for no replying earlier - was away and without internet access - just arrived. Thanks for the feedback - will try first thing tomorrow, because even with the mentioned drawbacks I think it's worth giving it a try ...

Offline jano

  • Newbie
  • *
  • Posts: 37
Re: How does PPI function or how do you make it work?
« Reply #8 on: July 15, 2010, 05:22:43 PM »
Some issues .... will work on it during the weekend