WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: When to choose 'Mount Mode' or 'Copy Mode'? Some examples, pls  (Read 7421 times)

Offline pioj

  • Jr. Member
  • **
  • Posts: 76
When to choose 'Mount Mode' or 'Copy Mode'? Some examples, pls
« on: January 31, 2013, 06:35:13 AM »
Hi.  I've been playing with Core for some time and now I want to push it to its limits.

I get the basics of the two modes for loading extensions, however I cannot decide whenever choose one or another for a certain task. I watched the charts and I understood extensions are unmounted in the Copy Mode, for memory purposes...

(In a example, I already removed some apps that came as extension, like web browsers, pidgin, or dropbear and have them as SCM's. This result in a much faster boot and I still can run them by bootlocal.sh if I need to)


Could you guys provide some examples of what extensions do you usually load in every case? I want to be sure it's not only for compatiblity issues...


Oh btw,  I also wanted to ask what's the point of having an app repeated both as .tcz and .scm at the repos, other than "it wasn't ported yet". 



Thx a lot,  I really enjoy this distro.
« Last Edit: January 31, 2013, 07:01:18 AM by pioj »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11282
Re: When to choose 'Mount Mode' or 'Copy Mode'? Some examples, pls
« Reply #1 on: January 31, 2013, 07:30:26 AM »
Hi pioj
It all comes down to trade offs. Mount mode will boot faster and leave more free RAM available. Copy mode will
execute faster, but you will pay for it in boot time. Executing a mounted app will incur a slight speed penalty since
it needs to be read from disk as opposed to reading it from RAM (Copy mode). The memory management in Linux
may serve as an equalizer if you run the app multiple times, since it may be cached in RAM after the first run.

Since SCMs are self contained, they are not prone to breakage due to a dependency update. They load faster
due to fewer links being created and can be unmounted if desired. The price you pay is more RAM is required.
TCZs are essentially the opposite.

I personally use only TCZs mounted Onboot.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: When to choose 'Mount Mode' or 'Copy Mode'? Some examples, pls
« Reply #2 on: January 31, 2013, 12:05:28 PM »
Copy mode will execute faster
Probably not so in certain cases where the increased storage requirements of copy mode would become reason for swapping.

My estimation is that with many setups Default Mode might be fastest overall, combining the speed of tmpfs with the reduced storage requirements of squashfs.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline pioj

  • Jr. Member
  • **
  • Posts: 76
Re: When to choose 'Mount Mode' or 'Copy Mode'? Some examples, pls
« Reply #3 on: January 31, 2013, 01:31:11 PM »
I don't think Default(Cloud) Mode is the way to go unless you don't need any driver or library to be preloaded. And it would come with the price of having a very fast connection to the .tcz server. Maybe having them in a LAN or a second partition would help, but then there's no point in having this, being the same as using Mount Mode...

Booting time is the priority here, so I'll bet on Mount Mode anyways. I'll have plenty of RAM, as I don't need that much for a couple of drivers and few system apps like nano or svn. All depends of the appliances I'll want to have.


I'd wish to know more about linux and how to bring more SCM apps :(


At the moment, my Syslinux initialize is about 2-3 secs before it loads the kernel... Did anyone try booting with u-boot or LILO?






Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: When to choose 'Mount Mode' or 'Copy Mode'? Some examples, pls
« Reply #4 on: January 31, 2013, 01:47:46 PM »
Maybe having them in a LAN or a second partition would help, but then there's no point in having this, being the same as using Mount Mode...
Not the same at all, having the speed and energy saving benefits of extensions loaded in tmpfs, but with less storage requirements compared to Copy Mode.

And just in case, lilo is in repo.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline pioj

  • Jr. Member
  • **
  • Posts: 76
Re: When to choose 'Mount Mode' or 'Copy Mode'? Some examples, pls
« Reply #5 on: January 31, 2013, 10:25:54 PM »
The idea of having my tcz on a second partition acting like a server was twirling my mind last night...

  • have /sda1 as boot .
  • have /sda2 as 'server'. This removes all necessity for a resident TCE directory where to save installed extensions..
  • Clean boot with no tcz loaded at all (Cloud Mode)
  • Run directly the extensions without installing them placing scripts under bootlocal.sh, or maybe load them in CopyMode


Maybe this has some potential. I'll do some tests today...

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: When to choose 'Mount Mode' or 'Copy Mode'? Some examples, pls
« Reply #6 on: February 01, 2013, 02:39:06 AM »
I couldn't see any benefit in having 2 separated partitions.
You can boot with code "base", which will make your tce dir default to /tmp/tce and then if you like you could copy your extensions from your storage dir to your tce dir in /opt/bootlocal.sh.
It can have potential under the condition that you have sufficient RAM & swap available in relation to total size of extensions.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline pioj

  • Jr. Member
  • **
  • Posts: 76
Re: When to choose 'Mount Mode' or 'Copy Mode'? Some examples, pls
« Reply #7 on: February 01, 2013, 07:44:24 AM »
The reason for an extra partition is that allows me to use version control software on it, as example.  I feel more comfortable having them separate from eachother...


Another thing I wanna try to improve app loading times is by extracting some extensions and pack them into a single .tcz.  It will result in a bigger file, but they would copy faster to RAM.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: When to choose 'Mount Mode' or 'Copy Mode'? Some examples, pls
« Reply #8 on: February 01, 2013, 08:48:00 AM »
Combining multiple tcz into one poses several problems.
Each tcz has an initialization script.
Tcz have dependencies.  Combined tcz would need combined dependencies.  Other tcz may depend on the members.

I see no reason to think that copying the combined tcz to RAM would be significantly faster than copying the originals.
You should look at the available scm packages instead.

Offline pioj

  • Jr. Member
  • **
  • Posts: 76
Re: When to choose 'Mount Mode' or 'Copy Mode'? Some examples, pls
« Reply #9 on: February 02, 2013, 09:31:27 AM »
After some tests it became clear that it is the same to run extensions or scm-apps from the /optional directory inside the harddrive than to have a Symbolic link pointing to /dev/shm/optional (have a copy of the optional directory in ram).  I needed to learn this by my own in order to progress using linux ...






Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: When to choose 'Mount Mode' or 'Copy Mode'? Some examples, pls
« Reply #10 on: February 02, 2013, 11:04:12 AM »
A symlink is just a pointer.
What you can do is boot with code 'base' and copy all extensions to /tmp/tce/optional.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)