Hacker News new | ask | show | jobs
by guylhem 4188 days ago
That's at least the 3rd time I see that article posted here!!!! It's NOT exceptional or some special kind of wizardry. Even NetworkManager now does that.

If you have an old setup, you can get matching speeds with dhcpcd and the following options added to the bottom of debian /etc/dhcpcd.conf:

ipv6rs #ipv6ra_own #ipv4only noipv4ll noarp

The latest 2 options are the helpful ones for speed. The rest is for my IPv6 setup - can't remember if the Macs give you a dhcpv6 lease that fast.

Since it's bragging time, my debian+systemd thinkpad x60 laptop using coreboot want to say it resumes from suspend in about 1 second, and it boots its kernel in 0.7s and the userspace tools in 0.5s (add another second for X thanks to SNA, and another second for LXDE/conky/etc.)

What is the boot time for mac already?

EDIT: linux laptops properly resuming is still impressive for me as I remember a time not so long ago when one had to use some kernel patches, tweak the drivers or at least do a few rmmod, and even then a proper resume could take several seconds due to the drivers reinitializing.

Linux has come a long way since them. What might have been surprising before is now taken for granted (as it should be!).

EDIT2: I see downvotes. I guess some fanboy is quite sad that linux can do the same or better.

6 comments

No, let's not kid ourselves. You're being downvoted for being a bit pompous.
More than just a 'bit'.
I was trying to avoid sounding pompous, while calling out someone else for being pompous...

It's a delicate situation!

Indeed, I'm very pompous since I'm quite proud of what a modern linux install can do.

Sorry if I don't partake in this unwarranted Mac adoration.

Instead, I explain how to do the same on linux, and actual results when it's possible to do better (with among other things i915.fastboot=1)

$ systemd-analyze

Startup finished in 781ms (kernel) + 648ms (userspace) = 1.430s

Add ~1s to the above to start X with SNA if you prefer a graphic mode - and that's on a 2006-era laptop, a 8-years old machine, so color me unimpressed. http://en.wikipedia.org/wiki/ThinkPad_X_Series#X60_Tablet

You do realize you're partaking in unwarranted Linux adoration, yes? Quite literal situation of pot calling the kettle black.

If this were truly about the merits and capabilities of Linux as a kernel and whichever userspace utilies you slap on, there would be no self-importance in your comments. However, it's more about showing off your accomplishments and trying to make yourself feel and seem superior.

I applaud you on your boot time. Sadly, it's not really applicable anywhere beyond the confines of your workstation.

Systemd is great and all for desktops, but I like keeping that complexity and invasiveness away from my servers.

You despise "fanboys" and "adoration," but you're "proud" of an OS that (I'm guessing) you had nothing to do with the development of?

This, right here, is the problem. People choosing to attach their personal and tribal identity to an operating system. It doesn't matter what operating system it is, or how good it is. It's no more noble than doing the same thing with a football team or a comic book character.

You're guessing wrong, even if I'm less involved in free software that I was a few years ago.

But indeed, I'm quite passionate about GNU/Linux and say the gluglug X60 since it's a unique offering to respect ones' freedoms: http://www.fsf.org/news/gluglug-x60-laptop-now-certified-to-... but I'm actively trying to improve boottime.

In case you are curious, here's a kernel patch integrating a few things I (badly) fixed to get such boot times, and an explanation: http://comments.gmane.org/gmane.linux.bios/80414

You see, it's a very small patch - yet it took some work. There's no magic, just effort.

And for those who think that's not replicable anywhere beyond the confines of my workstation, I intend to release very soon a debian based distribution with "proper" systemd support that gets me from grub to dwm in less than 2 seconds instead of 3s, kernel and systemd time included, on the X60 (I had some inspiration tonight!!)

It's a work-in-progress, it could be improved on the non-tablet version, but it's still something that's possible right now on 8-years old hardware. That's what I call hacking.

For me, free software is not a tribal identity. It's very practical, with great benefits far beyond fast boot times.

Things change because people work on them, and yes they're usually proud of their work, sorry about that. Pride is part of hacking.

I must say I have been quite surprised by the general tone of this thread, including the ad-hominem attacks ("Seems he is working for Intel on CoreOS") on the OP that was trying to explain stuff. Many people don't post content, they just criticize.

That's good that you're contributing to free software. I like free software, you understand. But your sneering at "fanboys," your acting like someone's choice of operating system is a moral stance rather than a matter of convenience and personal preference, still says that you are not being as rational as you think you are. Only fanboys accuse people of being fanboys. Your choice to use free software may not be a tribal identity, but your choice to mock people who don't absolutely is.
It's throwing around annoying editorials like "unwarranted" every time it doesn't apply to what you're excited about, and not expecting others to do same.

You're the kind of person who feels they're fighting the good fight and the whole world is against them, proud of having this unpopular opinion that nobody agrees with.

Yes, you're a special snowflake.

It's lame.

>>Linux has come a long way since them.

In 2011 Linux distros could hibernate, today they can't :-)

I simply can't get Ubuntu 14.04 to hibernate and resume reliably. 1 out of 10 times it's dead on resume. The culprit seems to be fglrx (as usual), but no decent solution other than to give up on AMD and go back to Nvidia (not gonna happen).

We've come a long way since the first Slackware, but Linux on the desktop is still a hot mess, particularly in terms of WM. I sincerely wish we had less options, and some of the "it just works" from Macs.

