29

I love my Pi, but it takes a considerable time to boot. If I want to use it as a Media Centre, it's quite important that it powers up quickly.

Are there any steps I can take to improve boot performance?

Jivings
  • 22,208
  • 11
  • 88
  • 138

4 Answers4

12

Certain things can be disabled that improve boot up speed - swap for instance (my Pi takes ages to activate it.)

However, SD card reads are comparatively slow, and the device itself isn't all that fast - I don't think there's a magic bullet to make it boot up that much faster than by default.

I know it's something you've considered already, but personally I would just leave it on. The two main reasons for not doing so appear to be stability (which could be solved by a cron job reboot every so often if it proves to be an issue at all) and SD card wear. While I don't have any figures on how quickly the latter will take place, there's things you can do to mitigate it (disabling swap) and for the price of SD cards, I'd be tempted to just see what happens. If it dies relatively quickly, you can revisit it and you've not thrown away that much. If it lasts for a couple of years or more (which I highly suspect may well be the case, though I have no benchmarks for that) I think £10 every few years is a rather low maintenance cost in the grand scheme of things.

As mentioned already the main thing that kills SD cards is lots of writes, and I can't think of anything that would really be doing that (or should be doing that) when the Pi is sitting idle.

tlhIngan
  • 3,342
  • 5
  • 18
  • 33
berry120
  • 10,666
  • 10
  • 50
  • 62
  • 1
    I don't think stability is a problem - Linux machines are known to run for many months, often years, without rebooting. As for writes, there are a lot of log files in `/var/log` that will be regularly updated. The solution would be to disable logging, or mount `/var/log` as tmpfs (which uses system memory as temporary storage.) – Malvineous Jul 14 '12 at 06:51
  • What about battery powered applications, where leaving it on is a waste of resources? – tuskiomi Jun 25 '17 at 02:35
4

If you are willing to switch to a whole new init system, I've found that using systemd allows the system to boot up considerably quicker, although I haven't done any benchmarks to give any real numbers.

ricochet1k
  • 141
  • 2
0
  1. Leave it on (as berry120 said:)
  2. Make a bootchart to see what takes time, then eliminate where possible
  3. replace slow software with smaller/faster options
  4. maybe try readahead (or try disabling readahead if it was already on and doing harm)
Simon B.
  • 131
  • 4
0

A few suggestions: Strip SystemV at /etc/rc.sysinit

  • Remove RAID
  • Remove LVM(depends)
  • Remove BTRFS detection

or Use systemd

Parallel load the programs

Compile the kernel with hardfloat

If parts of your root partition are static use Squashfs noted in the wiki

E.g /usr /bin /sbin .. etc..

/etc/fstab

noatime,nodiratime,errors=remount-ro,data=writeback

External SSD and HDD for the root partition

ArchHaskeller
  • 1,415
  • 12
  • 35
  • 1
    Could you perhaps explain how to make sections of the filesystem `squashfs`? That would make this answer much more useful, and is also the only thing I'm not already doing. – Jivings Jul 22 '12 at 20:57