LWN.net Logo

Poettering: systemd for Administrators, Part XVIII (controllers)

The eighteenth installment of Lennart Poettering's "systemd for Administrators" series covers an interesting newish feature: integrated support for control group resource controllers. "When thinking about service management for systemd, we quickly realized that resource management must be core functionality of it. In a modern world -- regardless if server or embedded -- controlling CPU, Memory, and IO resources of the various services cannot be an afterthought, but must be built-in as first-class service settings. And it must be per-service and not per-process as the traditional nice values or POSIX Resource Limits were."

Followers of the series may also want to take a peek at Part XVII, covering management of the journal.


(Log in to post comments)

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 24, 2012 14:57 UTC (Wed) by anatolik (subscriber, #73797) [Link]

Lennart, great article (as usual). Is there any pdf or printable single page with the whole series of systemd articles?

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 24, 2012 19:07 UTC (Wed) by mjh (guest, #87431) [Link]

The mere fact that there's an /18/ part series tells me all I need to know about systemd. Stop trying to help, Lennart.

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 24, 2012 19:18 UTC (Wed) by Cyberax (✭ supporter ✭, #52523) [Link]

My "UNIX and Linux System Administration Handbook" is 1300 pages long. That tells me all I need to know about Linux. Stop trying to help, kernel developers! My DOS manual was just 6 pages!

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 24, 2012 22:04 UTC (Wed) by rgmoore (✭ supporter ✭, #75) [Link]

So you prefer it when developers just dump a bunch of code out there and don't bother to document it? I actually like it when a developer bothers to explain what their code does and how to use it.

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 24, 2012 22:35 UTC (Wed) by rahulsundaram (subscriber, #21946) [Link]

Let me get this straight Lennart's problem is being too communicative?

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 24, 2012 22:57 UTC (Wed) by dlang (✭ supporter ✭, #313) [Link]

No, the problem is in creating a new Init replacement that is so complex that it needs an 18 part explanation of how it works and how it should be used.

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 24, 2012 23:30 UTC (Wed) by cry_regarder (subscriber, #50545) [Link]

If one documented how to get the same capabilities with the old system it would be as bad or worse.

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 24, 2012 23:46 UTC (Wed) by Cyberax (✭ supporter ✭, #52523) [Link]

I reiterate my comment. The Unix administration book ( http://admin.com ) has more than 100 pages dedicated to daemons, booting, services and logging.

Should we stop doing all this unix-y crap and return to clean and pure world of AUTOEXEC.BAT and config.sys?

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 25, 2012 11:21 UTC (Thu) by k8to (subscriber, #15413) [Link]

Because discussions of all aspects of multiple implementations of an entire operating system is comparable to one single component which used to be simple?

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 25, 2012 12:15 UTC (Thu) by rahulsundaram (subscriber, #21946) [Link]

From a ISV view, all the different quirks and incompatibilities with distro specific additions to sysv were hardly simple. It was convoluted and poorly documented. systemd is a huge step up.

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 25, 2012 15:59 UTC (Thu) by Cyberax (✭ supporter ✭, #52523) [Link]

Used to be simple? LOL.

SysV scripts were never simple. They are almost always brittle and unreliable pieces of crap. Especially cross-distribution scripts (LSB? Ha!).

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 25, 2012 18:26 UTC (Thu) by akeane (subscriber, #85436) [Link]

>No, the problem is in creating a new Init replacement that is so complex that it needs an 18 part explanation of how it works and how it should be used.

Well spoken Mr Lang!

To be fair though, I do like the Roman numerals, it gives a nice classical feel to the whole proceedings!

akeane@superfrog-dev: man XVIII systemd
No manual entry for XVIII
No manual entry for systemd
akeane@superfrog-dev: Ah, man; echo $?
I pity the fool who uses systemd, and keep your new fangled Init "systems" AWAY from MR T's van and BINS!

akeane@superfrog-dev: :-(

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 26, 2012 21:39 UTC (Fri) by jond (subscriber, #37669) [Link]

This criticism is such empty nonsense. It's 18 blog posts, not 18 academic papers. They're very well written, illustrated with example outputs, etc. etc.

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 25, 2012 18:09 UTC (Thu) by akeane (subscriber, #85436) [Link]

>Let me get this straight Lennart's problem is being too communicative?

No, just writing "too much" code.

Where "too much" is #defined as any...

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 25, 2012 0:16 UTC (Thu) by nix (subscriber, #2304) [Link]

Michael Kerrisk's _The Linux Programming Interface_ is 1506 pages long. The Linux API is clearly far too complicated and should be replaced with something with, uh, less documentation. Since 'the less documentation the better' is the right way to judge any program.

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 25, 2012 15:39 UTC (Thu) by Kit (guest, #55925) [Link]

Just quickly jumping between a few, it doesn't look like any of them are all that long. It's "18-parts" because it looks like each one is just covering a single feature (or maybe feature family). Claiming that's too much seems rather absurd to me... since when was documenting something a BAD thing?

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 26, 2012 9:20 UTC (Fri) by jezuch (subscriber, #52988) [Link]

I guess the optimal outcome would be an init system with documentation that reads:

"Install. It works."

I'd also like every CPU to have a DWIM instruction.

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 26, 2012 21:10 UTC (Fri) by intgr (subscriber, #39733) [Link]

> "Install. It works."

I believe systemd actually comes the closest of all init systems. Many upstream packages already ship systemd units -- just "make install" and possibly "systemctl enable foo" required. Compared to SysV where your distro's package maintainer duplicated a shell script for each package, and assigned a "priority number" on an arbitrary scale to order service startup.

It also replaces several other pieces that had to be manually configured before. As the article mentiones, systemd services share CPU time equally by default, not depending on the number of processes they have like before.

And many more I can think of: Most systemd users probably don't even realize that it includes a readahead tool for speeding up system startup. It works without any hacks and configuration within LXC/namespace containers. If you want a serial console, you only need to configure it in one place (on the kernel command line). Instead of distros supplying acpid and a maintainer-written script for power button events, systemd has a simple built-in default policy -- so shutting down VMs from the host works out of the box. And many more that I can't remember right now.

So, many things that seem like duct-taped together in other systems (usually by distro package maintainers), or things that required unnecessary amounts of fiddling and configuration -- now systemd does The Right Thing using a sensible built-in policy and provides straightforward configuration options.

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Nov 2, 2012 14:53 UTC (Fri) by knobunc (subscriber, #4678) [Link]

My only complaint with systemd is that I can't work out how to tell it to unmount and unlock a filesystem so I can fsck it.

I have an external SATA drive that I use for backups. Occasionally I have need to do:
> umount /backup
> e2fsck /dev/sde1

However, the fsck fails because systemd has locked the device.

I have tried systemd stop of various unit names, but have never found the right one to make systemd not hold a lock on the device.

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Nov 2, 2012 15:22 UTC (Fri) by raven667 (subscriber, #5198) [Link]

lsof might be your friend here to identify what is touching the device.

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Nov 2, 2012 15:45 UTC (Fri) by knobunc (subscriber, #4678) [Link]

It did. It is process 1 (i.e. systemd). That's why I need to tell systemd to release it...

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Nov 2, 2012 16:45 UTC (Fri) by rahulsundaram (subscriber, #21946) [Link]

file a bug report

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 28, 2012 16:19 UTC (Sun) by nix (subscriber, #2304) [Link]

I'd also like every CPU to have a DWIM instruction.
I protest on the entirely self-serving basis that this would leave half of us here out of a job. :)

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 25, 2012 6:07 UTC (Thu) by davidstrauss (subscriber, #85867) [Link]

This is not a very newish feature. It's broadly (possibly completely) supported in the systemd that ships with Fedora 16 and later. Fedora 15 had limited support.

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 26, 2012 21:17 UTC (Fri) by JEFFREY (subscriber, #79095) [Link]

The twenty-second installment of Lennart Poettering's "systemd for Administrators" series covers an interesting newish feature: integrated support for automobile climate controllers. "When thinking about the morning commute, we quickly realized that climate management must be core functionality of systemd.

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 27, 2012 12:17 UTC (Sat) by akeane (subscriber, #85436) [Link]

>The twenty-second installment of Lennart Poettering's "systemd for Administrators" series covers an interesting newish feature: integrated support for automobile climate controllers. "When thinking about the morning commute, we quickly realized that climate management must be core functionality of systemd.

Sir, my apologies, but it is imperative that I correct you in your above assertion:

It should be: The XXII installment of Lennart Poettering's "How to dismiss UNIX's core values and philosophy, and ruin it for everyone"

Other than that, I believe a "HIGH FIVE" is in order!


Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 27, 2012 15:44 UTC (Sat) by raven667 (subscriber, #5198) [Link]

Haha that's funny.

To be serious for a second though, UNIX is a computer operating system, not philosophy. If you let your preconceived ideas prevent you from making practical, rational decisions then you are going to be less successful at your goals, running software, than someone who is self critical and isn't locked in a culture of dogma. Making the system work technically better, IMHO, isn't "ruining" it just because it's a little different.

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 29, 2012 16:28 UTC (Mon) by akeane (subscriber, #85436) [Link]

>To be serious for a second though, UNIX is a computer operating system, not philosophy.

Let's be serious, and, hence quite, quite boring for III+ seconds...

UNIX is an implementation of a philosophy; that rascal ESR even wrote a book a bit about it, and he's got guns!

>If you let your preconceived ideas prevent you from making practical, rational decisions

Well, they are "preconceived" (google translation:(well thought out)), because a lot of very clever people, thought about them way before you and I, and you know what?

I respect that, do you really want to discard that knowledge and learning for something else just cause it's new?

There's like, OMG! a billion Android devices out there right now, not including all the other embedded linux devices out there, just ticking away nice and reliably, they just work.

Not a bad philosophy, I reckon!

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 29, 2012 17:06 UTC (Mon) by raven667 (subscriber, #5198) [Link]

Your wit knows no bounds. 8-)

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 29, 2012 17:26 UTC (Mon) by anselm (subscriber, #2796) [Link]

I respect that, do you really want to discard that knowledge and learning for something else just cause it's new?

People don't go for systemd because it is new. They go for systemd because in many respects it works better than what was used before.

It is funny how most of the arguments the SysV-init proponents use against systemd today (it is too complicated, it solves problems that don't exist, the existing solutions are powerful enough, …) might have been used against SysV init when that was new in the 1980s. The only argument against systemd that would not have applied to SysV init at the time seems to be »it was written by Lennart Poettering«.

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 29, 2012 17:49 UTC (Mon) by Cyberax (✭ supporter ✭, #52523) [Link]

> There's like, OMG! a billion Android devices out there right now, not including all the other embedded linux devices out there, just ticking away nice and reliably, they just work.

And you might note, that these Android devices got rid of most of that UNIX stuff you're talking about. X11 - gone, UNIX service infrastructure - gone, shell-based design - gone, etc.

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 29, 2012 19:58 UTC (Mon) by raven667 (subscriber, #5198) [Link]

I think he's just making fun of the standard argument now-a-days where someone tries to end the conversation by saying " ... but a billion Android devices (can't be wrong)!". As I recall from previous conversations, akeane is exceptionally dry-witted.

Poettering: systemd for Administrators, Part XVIII (controllers)

Posted Oct 28, 2012 18:25 UTC (Sun) by rgmoore (✭ supporter ✭, #75) [Link]

The XVIII meeting of the "We hate systemd because it was written by Lennart Poettering club" is now called to order.

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds