Skip to main content

Timeline for How can I lower my boot time more?

Current License: CC BY-SA 3.0

16 events
when toggle format what by license comment
Jan 21, 2018 at 19:52 comment added Radu I don't think I understand what you are saying. I told you that I moved the bulk of the script as you suggested, and the boot time increased with almost 2 seconds...
Jan 21, 2018 at 19:51 comment added goldilocks You're wasting your time trying to optimize if you want to insist disableusb has to finish before networking starts because this is how you want to ensure wifi doesn't start. That's just dumb, to be frank; you're playing have my cake and eat too. If you want to disable USB to conserve power, great, but you should deal with the wifi issue separately. If you can't be bothered, then don't waste your time trying to squeeze seconds out of your boot time either.
Jan 21, 2018 at 19:47 comment added Radu Disabling usb has the role to conserve power, not just to prevent the wifi from starting. The idea is that wifi SHOULD start sometimes, and the script will not disable the power in that case.
Jan 21, 2018 at 19:42 comment added goldilocks This is beginning to sound like a somewhat zany XY problem. >_< Disabling USB to prevent wifi from starting is ridiculous. You should just disable wifi via your networking configuration.
Jan 21, 2018 at 19:38 comment added Radu The networking.service is intentional. It is important for the USB power to be off so the wifi doesn't start, or else it spends a lot of time doing wifi startup things :) Yes, 28 seconds is not bad, but the thing is, this system will run on batteries, and will have to boot a few thousand times. So each second it's on it will be the equivalent of maybe 1 hour in total. Trimming even half a second can make a difference. Btw, it's a Pi Zero, so yeah, it's not the fastest PI :)
Jan 21, 2018 at 19:28 comment added goldilocks What about the relationship to networking.service? I'm presuming that wasn't intentional, which is why I recommended to start after sysinit (which waits for networking to initialize). Anyway, keep in mind that if 28 seconds includes your disableusb, it is a pretty reasonable boot time for any model of Pi. None of them are fast.
Jan 21, 2018 at 19:22 comment added Radu Ok, did that, the takepicture service is After=local-fs.target sysinit.target and it takes about a second more to boot now. So the old way was better, since I think there was some parallelization of things on the CPU while the CPU waited for the camera data.
Jan 21, 2018 at 19:18 comment added Radu Well I guess I can split ti in two, right now it's a hack, it was supposed to just shut down the usb, and take a pic in the takepicture.service I guess I can try to see if making this change would do anything.
Jan 21, 2018 at 18:52 comment added goldilocks I think you should make disableusb.service After=sysinit.target.
Jan 21, 2018 at 18:51 history edited goldilocks CC BY-SA 3.0
added 137 characters in body
Jan 21, 2018 at 17:25 comment added Radu I edited my post as well. I disabled some services, and it still takes as long to boot (some services take longer than before).
Jan 21, 2018 at 16:34 comment added goldilocks I've edited in a bit about that in the second paragraph. Based on what you are saying though, you might as well leave it foregrounded -- although if it doesn't make any difference, you could try it going straight to background and see if that speeds anything up.
Jan 21, 2018 at 16:33 history edited goldilocks CC BY-SA 3.0
added 374 characters in body
Jan 21, 2018 at 16:18 comment added Radu What is the benefit of forking my service to the background? Ideally, everything should stop after my service is being ran (I also have a shutdown now in it, which is usually disable while I test things).
Jan 21, 2018 at 16:17 comment added Radu I did a: pi@raspberrypi:~$ sudo systemd disable raspi-config.service and got Excess arguments.. Also, many of those services do not appear listed in systemctl list-unit-files.
Jan 21, 2018 at 15:37 history answered goldilocks CC BY-SA 3.0