WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Major suggestion for TCB  (Read 6578 times)

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Major suggestion for TCB
« on: October 12, 2009, 01:20:32 AM »
Looking at how my booting time is steadily increasing from the original lightning-fast fresh install with no extra extensions, I started wondering about booting speed. One of the first things that attracted me to TC was the prospect of a fast boot.

I see this topic has been discussed somewhat, so I started thinking how might the functionality of TCB be retained while not losing the speedy boot?

Well one thought is not to load extensions at boot time, but rather at run time, ie when an app/extension is first called.

In this scenario, the wbar icons would still be loaded at booting time, but nothing more. On clicking an icon for the first time after booting, the extension would be mounted and remain there for the duration of the session.

So instead of a long extended wait at booting time for ALL extensions to be loaded at once, many of which might not even be needed during a particular session, just the links would be loaded. The penalty is a short lag when clicking an app for the first time. A bit like cloud mode but local.
« Last Edit: October 12, 2009, 01:23:49 AM by jur »

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Major suggestion for TCB
« Reply #1 on: October 12, 2009, 01:22:11 AM »
Are you installing (loading into RAM) or mounting extensions?
« Last Edit: October 12, 2009, 01:28:00 AM by bmarkus »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: Major suggestion for TCB
« Reply #2 on: October 12, 2009, 01:26:22 AM »
Both, with no firm idea of which is best... your question suggests one case would be better...?

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Major suggestion for TCB
« Reply #3 on: October 12, 2009, 01:28:19 AM »
Both, with no firm idea of which is best... your question suggests one case would be better...?

There is a significant difference at boot time. Mounting is much faster than loading extension to RAM.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14948
Re: Major suggestion for TCB
« Reply #4 on: October 12, 2009, 01:29:26 AM »
As a test, you could try a big extension like oo2 and try with it mounted and try with it loaded to ram to see if there's a difference.

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: Major suggestion for TCB
« Reply #5 on: October 12, 2009, 01:40:11 AM »
I'll try this later tonight. :)

If I understand correctly, a .tcz mounted is basically a separate file system merged with the main one when mounted, while an install unpacks all the files and puts them inside the main one, the end result being the same from a system perspective?

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Major suggestion for TCB
« Reply #6 on: October 12, 2009, 01:49:23 AM »

If I understand correctly, a .tcz mounted is basically a separate file system merged with the main one when mounted, while an install unpacks all the files and puts them inside the main one, the end result being the same from a system perspective?


Yes, it is correct. Merging of mounted extensions filss done with symlinks, which is a fast procedure and require very few memory. However you need the original media mounted while system is up and access speed depends on the media.

Installation means copying all files to RAM. It is a slower procedure at boot, but you do not need media mounted later on and files accessed with full RAM speed. And of course you need enough RAM.
« Last Edit: October 12, 2009, 01:51:23 AM by bmarkus »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: Major suggestion for TCB
« Reply #7 on: October 12, 2009, 01:58:29 AM »
All I can say is I'm a total idiot. This information was there all along but I haven't absorbed it.  My brain must be all calcified. ::)

It means I have to start from scratch and mount everything. So far I have been thinking, "how often do i need this extension? if always, then install, if occasional, then mount. But now I see there is no real advantage in installing for my case.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Major suggestion for TCB
« Reply #8 on: October 12, 2009, 02:18:33 AM »
All I can say is I'm a total idiot. This information was there all along but I haven't absorbed it.  My brain must be all calcified. ::)

No, you are not. We are learning all continously  ;)

There is a file /tce/tcz2ram.lst This is a list of extensions which are copied to RAM instead of mounting. It is created automatically by appbrowser, but you can edit it later manually.

If you delete tcz2ram.flg all extensions in /tce will be mounted during next boot.

If you place an empty tcz2ram.flg file in /tce all extensions will be copied to RAM during boot independently of tcz2ram.lst it has higher priority.

So you can fine tune your installation easily without reloading extensions.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline spence91

  • Jr. Member
  • **
  • Posts: 80
Re: Major suggestion for TCB
« Reply #9 on: October 12, 2009, 05:12:41 AM »
I've written a few scripts for some commonly used applications and created an alias for them (minefield and mplayer) that will check if the application is installed, and if it isn't then load it and then execute it. If your interested i can post it here for you to look at (but later since i'm at the office at the moment :p).

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: Major suggestion for TCB
« Reply #10 on: October 12, 2009, 05:17:57 AM »
OK, I used your advice about the 2 files tcz2ram, and my test results are:

All to RAM (verified by looking in /tmp/tcloop/, empty): 53s, of which about 40s was spent on the rotating cursor;

All mounted (verified by looking in /tmp/tcloop/, lots of stuff): 42s, so that is about 11s saved on the rotating cursor.

Not what I thought it might be... 30s to mount all my extensions? I counted 51 in /tmp/tcloop/, but there are a lot more files in /mnt/sda6/tce/. Not sure at this stage what happens to the others.

So what happens in that 30s besides mounting those 51 tcz files systems?

bmarkus: Thanks for the tcz2ram tip, that saved me heaps of time! :)

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: Major suggestion for TCB
« Reply #11 on: October 12, 2009, 05:32:20 AM »
I've written a few scripts for some commonly used applications and created an alias for them (minefield and mplayer) that will check if the application is installed, and if it isn't then load it and then execute it. If your interested i can post it here for you to look at (but later since i'm at the office at the moment :p).
Yes, that would be of much interest to me thanks!

I haven't really got all that much stuff installed; Beaver, bluetooth, opera with flash, OSS, Rox, flit, wine, wifi and xpdf. Oh and Xorg. All these and more are mounted now.

Can I remove 915resolution and Xvesa while using Xorg?

Offline spence91

  • Jr. Member
  • **
  • Posts: 80
Re: Major suggestion for TCB
« Reply #12 on: October 12, 2009, 05:34:37 AM »
OK, I used your advice about the 2 files tcz2ram, and my test results are:

All to RAM (verified by looking in /tmp/tcloop/, empty): 53s, of which about 40s was spent on the rotating cursor;

All mounted (verified by looking in /tmp/tcloop/, lots of stuff): 42s, so that is about 11s saved on the rotating cursor.

Not what I thought it might be... 30s to mount all my extensions? I counted 51 in /tmp/tcloop/, but there are a lot more files in /mnt/sda6/tce/. Not sure at this stage what happens to the others.

So what happens in that 30s besides mounting those 51 tcz files systems?

bmarkus: Thanks for the tcz2ram tip, that saved me heaps of time! :)

i think that the time taken is the mounting of extensions and setting them up. some packages have a script to initialise them, this is probably what takes the time.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14948
Re: Major suggestion for TCB
« Reply #13 on: October 12, 2009, 05:41:54 AM »
Can I remove 915resolution and Xvesa while using Xorg?

Xorg does not require 915resolution. Xvesa comes with tinycore anyway, but you could use microcore and Xorg without Xvesa

Offline clach04

  • Newbie
  • *
  • Posts: 31
Re: Major suggestion for TCB
« Reply #14 on: October 13, 2009, 01:33:20 AM »
There is a file /tce/tcz2ram.lst This is a list of extensions which are copied to RAM instead of mounting. It is created automatically by appbrowser, but you can edit it later manually.

If you delete tcz2ram.flg all extensions in /tce will be mounted during next boot.

If you place an empty tcz2ram.flg file in /tce all extensions will be copied to RAM during boot independently of tcz2ram.lst it has higher priority.

Excellent info, I've stolen most of the above and put into http://wiki.tinycorelinux.com/tiki-index.php?page=Installing+Applications  :D

Chris