Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Speed up boot time.
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
mir3x
Guru
Guru


Joined: 02 Jun 2012
Posts: 455

PostPosted: Wed Mar 13, 2013 7:07 pm    Post subject: Reply with quote

666threesixes666, with test I was only pointing out that test is probably inaccurate, cause tested disk had just 46MB/s - so its some ancient disk, ( new magnetic disk have speed about 200 MB/s in hdparm ), and that test on phoronix is just one from many, deeper searching might indicate something more useful.
_________________
Sent from Windows
Back to top
View user's profile Send private message
ryao
Retired Dev
Retired Dev


Joined: 27 Feb 2012
Posts: 132

PostPosted: Mon Mar 18, 2013 7:11 pm    Post subject: Reply with quote

666threesixes666 wrote:
http://freedesktop.org/wiki/Software/systemd/Optimizations

i learned of systemd from personally knowing the HA clustering people @ linbit.com / drbd.org i had taught linux from scratch to one of them approximately 4 years ago. systemd is not industrial grade yet for gentoo, but you can still preview it. arch full on requires systemd. freedesktop does not lie like tinfoil hat wordpressers do.

"xfs boot time"
XFS: 12.40 seconds

xfs cannot be used as /boot, your website is invalid. i say JFS from experience, not numbers.... BTRFS is untested from me yet, the HA clustering people will fill me in on it in a bit though. as for the JFS though, ive punished it absurdly with power outages tons of media hoarding formats so on so forth and its definitely the absolute best linux file system ive found so far. ive also not tested ZFS, tough that seems more of a raid storage type fs rather than a /boot & / fs

similar experience with systemd, 2 seconds instead of 20, but i serve apache periodically so im stuck to openrc for the moment.


ZFS is meant to replace all other forms of storage on your system. It will be fine for /. Currently, the only in-tree bootloader that supports /boot on ZFS is GRUB2. It is currently limited to supporting /boot on single disk and mirrored pools.
Back to top
View user's profile Send private message
TomWij
Retired Dev
Retired Dev


Joined: 04 Jul 2012
Posts: 1553

PostPosted: Sun Mar 24, 2013 12:29 pm    Post subject: Reply with quote

Startup finished in 1099ms (kernel) + 1493ms (userspace) = 2592ms