That neither fglrx nor the proprietary Nvidia drivers works well with the rest of Linux is hardly a secret. The fact that there is a special tainting mechanism so you won't get support for that configuration should be regarded a big warning sign.

Linux, just like MacOS or Windows, needs supported hardware to run. Since the past 8 years or so, that has meant Intel. It can be confusing that Linux "supports" every hardware under the sun, which can sometimes be true of only select versions.

Run a supported configuration and it'll "just work". My bog standard Thinkpad has suspended many times a day for the past five years and I haven't even once had a problem with it.

> Since the past 8 years or so, that has meant Intel... Run a supported configuration and it'll "just work".

Intel is a joke in terms of GPUs, and absent in terms of desktop GPUs.

What you call a "supported configuration", I call "you're lucky... For now". Wait until your next distro or hardware upgrade.

> Intel is a joke in terms of GPUs, and absent in terms of desktop GPUs.

That's not really a useful thing to say. Intel GPUs started out as useful only for office and programming work (still an overwhelming majority of use cases). Now it's good enough for pretty much anything that's not among the most performance demanding.

If you need a workstation with that extra performance, you probably have an application which only supports a particular configuration anyway (Nvidia on Red Hat for example, for a popular CAD/CAM tool), if which case the question isn't really relevant anyhow.

What remains are primarily consumer gaming, for which you should better stick to Windows which by far the dominating platform for it. I'm told Steam makes a difference here, so perhaps that's worth checking out, but I'm not in the industry so I have no idea about that.

> What you call a "supported configuration", I call "you're lucky... For now". Wait until your next distro or hardware upgrade.

You might be tempted to think that's so, but that's the whole idea why Linux is such a work horse on well supported hardware.

For another popular operating system, you pretty much have no guarantees that whatever drivers you require for third party support will be available in the future.

Since the well supported drivers on Linux by definition is open source, you are guaranteed (either explicitly by your support provider, or implicitly by the way development works) that it will be supported for the forseeable future. That's why I can use a ten year old printer on Linux, for example, which lost its Windows support two generations ago. Or a ten port serial board, which is probably just as old.

Suspend (low-power standby) and hibernate (dump ram to disk) are different things.
Correct. I meant suspend, not hibernate. Hibernate works well; suspend is the one that causes trouble with fglrx.
If I was using a Mac and a poorly supported closed source third-party device driver was causing problems, I would be more apt to blame the driver's creator than Apple. I also would not assume that my issues meant OS X was a "hot mess".
Perhaps the Linux driver architecture encourages poor drivers? For example, Windows retired VxD drivers, and MS worked to get drivers certified.
Have you considered just using the open source driver?
Personally, I posted this because Linux can now DHCP far faster, with both systemd-networkd and NetworkManager, and I thought people might find it interesting to read about some of the techniques used to speed up DHCP.
You wrote this in a previous thread as well, but never responded to my comment then. I have no idea why you are hyping up networkd's DHCP client so much, given that it was established that a) its functionality is a small subset of dhcpcd and dhclient, b) dhcpcd could reach comparable speeds provided additional steps unsupported by networkd like ARP checking are disabled and c) networkd DHCP violates and/or sidesteps RFC guidelines.
I've used dhcpcd, and I've seen many other reports from systems using it. It's an improvement over previous DHCP clients, but I'd love to see benchmarks demonstrating its ability to obtain an address in a vaguely timely manner. I have in fact seen piles of benchmarks for networkd, and I look forward to seeing similar benchmarks for the same code in NetworkManager.

In the previous article, I was particularly pleased that NetworkManager is finally starting to integrate good library code rather than spawning off programs and attempting to manage them. That's half the problem with dhcpcd: it really doesn't matter how fast it is, if it doesn't actually integrate well with a broader network management system. (And on most systems I've used, NetworkManager uses and depends on dhclient instead.) I hope to see more where that came from, and it's a toss-up whether networkd or NM will integrate good library-based wireless support first.

As for RFC guidelines, as far as I know the most notable one is one that every sane DHCP client violates, namely the massive timeouts, delays, and backoffs, all written for scenarios in which a thousand systems all come up at the same time and try to get an address over a network comprised largely of tin cans and string. Those guidelines matter very little on modern networks, compared to the cumulative wait time of millions of users on millions of systems.

Alright, thank you for your clarification.
Seems he is working for Intel on CoreOS, and CoreOS is pretty much built on systemd...
Nope, I have nothing to do with CoreOS. I work on Chrome OS, and I wish Chrome OS used systemd; I don't enjoy fighting with upstart. In any case, I don't speak for anyone but myself, which really ought to go without saying.
mea culpa, Someone pass the coffee pot...
On my machine (its a 4770k + Asus mobo) I boot to desktop on Arch + KDE before all my monitors power on.
My Chromebook turned xUbuntu system is already back online before the screen turns back on after opening the lid. All of the Macs we use in the studio are much slower than that.
So (in this particular arena) Linux can, by Googling around and digging into conf files, match the speed that a Mac has out of the box? That's nice, but it's not exactly impressive. Why isn't it configured that way to start with?

(My personal machines are a Mac laptop, a Windows desktop, and a Linux server. I have no dog in this fight. I kind of don't understand why people think they do have a dog in this fight.)

It's standard, Linux distributions generally install NetworkManager. The tweaks are for people who want more control or have less typical setups.
I guess MS have been slacking in their back room lock-in, or Linux have gotten better at faking Windows-isms in front ACPI etc.