3

This is not an important question, I'm just curious. Something strange happened, which isn't quiet clear to me:

In the kernel command line, the amount of the memory can be set statically with the mem=128M (for 128 MB). If the mem command is left out, I believe the kernel figures this out by itself.

Now, when I leave out the mem command, the Linux boots in 6.906 s. If I put it to the max. of RAM statically, that too leads to 6.906 s startup time, same with 80 MB and some other values.

But if I set 50 MB or 60 MB the system boots in 6.775 s (that's a 130 ms shorter startup time). But why ? Does it need less time for searching if there isn't much space left to look for?

[Edit:] The time was measured on an embedded System with the help of a scope and a GPIO pin, which was set 'high' at very first command in the 1st-lvl-Bootloader, and was set to 'low' in the last script of /etc/init.d/

An ARM9 SAM9G25 was used with 400 MHz (for further information about the CPU here's a link with its paramters link)

  • Just a wild guess: Maybe the kernel does more read-ahead on storage accesses when there is "much" unused memory. Maybe it's not even the kernel; something similar could be done by an application. – Hauke Laging Feb 28 '14 at 11:53
  • Is that time until you get a login prompt, or the kernel boot time until init is started or until the initrd is started if you're using one? – Stéphane Chazelas Feb 28 '14 at 12:00
  • I've added some information about the measurement ([Edit:]) – user3085931 Feb 28 '14 at 12:36
  • Constraining everything to run in less memory may make it more likely that the memory that is there all fits in the cpu's cache. – psusi Feb 28 '14 at 15:27
  • 1
    What CPU architecture? I find psusi's hypothesis plausible: maybe at 64MB you hit a threshold for a cache effect where some part of the MMU tables fit in the L2 cache more often. – Gilles Feb 28 '14 at 20:57
-2

Does it?

With 32 gb the time it takes from decrypting the luks partition on the boot drive and to the kde log on is pretty much instant.

Make sure to disable all kernel/boot messages as that helps and get a ssd.

And a real cpu so i5 or higher.

  • 1
    Of course different hardware varies the results. This wasn't the question – user3085931 Oct 12 '16 at 15:06
  • Not my point. From the days of 512MB on Gentoo to today I've never noticed any statistically significant difference in boot time when adding memory. But never mind that, op posted an interesting question. I'll try with a vm and see it it changes. Now it might differ on bare metal but we'll see if anything pops up. – Mr. C Feb 2 '17 at 0:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.