Hello there, my laptop is close to the one second per phase goal (http://lwn.net/Articles/299483/) and can possible even be improved further; this has been optimized from a boot that used to take half a minute up to a minute, after I got to the low times systemd helped to cut the time in half.

First things first, you will want to start with optimizing the kernel; you can obtain the longest delays with `dmesg -d | sort -nk4` (see the bottom). It helps to put things as modules which will not make their initialization part of the actual kernel init, or in layman's term "they won't stall the kernel from handing over to userspace" (which we will want to happen in under a second).

Next, you will want systemd (because it's faster by design due to the sockets and the primary focus on starting services in parallel, contrary to the subjective statements you will hear; if it takes too long you'll want to analyze it because there are some obvious services that hiccup, try `systemd-analyze blame` for at least a flat view of the longest delays. Also look into http://www.dedoimedo.com/computers/systemd-blame.html) and bootchart2 (to have a more detailed look into your boot, for further details enable the kernel parameter initcall_debug such that you will know how lang certain init calls take).

Please share us your output such that we can share a look as well, feel free to ask any questions; good luck.

PS: There's too much stuff you can do to leave in a single forum post or thread, maybe I should start a wiki article on it in the near future...
I also don't want to advocate that systemd is better or worse than openrc, it just makes it easier to cut in time; with openrc you'd end up patching it to work like systemd does if you want to improve its time or parallel booting further (which is or has been off by default).
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3509

PostPosted: Sun Mar 24, 2013 1:35 pm    Post subject: Reply with quote

Now for a slightly different perspective on startup...

I run /home out of nfs, here at home. They've done some windows-like stuff with gdm, to make it appear that the GUI is ready sooner, before the rest of the system. In my case, that means that gdm makes it look like the system is ready for login. However, flipping back to screen1 shows that things are really stalled at ntp-client, setting the time. The nfs mounting happens after the time is set, so if you were to login right away, strange things happen. I do have a local /home, for situations when nfs isn't up. But if nfs comes up after login, it mounts over top of the local /home, so in particular you lose your xauth cookie and you can't do spit on your desktop, for instance.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
Yamakuzure
Advocate
Advocate


Joined: 21 Jun 2006
Posts: 2284
Location: Adendorf, Germany

PostPosted: Tue Mar 26, 2013 11:20 am    Post subject: Reply with quote

<troll mode on>My laptop starts in under a second with openrc. Into KDE. I just open it. Wake up from hibernation rulez!</troll mode off>

Now seriously, why do people invest such a high amount of energy into something this unimportant like whether a computer starts up in 3, 5 or 10 seconds? Turn it on, go fetch a cup of coffee (or tea or whatever) and it's up when you are back. Does it matter whether your computer was idle for 5 or 10 seconds when you have your steaming mug on your desk? ;)
_________________
Important German:
  1. "Aha" - German reaction to pretend that you are really interested while giving no f*ck.
  2. "Tja" - German reaction to the apocalypse, nuclear war, an alien invasion or no bread in the house.
Back to top
View user's profile Send private message
TomWij
Retired Dev
Retired Dev


Joined: 04 Jul 2012
Posts: 1553

PostPosted: Tue Mar 26, 2013 4:28 pm    Post subject: Reply with quote

Yamakuzure wrote:
Now seriously, why do people invest such a high amount of energy into something this unimportant like whether a computer starts up in 3, 5 or 10 seconds? Turn it on, go fetch a cup of coffee (or tea or whatever) and it's up when you are back. Does it matter whether your computer was idle for 5 or 10 seconds when you have your steaming mug on your desk? ;)


Minimizing server downtime, being quickly up again in case of a power spike / unfortunate hardware or software event, mobile laptop users, there are a various amount of reasons...

Also, it's not a difference between 3 and 10 seconds; this thread is about bringing it down from nearly a minute or more.

But if you really want to go for a mug, then do so; but I don't have to go for that unnecessary mug, it's booted by the time I stand up! ^^


Last edited by TomWij on Fri Mar 21, 2014 5:23 pm; edited 1 time in total
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Tue Mar 26, 2013 6:00 pm    Post subject: Reply with quote

TomWij wrote:
Minimizing server downtime

TomWij ... I seem to remember this very same reason provided on the systemd mailing list ... and its complete nonsense. Firstly, if you care about availablity then your focus is entirely on predictable, dependency based, boot procedures that can be heuristicly tested. Secondly, a 3, 15, or 30, second saving in boot time is not worth sacrificing that predictablity for, as severs only need to reboot on few occasions (ie, kernel updates) and these occur during maintanance windows. So, shaving seconds off bootime is not something that is of any great consideration for systems admins, booting with some degree of certainty is.

I can't tell you the amount of times in the past year in which it has been said to me by managers that they are in process of migrating their farm from Linux to *BSD ... their reasons are many, but it basically boils down to dependability and future proofing. These people are not knee jerking, it cost them to do this, but from their perspective that cost is unavoidable, as, in the words of one particular services manager, "linux is becoming a joke".

Anyhow, thats probably the last I have to say about systemd, I'm just about through making any comment on the matter.

best ... khay
Back to top
View user's profile Send private message
TomWij
Retired Dev
Retired Dev


Joined: 04 Jul 2012
Posts: 1553

PostPosted: Tue Mar 26, 2013 6:27 pm    Post subject: Reply with quote

khayyam wrote:
... then your focus is entirely on predictable, ...


Predictable in which way? That's just a word used out of context, it is unclear why this is mentioned here.

khayyam wrote:
..., dependency based, ...


Both are dependency based, not sure why you mention this.

Quote:
..., boot procedures that can be heuristicly tested.


If you can reboot much faster, you can test it at a higher rate; be more certain, ...

Quote:
Secondly, a 3, 15, or 30, second saving in boot time is not worth sacrificing that predictablity for, ...


Which predictability?

Quote:
..., as severs only need to reboot on few occasions (ie, kernel updates) and these occur during maintanance windows.


You better do maintenance often than to delay it... That's also assuming everything goes perfect, which is not always the case; that doesn't take into account any unexpected events.

Quote:
So, shaving seconds off bootime is not something that is of any great consideration for systems admins, booting with some degree of certainty is.


What exactly makes one approach of booting less certain than another? This argumentation is moot.

Quote:
I can't tell you the amount of times in the past year in which it has been said to me by managers that they are in process of migrating their farm from Linux to *BSD ... their reasons are many, but it basically boils down to dependability and future proofing. These people are not knee jerking, it cost them to do this, but from their perspective that cost is unavoidable, as, in the words of one particular services manager, "linux is becoming a joke".


That's just their thoughts, in the end they may just be wasting a lot of money for no real benefit; these marketing words are becoming a joke.

Quote:
Anyhow, thats probably the last I have to say about systemd, I'm just about through making any comment on the matter.


Oh, you were talking about systemd? It rather appears you were doing a marketing talk on boot times. None of what you said applies to systemd in specific, anyhow....

Quote:
best ... khay


Ah, "best", a subjective adjective!
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Tue Mar 26, 2013 7:48 pm    Post subject: Reply with quote

TomWij wrote:
khayyam wrote:
... then your focus is entirely on predictable, ...

Predictable in which way? That's just a word used out of context, it is unclear why this is mentioned here.

TomWij ... A => B => C ... counter posed to "aggressive parallelization" which is causally unpredictable.

TomWij wrote:
khayyam wrote:
..., dependency based, ...

Both are dependency based, not sure why you mention this.

A,B,C => D is not a causal chain ... even if you fix this after the fact with a little fairy dust.

TomWij wrote:
khayyam wrote:
..., boot procedures that can be heuristically tested.

If you can reboot much faster, you can test it at a higher rate; be more certain, ...

That is complete nonsense ...

TomWij wrote:
khayyam wrote:
Secondly, a 3, 15, or 30, second saving in boot time is not worth sacrificing that predictability for, ...

Which predictability?

Causal predictability, which is sequential and not parallel ... which, again, can "with some degree of certainty" be heuristically tested.

TomWij wrote:
khayyam wrote:
..., as severs only need to reboot on few occasions (ie, kernel updates) and these occur during maintenance windows.

You better do maintenance often than to delay it... That's also assuming everything goes perfect, which is not always the case; that doesn't take into account any unexpected events.

Good advice ... but nothing to do with my points above. There may be earthquakes, invasions from mars, and other unseen factors ... but like shaving seconds of boot times they are not something that are factored in re availability. The main consideration would be dependability, which can, to some degree, be factored.

TomWij wrote:
khayyam wrote:
So, shaving seconds off bootime is not something that is of any great consideration for systems admins, booting with some degree of certainty is.

What exactly makes one approach of booting less certain than another? This argumentation is moot.

See above ... if each causal step must be successful to reach the final outcome then there is some guarantee that that having happened it can be reproduced, if you parallelise this process then there are no guarantees ... even with a liberal sprinkling of magic fairy dust.

TomWij wrote:
Quote:
I can't tell you the amount of times in the past year in which it has been said to me by managers that they are in process of migrating their farm from Linux to *BSD ... their reasons are many, but it basically boils down to dependability and future proofing. These people are not knee jerking, it cost them to do this, but from their perspective that cost is unavoidable, as, in the words of one particular services manager, "linux is becoming a joke".

That's just their thoughts, in the end they may just be wasting a lot of money for no real benefit; these marketing words are becoming a joke.

It has nothing to do with marketing ...

TomWij wrote:
khayyam wrote:
Anyhow, that's probably the last I have to say about systemd, I'm just about through making any comment on the matter.

Oh, you were talking about systemd? It rather appears you were doing a marketing talk on boot times. None of what you said applies to systemd in specific, anyhow....

Who'd have thunk it ... considering the subject line of the thread ... and the fact that systemd is mentioned in the very first line of my post. None the less don't let that get in the way of your being condescending.

TomWij wrote:
khayyam wrote:
best ... khay

Ah, "best", a subjective adjective!

pffff ... khay
Back to top
View user's profile Send private message
TomWij
Retired Dev
Retired Dev


Joined: 04 Jul 2012
Posts: 1553

PostPosted: Wed Mar 27, 2013 2:31 am    Post subject: Reply with quote

khayyam wrote:
TomWij ... A => B => C ... counter posed to "aggressive parallelization" which is causally unpredictable.


Unpredictable with regard to which context?

khayyam wrote:
A,B,C => D is not a causal chain ... even if you fix this after the fact with a little fairy dust.


Causal chains also sound like fairy dust theory to me, without context this is unclear.

khayyam wrote:
That is complete nonsense ...


Why is that so?

khayyam wrote:
Causal predictability, which is sequential and not parallel ... which, again, can "with some degree of certainty" be heuristically tested.


This says little about the parallel approach, and "some degree" is vague on its own.

khayyam wrote:
Good advice ... but nothing to do with my points above. There may be earthquakes, invasions from mars, and other unseen factors ...


Yet you choose to focus on the extreme cases and not on the common ones, that's denying their existence.

khayyam wrote:
but like shaving seconds of boot times they are not something that are factored in re availability. The main consideration would be dependability, which can, to some degree, be factored.


Dependability is an useless factor if no workstation in your company is available. Oh man, gotta drink another coffee because those computers take so long to boot (true story, I see this happen regularly at school and companies), let me remind you that the topic is about bringing it down from longer times. If you optimize this for a whole company you spare out a lot of lost time, coffee, ...

khayyam wrote:
See above ... if each causal step must be successful to reach the final outcome then there is some guarantee that that having happened it can be reproduced, if you parallelise this process then there are no guarantees ... even with a liberal sprinkling of magic fairy dust.


You may want to explain this weird belief into some more detail instead of referring to fairy dust.

khayyam wrote:
It has nothing to do with marketing ...


"Future proof your servers now with dependability and magic fairy dust!!!111oneoneeleventyone..."

http://www.freebsd.org/marketing/ is all about marketing whereas http://www.gnu.org/philosophy/ is all about philosophy, it's just a matter of choosing the right words to explain the matter...

khayyam wrote:
Who'd have thunk it ... considering the subject line of the thread ... and the fact that systemd is mentioned in the very first line of my post. None the less don't let that get in the way of your being condescending.


Words are pulled out of their context and statements aren't backed up with that context, there are also mentions of magic fairy dust which are vague and thus lack detail. Because you don't get your point across you start to call me condescending, and try to bring systemd into this support discussion whereas we're not even talking about it; reconsider what you're telling me and base it on facts, avoid inserting these kind of things in a thread where users are looking for actual practical help.


Last edited by TomWij on Fri Mar 21, 2014 5:30 pm; edited 2 times in total
Back to top
View user's profile Send private message
Yamakuzure
Advocate
Advocate


Joined: 21 Jun 2006
Posts: 2284
Location: Adendorf, Germany

PostPosted: Wed Mar 27, 2013 4:52 pm    Post subject: Reply with quote

TomWij wrote:
Minimizing server downtime
This is a very evil joke, that one.
What kind of servers? IBM? Dell? HP? Any of those that use SCSI RAID controllers that in themselves easily need thrice the time to fire up their raids than a normal user desktop needs for a cold boot? Some providing NTP, or attaching iSCSI NAS shares - those do need even longer.
And then there are insane uptimes anyway. Reboot is such a seldom need in the serverworld. (See http://www.uptimeprj.com/ for example)

This argument is invalid. But before you rip my head off, "Bringing it down from a minute or more" for user systems is, of course, a damn good reason! I never thought of that, as I never had such long boot times on my current machines...
_________________
Important German:
  1. "Aha" - German reaction to pretend that you are really interested while giving no f*ck.
  2. "Tja" - German reaction to the apocalypse, nuclear war, an alien invasion or no bread in the house.
Back to top
View user's profile Send private message
TomWij
Retired Dev
Retired Dev


Joined: 04 Jul 2012
Posts: 1553

PostPosted: Wed Mar 27, 2013 5:12 pm    Post subject: Reply with quote

Yamakuzure wrote:
What kind of servers? IBM? Dell? HP? Any of those that use SCSI RAID controllers that in themselves easily need thrice the time to fire up their raids than a normal user desktop needs for a cold boot? Some providing NTP, or attaching iSCSI NAS shares - those do need even longer.


Some servers indeed have longer boot times than users, which makes it harder to minimize downtime; therefore you need harder approaches to get it down (eg. parallel).

Yamakuzure wrote:
And then there are insane uptimes anyway. Reboot is such a seldom need in the serverworld. (See http://www.uptimeprj.com/ for example)


That site seems to focus on the maximum and ignores the rest, it doesn't show a distribution of uptimes either; so this resource is not relevant when the topic is about minimal downtimes.

Edit: The site seems to have ... changed ... where did they go?

Yamakuzure wrote:
This argument is invalid.


Because you state so? :D


Last edited by TomWij on Fri Mar 21, 2014 5:26 pm; edited 1 time in total
Back to top
View user's profile Send private message
Thistled
Guru
Guru


Joined: 06 Jan 2011
Posts: 572
Location: Scotland

PostPosted: Thu Mar 28, 2013 1:14 am    Post subject: Reply with quote

Oh what a surprise!
Khayyam is ripping posts again. :roll:

C'mon, give it a break man. You need a holiday.
You are too aggressive on these forums.

:!:
_________________
Whatever you do, do it properly!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum