Best plan of attack for reducing boot time

Ask questions about Arch Linux ARM. Please search before making a new topic.

Best plan of attack for reducing boot time

Postby snoopkoala » Mon Dec 04, 2017 4:54 pm

Don't know if this is how to post this question, so correct me if I'm wrong. I'm knew to arch, and I'm running it on a raspberry pi b+. My goal is to reduce the boot time as much as possible. It's hard for me to know what I do and don't need, and to know what is the best way to optimize the boot time. As of now, all I want my pi to be able to do is have a static ip address, autologin, and then run a c program. Anyone have their preferred method of accomplishing this? I have it doing what I want, but I feel like it could be way faster. My systemd-analyze output is: Startup finished in 10.280s (kernel) + 15.626s (userspace) = 25.907s
This is my first post. Thanks for any and all help.

Thanks,
snoopkoala
snoopkoala
 
Posts: 2
Joined: Mon Dec 04, 2017 4:51 pm

Re: Best plan of attack for reducing boot time

Postby graysky » Mon Dec 04, 2017 7:37 pm

To see rate limiters see:
$this->bbcode_second_pass_code('', 'systemd-analyze critical-chain')

If you haven't already, upgrade to a card SD card.
graysky
Developer
 
Posts: 1728
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: Best plan of attack for reducing boot time

Postby snoopkoala » Mon Dec 04, 2017 8:05 pm

$this->bbcode_second_pass_quote('graysky', 'T')o see rate limiters see:
$this->bbcode_second_pass_code('', 'systemd-analyze critical-chain')

If you haven't already, upgrade to a card SD card.


$this->bbcode_second_pass_code('', '[root@sipi /]# systemd-analyze critical-chain
The time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.

graphical.target @15.477s
└─multi-user.target @15.435s
└─systemd-resolved.service @13.506s +1.878s
└─network.target @13.279s
└─netctl@eth0.service @11.301s +1.919s
└─basic.target @11.264s
└─sockets.target @11.240s
└─dbus.socket @11.220s
└─sysinit.target @11.120s
└─systemd-update-done.service @10.751s +344ms
└─ldconfig.service @8.396s +2.270s
└─local-fs.target @8.136s
└─boot.mount @7.927s +187ms
└─dev-mmcblk0p1.device @7.817s
')

This is what I get, but I don't really know what new info I get from this. My microsd card is as fast as I'm willing to invest while reading 100MB/s and writing at 60MB/s.
snoopkoala
 
Posts: 2
Joined: Mon Dec 04, 2017 4:51 pm

Re: Best plan of attack for reducing boot time

Postby summers » Tue Dec 05, 2017 10:34 am

If you want *very* fast - and just run a c program, then an initrd would probably be quickest. On the initrd, just have busybox/toybox, a start up script and your c program.

It will boot very fast, but system afterwards will be very limited.

Also it will be a bit of effort to get it to work, so not the quickest to implement.
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm

Re: Best plan of attack for reducing boot time

Postby WarheadsSE » Tue Dec 05, 2017 2:48 pm

- If you aren't using a GUI, you can move the default target from graphical.target to multi-user.target
- I would use systemd-networkd over netctl for static IP (personal choice), since you're using systemd-resolved as well.
- ldconfig.service can be hard to disable.
- A uSD is only so fast, no matter what.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm


Return to User Questions

Who is online

Users browsing this forum: No registered users and 5 guests