Disabling dietpi-boot service? Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Overclocking has no effect boot time

Post by Fourdee »

NJS wrote:FWIW, none of the usual pi overclocking setting make any difference in boot time...
I believe its more a case of increase SD speeds during boot, that will make the most difference:
http://dietpi.com/phpbb/viewtopic.php?f ... 1452#p1452
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
k-plan
Posts: 416
Joined: Sun Feb 28, 2016 5:28 pm

Re: Disabling dietpi-boot service?

Post by k-plan »

Hi,

I think, their is a lot of mystic here, about speed-up boot-time.
So I have done same testing on a:

Code: Select all

 ───────────────────────────────────────
 DietPi     | 14:58 | Sun 15/10/17
 ───────────────────────────────────────
 V156       | RPi Zero W (armv6l)
 ───────────────────────────────────────
First of all, I think @NJS is using a very old DietPi RPi Zero W image version.
NJS wrote:

Code: Select all

...
[    9.334761] usbcore: registered new interface driver brcmfmac
[    9.547133] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: May 27 2016 00:13:38 version 7.45.41.26 (r640327) FWID 01-df77e4a7
...
DietPi v156 have after fresh installation out-of-the-box:

Code: Select all

root@RPi-Zero_W:~# uname -a
Linux RPi-Zero_W 4.9.52+ #1 Mon Oct 2 21:14:49 UTC 2017 armv6l GNU/Linux

root@RPi-Zero_W:~# dmesg | grep wl0
[    8.017884] brcmfmac: Firmware version = wl0: Aug  7 2017 00:46:29 version 7.45.41.46 (r666254 CY) FWID 01-f8a78378
But let's start testing with a fresh installed image (DietPi_v150_RPi-armv6-(Jessie).img) on a SanDisk Extreme 32GB microSDHC, Class 10, UHS-3 with default settings, which will be auto-updated to DietPi v156 during first boot-up.
We using a Official Raspberry Pi Power Supply, because it will have a out of 5.2 V with 2.5 A and no significant powerloss on cable (18 AWG) and micro usb plug (only pin 1 and 5 connected)

Settings:
  • Wifi enabled
  • IPv4 addess via DHCP
  • IPv6 enabled
  • Swapfile size : auto (1567 MB)
  • no overclocking or tweaking CPU, RAM, GPU or sd card
CPU (default)
CPU (default)
SD-Card bench (default)
SD-Card bench (default)

Code: Select all

root@RPi-Zero_W:~# cat /var/log/boottime
27.17 Seconds
------------------------------------------

Lets tweak the setting to speed up:

Device Network: IP address
  • Wifi enabled
  • IPv4 static addess
  • IPv6 enabled (leave it enabled, disable will increase boot-up time!)

Code: Select all

root@RPi-Zero_W:~# cat /var/log/boottime
20.01 Seconds
_________________________________________________

Swapfile settings:
  • Swapfile size : 100 MB
Swapfile 100MB
Swapfile 100MB

Code: Select all

root@RPi-Zero_W:~# cat /var/log/boottime
19.60 Seconds
_________________________________________________

Swapfile disable:
  • Swapfile size : disable (0 MB)

Code: Select all

root@RPi-Zero_W:~# cat /var/log/boottime
19.28 Seconds

_________________________________________________

Tweaking sd card without breaking WiFi:
  • ##---SD-CARD_Overclock------
    dtoverlay=sdtweak,overclock_50=100
SD Card tweak
SD Card tweak

Code: Select all

root@RPi-Zero_W:~# cat /var/log/boottime
19.18 Seconds
_________________________________________________

Overclocking CPU, SDRAM, GPU, Voltage :
  • ##----for RPi Zero----
    arm_freq=1050
    gpu_freq=500
    core_freq=500
    sdram_freq=500
    ## sdram_schmoo=0x02000020 (don't do this!) ##
    over_voltage=2
    sdram_over_voltage=2

Code: Select all

root@RPi-Zero_W:~# cat /var/log/boottime
18.79 Seconds

_________________________________________________



27.17 Seconds vs. 18.79 Seconds
  • Static ip-address configuration and swapflie size make the greatest difference in boot-up time.
  • Overclocking and sd card tweak increase the system performace much, but not as much for boot-up time.
And that is it!
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal and Bitcoin.
NJS

Re: Overclocking has no effect boot time

Post by NJS »

Fourdee wrote:
NJS wrote:FWIW, none of the usual pi overclocking setting make any difference in boot time...
I believe its more a case of increase SD speeds during boot, that will make the most difference:
http://dietpi.com/phpbb/viewtopic.php?f ... 1452#p1452
I had tried that but it actually made no difference at all. See my prior post above: http://dietpi.com/phpbb/viewtopic.php?f=9&t=2145#p8314
NJS

Re: Disabling dietpi-boot service?

Post by NJS »

