TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Why systemd?

235 点作者 jamesog超过 10 年前

11 条评论

Sanddancer超过 10 年前
I think part of systemd&#x27;s problem, as much as Poettering et al will try to deny it, is that it is full of NIH. One of the things this post criticizes, and Poettering criticizes, is the BSD-inherited daemon() function. Being curious, I looked at the function&#x27;s implementation, both in FreeBSD&#x27;s implementation, and glibc&#x27;s implementation. FreeBSD&#x27;s implementation handles pretty much everything the daemon writer themself would want to -- it sets the signal handlers and masks appropriately, double forks, creates a session, sets PIDs unless you tell it not to, and changes to the root directory unless you tell it not to. Glibc&#x27;s misses important steps, like the signal manipulations, tries too hard to create a typical null device, and otherwise completely misses the point.<p>The biggest problem I see with system is that the developers don&#x27;t play well with others. Instead of working with various parties, like the glibc maintainers, to fix deficiencies elsewhere, they expect developers everywhere to drop what they&#x27;re doing to redesign how their projects work, when they work just fine for the many, many other unix architectures out there. Too much of systemd is based on magical pixie dust, compatibility be damned, and not enough on actually making things better.
评论 #8353574 未加载
评论 #8354037 未加载
dsr_超过 10 年前
The reason people use UNIX-like systems is because they work reliably. In order to make a complex system work reliably, it needs to be easily fixed. In order to fix a system, a person needs to understand it as well as be able to make a change in it. And in order to understand a system, it helps very much if that system is straightforward and lucidly verbose.<p>I hope systemd will live or die on its merits; I fear that it will take over via politicking.
评论 #8353447 未加载
评论 #8353446 未加载
评论 #8353445 未加载
评论 #8353689 未加载
nextos超过 10 年前
We often criticise systemd for being too bloated, and making it hard to write a drop in replacement. I totally agree with this line of thought.<p>However, in my mind it has made several awesome things possible. My boot time got dramatically shorter when I adopted it thanks to parallelization. Besides, daemons have now simple and robust service definitions. Sys V had become a mess!<p>Lastly, lightweight containers are the real-deal for small development tasks (not for production!). Just one command: systemd-nspawn, and you&#x27;re ready to go. Docker is currently a bit more complicated to set up.<p>Arguably, many features, including containers, should be moved out of systemd. Right now, more than a monolithic architecture, I think systemd is rather shipping too many things under the same project umbrella.
评论 #8353453 未加载
评论 #8354847 未加载
评论 #8353449 未加载
评论 #8353668 未加载
评论 #8355564 未加载
mhogomchungu超过 10 年前
Lots of people do not seem to understand the criticism of systemd.<p>systemd = init system + a whole lot of other things.<p>When people complain about systemd,they usually do not complain about what it does or how it does it in the init system part.That part is pretty solid as far as functionality is concerned.<p>When people complain about systemd,they usually complain about the &quot;whole lot of other things&quot; part.Lots of people have different complains and my biggest one is on udev.<p>udev is a core component in any modern linux system I see systemd absorbing it as nothing but a political move and a power grab.They could have left udev as an independent project and just create a dependency on it.<p>The &quot;whole lot of other things part&quot; will,by definition,make any other project that is just an init system seem very much deficient in functionality when compared to systemd.
评论 #8353473 未加载
评论 #8353568 未加载
评论 #8353431 未加载
评论 #8354328 未加载
ultramancool超过 10 年前
Am I the only one who&#x27;s disgusted with this bloated, convoluted, dbus-dependent pile of crap? I mean, c&#x27;mon, binary log files? I&#x27;ll pass, thanks. It replaces way more than it needed to.<p>I prefer the BSD-style philosophy, nice, simple rc.conf, used to run Arch till it got infected with this garbage too. It slowly progressed away from it&#x27;s BSD-style roots. So recently, I just gave up and moved to FreeBSD. Not a single regret so far.
评论 #8353472 未加载
评论 #8353458 未加载
评论 #8354535 未加载
评论 #8353460 未加载
评论 #8353951 未加载
uselessdguy超过 10 年前
Disclaimer: I develop uselessd, probably have a warped mindset from being a Luddite who values transparency, and evil stuff like that.<p>The author of this piece makes the classic mistake of equating the init system as the process manager and process supervisor. These are, in fact, all separate stages. The init system runs as PID 1 and strictly speaking, the sole responsibility is to daemonize, reap its children, set the session and process group IDs, and optionally exec the process manager. The process manager then defines a basic framework for stopping, starting, restarting and checking status for services, at a minimum. The process supervisor then applies resource limits (or even has those as separate tools, like perp does with its runtools), process monitoring (whether through ptrace(2), cgroups, PID files, jails or whatnot), autorestart, inotify(7)&#x2F;kqueue handlers, system load diagnostics and so forth. The shutdown stage is another separate part, often handled either in the initd or the process manager. Often, it just hooks to the argv[0] of standard tools like halt, reboot, poweroff, shutdown to execute killall routines, detach mount points, etc.<p>To stuff everything in the init system, I&#x27;d argue, is bad design. One must delegate, whether to auxiliary daemons, shell scripts, configuration syntax (in turn read and processed by daemons) or what have you.<p>sysvinit is certainly inadequate. The inittab is cryptic and clunky, and runlevels are a needlessly restrictive concept to express what is essentially a named service group that can be isolated&#x2F;overlayed.<p>Of course, to start services on socket connections, you either use (x)inetd, or you reimplement a subset or (partial or otherwise) superset of it. There&#x27;s no way around this, it&#x27;s choosing to handle more on your own rather than delegate. In systemd&#x27;s case, they do this to support socket families like AF_NETLINK.<p>As for systemd being documented, I&#x27;d say it&#x27;s quote mediocre. The manpages proved to be inconsistent and incomplete, and for anyone but an end user or a minimally invested sysadmin, of little use whatsoever. Quantity is nice, but the quality department is lacking.<p>sysvinit&#x27;s baroque and arduous shell scripts are not the fault of using shell scripts as a service medium, but have to deal with sysvinit&#x27;s aforementioned cruft (inittab and runlevels) and the historical lack of any standard modules. BSD init has the latter in the form of &#x2F;etc&#x2F;rc.subr, which implements essential functions like rc_cmd and wait_for_pids. Exact functions vary from BSD to BSD, but more often than not, BSD init services are even shorter than systemd services: averaging 3-4 lines of code.<p>A unified logging sink is nothing novel, it&#x27;s just that systemd is the first of its kind that gained momentum, but with its own unique set of issues. syslogd and kmsg were still passable, and the former also seamlessly integrated itself with databases.<p>Once again, changing the execution environment is a separate stage and has multiple ways of being done. Init-agnostic tools that wrap around syscalls are probably my favorite, but YMMV.<p>As for containers, it&#x27;s about time Linux caught up to Solaris and FreeBSD.
评论 #8354484 未加载
评论 #8354240 未加载
评论 #8354813 未加载
评论 #8353706 未加载
评论 #8354053 未加载
评论 #8354027 未加载
contingencies超过 10 年前
Case in point .. today .. rebuilding an X11 desktop system on Gentoo, some weird set of dependencies around gnome beneath the window manager wants to pull in systemd. I finally work out a way around it, but it wastes half an hour of my time.<p>My take: Containers are not well managed by general, daemon-oriented process supervisors with a localhost-oriented purview. However, those supervisors would do well to use container-related features to better secure and manage daemons as appropriate. In future, processes will be more likely managed across clusters by parallel capable supervisory systems with high availability goals and network infrastructure configuration, load and topology knowledge. Less and less people will even see the init system, except perhaps behind a logo or as it flashes past while booting their device in debug mode.<p>(Edit: stumbled on <a href="http://www.gossamer-threads.com/lists/gentoo/user/284741" rel="nofollow">http:&#x2F;&#x2F;www.gossamer-threads.com&#x2F;lists&#x2F;gentoo&#x2F;user&#x2F;284741</a> which explains the scenario .. would hate to be on BSD)
callesgg超过 10 年前
I think systemd actually clears up a loot of stuff. As the article describes.<p>The main thing that scares me is the binary loging format I can think of some benefits but mostly it just seams scary. I guess I will get go se later if the benifits outweighs the rest.
评论 #8354530 未加载
fsniper超过 10 年前
I&#x27;m new on the boat about systemd debate so I&#x27;m still reading and reviewing the situation. But the more I read the more I&#x27;m getting away from systemd.<p>In principal everybody is on terms with the need for a new and modern init system. But yet I&#x27;m not even sold on this issue. sysvinit is still holding stance with extra tools and doing it&#x27;s job cleanly. By introducing a fully reimplemented and still controversial system with many dependencies and with need for many reimplementation on our existing software we are not helping the issue but blurring the waters.<p>And What&#x27;s the fascination about boot times?<p>Nowadays on desktops nobody boots. You just boot once and hibernate&#x2F;suspend forever. And for servers, if you are rebooting you are doing something wrong. So pulling efforts from building controversial init systems to optimize hibernate&#x2F;suspend in the kernel would be a better effort on this field.
评论 #8375809 未加载
stephen_g超过 10 年前
There&#x27;s a lot of negativity going on here...<p>As far as my experience goes, I&#x27;ve found it actually works really well on all the servers I&#x27;ve moved to CentOS 7 and on the Fedora desktop I play around with (my main dev machines are Macs) it&#x27;s significantly improved boot time...<p>I&#x27;m sure there are some valid concerns about design and such, but as far as my usage in production goes, I can&#x27;t say I&#x27;ve had a single problem with it... It makes it a lot easier when I need to write files then the messy init scripts before also.
dschiptsov超过 10 年前
Out of confused mind.)<p>There is <i>no fundamental problem</i> that it &quot;solves&quot; which other UNIXes presumably still does have. The problem does not exist. AIX, Solaris, *BSD and many old-school Linux guys will tell you that.<p>Also, any old-school guy will tell you that a kitchen-sink, put-it-all-in design is a wrong way.<p>btw, user processes supervision is a task of an OS kernel, which it handles via a bunch of specialized syscalls, not of some &quot;man-in-the-middle&quot; user-level daemons.<p>There is actually nothing to talk about, except some ambitions and bad designs.
评论 #8354498 未加载
评论 #8355842 未加载
评论 #8356031 未加载