WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How to boot faster with remastered ramdisks?  (Read 3543 times)

Offline magicloud

  • Newbie
  • *
  • Posts: 30
How to boot faster with remastered ramdisks?
« on: February 12, 2014, 02:27:48 AM »
Hi,

  I am working on 5.2 with a lot of extensions. I packed these extensions into a ramdisk and boot along with core.gz. Everything works.

  Now I want the booting process faster. One thing I noticed is every time the system loads all the extensions, then run tce.installed scripts together.

  Is it possible (without modifying current system in core.gz) to make the ramdisk as "extensions already loaded" status? So every time it boots, just all tce.installed scripts are needed to run. No more filesystem operations on "installing" the extensions.

Offline ibaloo

  • Newbie
  • *
  • Posts: 19
Re: How to boot faster with remastered ramdisks?
« Reply #1 on: February 12, 2014, 10:00:34 AM »
Why don't you use the TCL possibility to run entirely in RAM ? Each extension is already in a squash filesystem. So if you put them in a ramdisk you will have to mount two fs to access the files. It must TERRIBLY slow down your system.

Offline magicloud

  • Newbie
  • *
  • Posts: 30
Re: How to boot faster with remastered ramdisks?
« Reply #2 on: February 12, 2014, 09:16:41 PM »
Why don't you use the TCL possibility to run entirely in RAM ? Each extension is already in a squash filesystem. So if you put them in a ramdisk you will have to mount two fs to access the files. It must TERRIBLY slow down your system.
Sorry, I am not quite follow. "run entirely in RAM"?
Current way of installing an extension is already to link from mounted squash to destination. What do you mean by "mount two fs"?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14816
Re: How to boot faster with remastered ramdisks?
« Reply #3 on: February 12, 2014, 10:22:57 PM »
You can set the copy2fs flag so that extensions are loaded to ram rather than mounted - see the options in the apps gui

Offline magicloud

  • Newbie
  • *
  • Posts: 30
Re: How to boot faster with remastered ramdisks?
« Reply #4 on: February 13, 2014, 03:17:24 AM »
You can set the copy2fs flag so that extensions are loaded to ram rather than mounted - see the options in the apps gui
Still, every boot requires a lot of file system operations, and this time, instead of create a link, it also has to transfer the data of files, right?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14816
Re: How to boot faster with remastered ramdisks?
« Reply #5 on: February 13, 2014, 03:22:00 AM »
Right - it copies the contents of the extensions to ram and runs the start-up scripts.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: How to boot faster with remastered ramdisks?
« Reply #6 on: February 13, 2014, 03:25:08 AM »
Copying to RAM will slow down boot and speed up operation.
Béla
Ham Radio callsign: HA5DI

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

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: How to boot faster with remastered ramdisks?
« Reply #7 on: February 13, 2014, 04:25:59 AM »
On your question, yes, you can hack it to do so, but it is of course unsupported. Are you sure the symlink creation is the slow part?

Your second initrd would then contain the links, you wouldn't load the extensions using tce-load, but a manual script that would do the missing steps.
The only barriers that can stop you are the ones you create yourself.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: How to boot faster with remastered ramdisks?
« Reply #8 on: February 13, 2014, 06:31:14 AM »
Still, every boot requires a lot of file system operations

An alternative way to circumvent that would be to use s2disk/resume instead of poweroff/boot whenever possible.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline magicloud

  • Newbie
  • *
  • Posts: 30
Re: How to boot faster with remastered ramdisks?
« Reply #9 on: February 13, 2014, 08:43:14 PM »
On your question, yes, you can hack it to do so, but it is of course unsupported. Are you sure the symlink creation is the slow part?

Your second initrd would then contain the links, you wouldn't load the extensions using tce-load, but a manual script that would do the missing steps.
Yes, the system runs on thin clients. The packages loading part (before tce.installed runs) takes about 15 secs.

And so I wonder if TCL supports that, instead of unpacking all extensions myself.

Still, every boot requires a lot of file system operations

An alternative way to circumvent that would be to use s2disk/resume instead of poweroff/boot whenever possible.
Ah, resume. Let me check on that.