k-plan wrote:Hi,
I think, their is a lot of mystic here, about speed-up boot-time.
So I have done same testing
Thanks! This was badly needed!
k-plan wrote: First of all, I think @NJS is using a very old DietPi RPi Zero W image version.
Yes, I had upgraded to the latest but could not get python smbus to work with it (I tried three different versions lost several days and finally just gave up).
k-plan wrote: [*] IPv6 enabled (leave it enabled, disable will increase boot-up time!)[/list]
Interesting, why is that? In my case I don't even initialize WLAN until later from within my App. I wonder if I could remove the network manager entirely from the boot sequence and load it later when needed.
k-plan wrote: ## sdram_schmoo=0x02000020 (don't do this!) ##
Just curious, what is the problem with this (I've seen it suggested in many places)?
k-plan wrote: 27.17 Seconds vs. 18.79 Seconds
  • Static ip-address configuration and swapflie size make the greatest difference in boot-up time.
  • Overclocking and sd card tweak increase the system performace much, but not as much for boot-up time.
And that is it!
I'll try some of this and see what happens. If I can get it under 19 seconds that would be a huge improvement!
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Disabling dietpi-boot service?

Post by Fourdee »

NJS wrote:
k-plan wrote:Hi,
I think, their is a lot of mystic here, about speed-up boot-time.
So I have done same testing
Thanks! This was badly needed!
Yep, great write up K-Plan, many thanks :)

100ms only for SD card overclock. Would of expected more, maybe only benefits multi-core RPi's. Hmm.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
k-plan
Posts: 416
Joined: Sun Feb 28, 2016 5:28 pm

Re: Disabling dietpi-boot service?

Post by k-plan »

NJS wrote:Interesting, why is that?
As far as I noticed, many networking functions a directly implement into the kernel.
So, if you will disable functions by config, it will not speed up things, it will cause only time lag.
Have tested to disable IPv6 support and it will increase boot time.
NJS wrote:In my case I don't even initialize WLAN until later from within my App.
I will say, it's not a good idea. Better let's Debian/DietPi do this for you, if boot time is important.
If you will set it after boot-up, you have to wait for reinitialize the hole network stack.
NJS wrote:I wonder if I could remove the network manager entirely from the boot sequence and load it later when needed.
Hmm, DietPi does it in the old Debian style with a single config file. I personally like this much more then using a network manager or the Rasbian way.
Sense of speed, DietPi approach is a good to go.
NJS wrote:Just curious, what is the problem with this (I've seen it suggested in many places)?
Have tested it. In some rare chases, with tweaked sd card settings, it will fuckup the hole overclock setting on some of my RPi devices.
In short, it only make sense to set SDRAM schmoo to get more than 500MHz SDRAM frequency (default is unset).

And bullshit is all over the internet. Many people creating content only by copy-and-paste without trying it seriously out or understand the background.

Here some good informations, but always keep a eye on it, you have a RPi Zero and not a RPi 3 or RPi 2:
https://github.com/aikoncwd/rpi-benchmark
https://github.com/RetroPie/RetroPie-Se ... erclocking
NJS wrote:I am using Samsung EVO+ 32GB, which I specifically selected to reduce boot time since it is supposed to be one of the fastest available.
It's the picky sd card I ever own. With some devices this card will not boot up (timing problem on Odroid C1 and C2). And the speed is only at the very most ordinary.
I don't use Samsung EVO+ in my SBC any more now. For mobile phone, as storage device, it will be okay. So all my get in there.
NJS wrote:After adding dtoverlay=sdhost,overclock_50=84 to \DietPi\config.txt read speed increases modestly to 28 MB/s but boot time is still over 26 sec (and the Pi Zero W onboard wifi stops working)
It correct. It the wrong parameter and the wrong overlay for newer kernel.
http://dietpi.com/phpbb/viewtopic.php?f ... 1452#p2583

Code: Select all


##---SD-CARD_Overclock_(RPi3,RPi2,RPiZero)------
dtoverlay=sdtweak,overclock_50=100
And please have a look at the output of:

Code: Select all

root@RPi-Zero_W:~# dmesg | grep mmc

....
[    0.823936] mmc-bcm2835 20300000.mmc: could not get clk, deferring probe
[    0.974521] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[    0.980984] mmc-bcm2835 20300000.mmc: mmc_debug:0 mmc_debug2:0
[    0.984939] mmc-bcm2835 20300000.mmc: DMA channel allocated
[    1.092000] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.098577] mmc0: overclocking to 100000000Hz
[    1.102668] mmc0: new high speed SDHC card at address aaaa
[    1.111696] mmcblk0: mmc0:aaaa SE32G 29.7 GiB
.....
so you can see, if it work correct with your sd card.


------------------------------------

Fourdee wrote:
100ms only for SD card overclock. Would of expected more, maybe only benefits multi-core RPi's. Hmm.
Yes correct. On RPi2 and RPi3 (multi-core) it will be work much better.
And if you have a huge swapfile like in default config, you will get a significant drop on boot time.
But the main goal is overall system performance and response.

BTW: - have you notice the typo in dietpi-config dialog and dietpi.txt?
Swapfile_Size=1567
Swapfile_Size=1567
Auto size swapfile (since v155 size is now set to "2048 - total memory")
Auto size swapfile (since v155 size is now set to "2048 - total memory")

Code: Select all

# >> Misc Options -----------------------------------
#Size of dphys-swapfile to generate (MB)
#   0=Disabled | 1=auto (1GB-RAM = size) | 2+=manual
Swapfile_Size=1567
;)

Don't think to make a github issue for this. :D
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal and Bitcoin.
Post Reply