Is it worth using tmpfs for some directories(/var/run, lock...) ?
This is ubuntu /proc/mounts:
rootfs / rootfs rw 0 0 none /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0 none /proc proc rw,nosuid,nodev,noexec,relatime 0 0 none /dev devtmpfs rw,relatime,size=4092312k,nr_inodes=1023078,mode=755 0 0 none /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0 /dev/disk/by-uuid/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx / ext4 rw,relatime,errors=remount-ro,barrier=1,data=ordered 0 0 none /sys/fs/fuse/connections fusectl rw,relatime 0 0 none /sys/kernel/debug debugfs rw,relatime 0 0 none /sys/kernel/security securityfs rw,relatime 0 0 none /dev/shm tmpfs rw,nosuid,nodev,relatime 0 0 none /var/run tmpfs rw,nosuid,relatime,mode=755 0 0 none /var/lock tmpfs rw,nosuid,nodev,noexec,relatime 0 0 none /lib/init/rw tmpfs rw,nosuid,relatime,mode=755 0 0 binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,nosuid,nodev,noexec,relatime 0 0 gvfs-fuse-daemon /home/xuser/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
On Sat, 22.05.10 18:30, Xose Vazquez Perez (xose.vazquez@gmail.com) wrote:
Is it worth using tmpfs for some directories(/var/run, lock...) ?
Yes. But this requires some changes all across the distro, just have a look at the output of "rpm -qf /var/run/*".
That said most apps are fixed by now and don't choke when their subdir in /var/run goes away on reboot, since both SUSE and Ubuntu are using tmpfs on /var/run, and have done most of the work. So at this point this should be mostly packaging work (%ghost in .spec files!), not programming work to make /var/run compatible with tmpfs.
(And as a side note: systemd by default puts a tmpfs to both /var/run and /var/lock).
Lennart
I'd love to play with it. Is systemd stable enough to try it on Fedora 13?
-Ilyes Gouta
On Sat, May 22, 2010 at 10:10 PM, Rahul Sundaram metherid@gmail.com wrote:
On 05/23/2010 02:36 AM, Lennart Poettering wrote:
(And as a side note: systemd by default puts a tmpfs to both /var/run and /var/lock).
So do you plan on getting it by default for Fedora 14? :-)
Rahul
devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel
On Sat, 22.05.10 22:11, Ilyes Gouta (ilyes.gouta@gmail.com) wrote:
I'd love to play with it. Is systemd stable enough to try it on Fedora 13?
Well, I guess you should really know what you do if you try that.
That said, if you steal the libcgroup and udev version from rawhide (which is unproblematic, as they have no further dependencies) you should be able to compile systemd on F13 just fine. "make install" should then set up everything for you so that you can boot with systemd simply by passing "init=/usr/local/bin/systemd" on the kernel command line. The glue file tarball mentioned on the blog story is not necessary anymore.
However, if you try this you won't see too many changes from the normal F13, simply because the whole system is booted up with the same shell scripts as always, though we start the services a little bit more in parallel and everything is neatly sorted into its own cgroup below /cgroup/systemd and supervised by systemd.
The necessary changes to make the system boot up fully parallelized using socket/bus based activation the way I explained on my blog story currently exist only ony own harddisk. I'll publish them soonishly. But since this involves patches to various packages (10 or so) this won't be trivial to setup.
All that said, I do run my normal machines on systemd these days. And it is fun and works well.
Lennart
On Sun, 23.05.10 02:40, Rahul Sundaram (metherid@gmail.com) wrote:
On 05/23/2010 02:36 AM, Lennart Poettering wrote:
(And as a side note: systemd by default puts a tmpfs to both /var/run and /var/lock).
So do you plan on getting it by default for Fedora 14? :-)
Well, I am certainly planning to have a package for it in F14. But whether we can have it as default is to be seen.
ATM everything looks rosy. I just finished porting over all F13 installed-by-default daemons to socket activation, and a few more (and the patches are good enough to be upstreamable). I'll publish the numbers of a 100% socket-activated boot soon. Codewise only very little is missing to be fully ready for Fedora (in fact selinux support is the only item really mattering on my todo list).
So far response from the community has been very positive, but we didn't have a fedora-devel discussion about this yet, so we'll have to see whether we can somehow make the broader community as enthusiastic about the whole idea as I am. ;-)
(some of the systemd-related work in other projects already hit rawhide btw, e.g. in udev)
A little bit down the road I'll make my mind up whether I plan to suggest as a default for F14, and then propose that on fedora-devel and FESCO. Stay tuned.
It would certainly be a shame though if other distros would ship systemd by default before we do.
Lennart
On 05/23/2010 04:04 AM, Lennart Poettering wrote:
ATM everything looks rosy. I just finished porting over all F13 installed-by-default daemons to socket activation, and a few more (and the patches are good enough to be upstreamable). I'll publish the numbers of a 100% socket-activated boot soon. Codewise only very little is missing to be fully ready for Fedora (in fact selinux support is the only item really mattering on my todo list).
It would great to have a repo or something to try it out quickly and provide some feedback.
Rahul
On Sun, 23.05.10 04:10, Rahul Sundaram (metherid@gmail.com) wrote:
On 05/23/2010 04:04 AM, Lennart Poettering wrote:
ATM everything looks rosy. I just finished porting over all F13 installed-by-default daemons to socket activation, and a few more (and the patches are good enough to be upstreamable). I'll publish the numbers of a 100% socket-activated boot soon. Codewise only very little is missing to be fully ready for Fedora (in fact selinux support is the only item really mattering on my todo list).
It would great to have a repo or something to try it out quickly and provide some feedback.
hughsie prepped some packages for systemd, but I cannot really tell you right now where they are available.
Richard?
And I am not sure if my own yum-fu is good enough to provide you with a repo which you can just install everything from, including the patched daemons...
Lennart
On 22 May 2010 23:51, Lennart Poettering mzerqung@0pointer.de wrote:
hughsie prepped some packages for systemd, but I cannot really tell you right now where they are available.
systemd package available here: http://people.freedesktop.org/~hughsient/fedora/
The patched daemons are not available yet, so it doesn't yet work very well. Caveat emptor.
Richard.
Hi,
systemd package available here: http://people.freedesktop.org/~hughsient/fedora/
Thanks!
Please be patient. To quote myself: "I'll publish the numbers of a 100% socket-activated boot soon."
I won't miss that.
Regards, Ilyes Gouta.
On Sun, May 23, 2010 at 7:32 AM, Richard Hughes hughsient@gmail.com wrote:
On 22 May 2010 23:51, Lennart Poettering mzerqung@0pointer.de wrote:
hughsie prepped some packages for systemd, but I cannot really tell you right now where they are available.
systemd package available here: http://people.freedesktop.org/~hughsient/fedora/
The patched daemons are not available yet, so it doesn't yet work very well. Caveat emptor.
Richard.
devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel
Hey Lennart,
So how fast is a systemd boot (with all the changes to the scripts) compared to the current F13 setup? How about a ratio?
-Ilyes Gouta
On Sat, May 22, 2010 at 11:40 PM, Rahul Sundaram metherid@gmail.com wrote:
On 05/23/2010 04:04 AM, Lennart Poettering wrote:
ATM everything looks rosy. I just finished porting over all F13 installed-by-default daemons to socket activation, and a few more (and the patches are good enough to be upstreamable). I'll publish the numbers of a 100% socket-activated boot soon. Codewise only very little is missing to be fully ready for Fedora (in fact selinux support is the only item really mattering on my todo list).
It would great to have a repo or something to try it out quickly and provide some feedback.
Rahul
-- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel
On Sun, 23.05.10 00:04, Ilyes Gouta (ilyes.gouta@gmail.com) wrote:
Heya,
So how fast is a systemd boot (with all the changes to the scripts) compared to the current F13 setup? How about a ratio?
Please be patient. To quote myself: "I'll publish the numbers of a 100% socket-activated boot soon."
Lennart
On 05/23/2010 05:21 AM, Lennart Poettering wrote:
On Sun, 23.05.10 00:04, Ilyes Gouta (ilyes.gouta@gmail.com) wrote:
Heya,
So how fast is a systemd boot (with all the changes to the scripts) compared to the current F13 setup? How about a ratio?
Please be patient. To quote myself: "I'll publish the numbers of a 100% socket-activated boot soon."
To get the ball rolling, I have written up a feature proposal and filed a review request
https://fedoraproject.org/wiki/Features/systemd
https://bugzilla.redhat.com/show_bug.cgi?id=598299
It probably requires a lot more work but it is a start.
Rahul
On Sat, May 22, 2010 at 11:34 PM, Lennart Poettering mzerqung@0pointer.de wrote:
On Sun, 23.05.10 02:40, Rahul Sundaram (metherid@gmail.com) wrote:
On 05/23/2010 02:36 AM, Lennart Poettering wrote:
(And as a side note: systemd by default puts a tmpfs to both /var/run and /var/lock).
So do you plan on getting it by default for Fedora 14? :-)
Well, I am certainly planning to have a package for it in F14. But whether we can have it as default is to be seen.
ATM everything looks rosy. I just finished porting over all F13 installed-by-default daemons to socket activation, and a few more (and the patches are good enough to be upstreamable). I'll publish the numbers of a 100% socket-activated boot soon. Codewise only very little is missing to be fully ready for Fedora (in fact selinux support is the only item really mattering on my todo list).
So far response from the community has been very positive, but we didn't have a fedora-devel discussion about this yet, so we'll have to see whether we can somehow make the broader community as enthusiastic about the whole idea as I am. ;-)
(some of the systemd-related work in other projects already hit rawhide btw, e.g. in udev)
A little bit down the road I'll make my mind up whether I plan to suggest as a default for F14, and then propose that on fedora-devel and FESCO. Stay tuned.
If its possible to turn it on in a spin for testing I would quite happily volunteer the Moblin/Meego spin to be a test platform for F-14 if its decided its too risky to do for the main platform. In terms of services its very minimal so it might be a good starter.
Peter
Lennart Poettering wrote:
So far response from the community has been very positive, but we didn't have a fedora-devel discussion about this yet, so we'll have to see whether we can somehow make the broader community as enthusiastic about the whole idea as I am. ;-)
I, for one, think systemd should be the default ASAP.
Kevin Kofler
On 05/23/2010 04:19 AM, Kevin Kofler wrote:
Lennart Poettering wrote:
So far response from the community has been very positive, but we didn't have a fedora-devel discussion about this yet, so we'll have to see whether we can somehow make the broader community as enthusiastic about the whole idea as I am. ;-)
I, for one, think systemd should be the default ASAP.
Perhaps the first time I can recall that we have agreed. ;)
~spot
On Mon, May 24, 2010 at 09:05:31AM -0400, Tom spot Callaway wrote:
On 05/23/2010 04:19 AM, Kevin Kofler wrote:
Lennart Poettering wrote:
So far response from the community has been very positive, but we didn't have a fedora-devel discussion about this yet, so we'll have to see whether we can somehow make the broader community as enthusiastic about the whole idea as I am. ;-)
I, for one, think systemd should be the default ASAP.
Perhaps the first time I can recall that we have agreed. ;)
~spot
Any particular reason on either of your parts?
Just about everything in systemd is either set to be in upstart (simpler dependency syntax, xinetd-style service activation) or was discarded by it years ago (cgroups are a dead end).
The assumption that just because its new means its more advanced is in this case a bit misguided.
--CJD
-- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel
On Tue, 25.05.10 10:21, Casey Dahlin (cdahlin@redhat.com) wrote:
On Mon, May 24, 2010 at 09:05:31AM -0400, Tom spot Callaway wrote:
On 05/23/2010 04:19 AM, Kevin Kofler wrote:
Lennart Poettering wrote:
So far response from the community has been very positive, but we didn't have a fedora-devel discussion about this yet, so we'll have to see whether we can somehow make the broader community as enthusiastic about the whole idea as I am. ;-)
I, for one, think systemd should be the default ASAP.
Perhaps the first time I can recall that we have agreed. ;)
~spot
Any particular reason on either of your parts?
Just about everything in systemd is either set to be in upstart (simpler dependency syntax, xinetd-style service activation) or was discarded by it years ago (cgroups are a dead end).
Oh, is that so?
Have you actually read the blog story I put together?
Why do you say "cgroups are a dead end"? Sure, Scott claims that, but uh, it's not the only place where he is simply wrong and his claims baseless. In fact it works really well, and is one of the strong points in systemd. I simply see no alternative for it. The points Scott raised kinda showed that he never really played around with them.
Please read up on cgroups, before you just dismiss technology like that as "dead end".
The assumption that just because its new means its more advanced is in this case a bit misguided.
Well, please read the blog story. I know it's long, but it should be an interesting read. The whole point of the blog story is to make clear the reason systemd exists is purely technical, and that we think our design is simply the better one.
We didn't do systemd for political reasons.
We didn't do systemd just to do things differently.
We did systemd because we thought that technically Upstart is fundamentally flawed and misses out on so many opportunities.
And if you cannot see that then I can only beg you to read the blog story, because it goes into much detail about all the technical features.
Please, judge systemd on technical grounds, don't judge it on political, or emotional grounds.
Thank you,
Lennart
On Tue, May 25, 2010 at 7:45 AM, Lennart Poettering mzerqung@0pointer.de wrote:
Please, judge systemd on technical grounds, don't judge it on political, or emotional grounds.
"I'll publish the numbers of a 100% socket-activated boot soon."
I would love to have the necessary data to have an informed public discussion on the technical merits which include some benchmarking and some cookie cutter packages to play around with. I want t be given a chance to rig up some pathological poor performance systemd benchmarks that you can publicly cut to shreds as part of the educational process.
My one concern about the current discussion is that the decision to move to systemd in the timeframe of F14 is being rushed ahead of the aforementioned technical judgement. I can understand your personal enthusiasm for the move as you are intimately familiar with systemd. But I'm not sure its adequate to rush ahead until we all have a better feel on how this works in practise... and how much work its going to take to convert all our existing packages to systemd styled startup. The back and forth on your blog between yourself and Tim Waugh about cups service activation, for example, is something I think we all need to understand. I think there is a lot buried in that discussion about how complex some of our existing services are going to look under systemd styled configuration.
-jef
On Tue, 2010-05-25 at 09:00 -0800, Jeff Spaleta wrote:
On Tue, May 25, 2010 at 7:45 AM, Lennart Poettering mzerqung@0pointer.de wrote:
Please, judge systemd on technical grounds, don't judge it on political, or emotional grounds.
"I'll publish the numbers of a 100% socket-activated boot soon."
I would love to have the necessary data to have an informed public discussion on the technical merits which include some benchmarking and some cookie cutter packages to play around with. I want t be given a chance to rig up some pathological poor performance systemd benchmarks that you can publicly cut to shreds as part of the educational process.
My one concern about the current discussion is that the decision to move to systemd in the timeframe of F14 is being rushed ahead of the aforementioned technical judgement. I can understand your personal enthusiasm for the move as you are intimately familiar with systemd. But I'm not sure its adequate to rush ahead until we all have a better feel on how this works in practise... and how much work its going to take to convert all our existing packages to systemd styled startup. The back and forth on your blog between yourself and Tim Waugh about cups service activation, for example, is something I think we all need to understand. I think there is a lot buried in that discussion about how complex some of our existing services are going to look under systemd styled configuration.
-jef
Right now, it's not about speed. Speed is one thing, and somewhat important. But doing it right is also important. Make it right, then make it fast, because if you try to make it fast first, you'll often be doing it wrong.
On Tue, May 25, 2010 at 9:09 AM, Jesse Keating jkeating@redhat.com wrote:
Right now, it's not about speed. Speed is one thing, and somewhat important. But doing it right is also important. Make it right, then make it fast, because if you try to make it fast first, you'll often be doing it wrong.
He offered benchmarks early in the thread and told us to be patient .... anyways.
No its not about the "speed". But if I'm reading the blog story correctly, conversion from sysV to native systemd configuration should have an observable in some sort of performance metric. I learn best from constructing tangible pathelogical situations, watching it break, and then poking at the twitching, smoldering pieces.
Like I said... we need to have more discussion a long the lines of what I saw concerning how cups and other services will work in a systemd setting. We have to have a feel for the complexity of configuration.
We'll also need to have good examples showing the sysV and inetd compatibility at work. Not that I don't trust what was written in the blog story, but having tangible example of a parallel installable systemd that used the existing SySV styled init scripts as a precursor for a serious discussion is going to go a long way at helping the signal to noise ratio. I didn't see the systemd packages in the people space Richard pointed to. Can someone point me to an updated url?
-jef
On Tue, 25.05.10 09:42, Jeff Spaleta (jspaleta@gmail.com) wrote:
Like I said... we need to have more discussion a long the lines of what I saw concerning how cups and other services will work in a systemd setting. We have to have a feel for the complexity of configuration.
We'll also need to have good examples showing the sysV and inetd compatibility at work. Not that I don't trust what was written in the blog story, but having tangible example of a parallel installable systemd that used the existing SySV styled init scripts as a precursor for a serious discussion is going to go a long way at helping the signal to noise ratio. I didn't see the systemd packages in the people space Richard pointed to. Can someone point me to an updated url?
OK, here's an example, for a relatively modern and clean daemon, the dbus system bus. Its SysV init script is relatively simple (see /etc/init.d/messagebus). And the configuration to make it socket-bus activatable would be even simpler and look like this:
You'd have two units, one for the socket:
http://0pointer.de/public/dbus.socket
The contents should be pretty self-explanatory.
And one for the service itself, that is activated when the socket units receives traffic:
http://0pointer.de/public/dbus.service
This one is pretty self-explanatory too I guess. It defines some requirement and ordering dependencies, to make sure that dbus is started after the initial base system is set up and after the socket itself is set up. (Later on we might even drop part of those ordering dependencies, since dbus could run much earlier at boot-up if it was simply using an abstract namespace socket, instead of relying on a writable /var. But that's another discussion)
(Oh, don't try to run actually use that .socket and .service file, you need my patches that add --address to dbus daemon, and the special "systemd:" address)
Lennart
On Tue, 25 May 2010 09:00:58 -0800 Jeff Spaleta jspaleta@gmail.com wrote:
On Tue, May 25, 2010 at 7:45 AM, Lennart Poettering mzerqung@0pointer.de wrote:
Please, judge systemd on technical grounds, don't judge it on political, or emotional grounds.
"I'll publish the numbers of a 100% socket-activated boot soon."
I would love to have the necessary data to have an informed public discussion on the technical merits which include some benchmarking and some cookie cutter packages to play around with. I want t be given a chance to rig up some pathological poor performance systemd benchmarks that you can publicly cut to shreds as part of the educational process.
My one concern about the current discussion is that the decision to move to systemd in the timeframe of F14 is being rushed ahead of the aforementioned technical judgement. I can understand your personal enthusiasm for the move as you are intimately familiar with systemd. But I'm not sure its adequate to rush ahead until we all have a better feel on how this works in practise... and how much work its going to take to convert all our existing packages to systemd styled startup. The back and forth on your blog between yourself and Tim Waugh about cups service activation, for example, is something I think we all need to understand. I think there is a lot buried in that discussion about how complex some of our existing services are going to look under systemd styled configuration.
I second that.
I'd like to remember that there are *many* upstreams are going to resistant to this change. A lot of upstream projects need to be compatible to a lot of Linux and Unix systems, even old ones, so before they move they want guarantee that this is really going to be the next thing. That means that until most distributions start using systemd they are not going to do the work.
So before it is rushed in it is paramount that tests are done with those application s that will not have systemd support and make sure there is not going to be regressions there.
Simo.
On Tue, 25.05.10 13:15, Simo Sorce (ssorce@redhat.com) wrote:
My one concern about the current discussion is that the decision to move to systemd in the timeframe of F14 is being rushed ahead of the aforementioned technical judgement. I can understand your personal enthusiasm for the move as you are intimately familiar with systemd. But I'm not sure its adequate to rush ahead until we all have a better feel on how this works in practise... and how much work its going to take to convert all our existing packages to systemd styled startup. The back and forth on your blog between yourself and Tim Waugh about cups service activation, for example, is something I think we all need to understand. I think there is a lot buried in that discussion about how complex some of our existing services are going to look under systemd styled configuration.
I second that.
I'd like to remember that there are *many* upstreams are going to resistant to this change. A lot of upstream projects need to be compatible to a lot of Linux and Unix systems, even old ones, so before they move they want guarantee that this is really going to be the next thing. That means that until most distributions start using systemd they are not going to do the work.
They don't *need* to move. It's not an exclusive disjunction, that you'd have to support either systemd or not systemd. You can easily support both systemd activation and classic sysv from the same binary. The 10 daemons we have patched so far only needed about 10 lines of changes each to become socket-activatable. And those changes are nops unless $LISTEN_FDS is set.
Or in other words: moving to systemd is a gradual process, where for every service we can decide indivdually how we want to do it:
1) continue use a classic sysv init script 2) provide a native unit file 3) provide a native unit file and do socket/bus based activation
And all that for the same binary.
As mentioned I have now patched the 10 daemons or so we ship by default (and a few more) to become socket activatable. If we can merge those upstream and into our packages we already are a big step ahead and everything else can come later.
Lennart
Simo Sorce wrote:
I'd like to remember that there are *many* upstreams are going to resistant to this change. A lot of upstream projects need to be compatible to a lot of Linux and Unix systems, even old ones, so before they move they want guarantee that this is really going to be the next thing. That means that until most distributions start using systemd they are not going to do the work.
So we just patch them in Fedora. This kind of integration work is what a distribution is for.
Kevin Kofler
On Tue, 25 May 2010, Simo Sorce wrote:
I'd like to remember that there are *many* upstreams are going to resistant to this change. A lot of upstream projects need to be compatible to a lot of Linux and Unix systems, even old ones, so before they move they want guarantee that this is really going to be the next thing. That means that until most distributions start using systemd they are not going to do the work.
So before it is rushed in it is paramount that tests are done with those application s that will not have systemd support and make sure there is not going to be regressions there.
Even bigger question: The architecture has to be correct.
Systemd is trying to solve dependencies between applications by considering simple FD activity (by acting as a proxy for applications). However, there almost certainly are more complex, logical dependencies which are not visible to systemd, and hence which apps will still have to deal with and resolve between themselves.
In short, we will still need that app-layer. We need to consider how that impacts architecturally on the worth of solving a subset of problems in a lower layer.
regards,
On Tue, 25.05.10 09:00, Jeff Spaleta (jspaleta@gmail.com) wrote:
On Tue, May 25, 2010 at 7:45 AM, Lennart Poettering My one concern about the current discussion is that the decision to move to systemd in the timeframe of F14 is being rushed ahead of the aforementioned technical judgement. I can understand your personal enthusiasm for the move as you are intimately familiar with systemd. But I'm not sure its adequate to rush ahead until we all have a better feel on how this works in practise... and how much work its going to take to convert all our existing packages to systemd styled startup. The back and forth on your blog between yourself and Tim Waugh about cups service activation, for example, is something I think we all need to understand. I think there is a lot buried in that discussion about how complex some of our existing services are going to look under systemd styled configuration.
Yes, if we'd adopt systemd in F14, then this would indeed be very quick. But as mentioned, I have not proposed it yet, and while I currently leaning towards that yes, I will propose it, I'll make my mind up later about this.
There is no need to convert all services to the native format right-away. Even normal SysV scripts should boot a little faster with systemd, since we parallelize them to the level the LSB headers allow that.
systemd plus the current scripts makes things a bit faster, systemd plus native unit files should make things quite a bit more faster.
If we chose to adopt it for F14 it would probably a good idea to have native files for everything that is installed by default at least. I have mostly written those files now, so this goal should not be too hard to reach, if we can convince all the maintainers involved to include them in their packages.
Regarding CUPS: systemd supports all triggers for service startup that launchd supports, and Apple (who develops CUPS) is starting it via launchd, on demand. Not sure how nicely CUPS-on-MacOS translates to CUPS-on-Fedora, but we can do things at least as nicely as they are on MacOS. There, CUPS is started whenever
1. a local printer is plugged in 2. a local client wants to access its services 3. there's a file in the printer queue, possibly from before the last reboot
We can translate those rules 1:1 for systemd. And then we could optionally add one more rule:
4. start cups anyway, on boot.
That way we would still benefit from the fully parallelized bootup the socket based activation allows, but of course lose the on-demand nicety. Implementing rule #4 means adding a single symlink in /etc/systemd/system. We could for example choose to not have that symlink by default, but ask the administrator to create it if he sets up a multiplexing print server the way Tim suggested.
Lennart
tis 2010-05-25 klockan 20:30 +0200 skrev Lennart Poettering:
/etc/systemd/system. We could for example choose to not have that symlink by default, but ask the administrator to create it if he sets up a multiplexing print server the way Tim suggested.
Wouldn't it be started automatically anyway when something connects to systemd's *:631 socket?
/Alexander
On Tue, 25.05.10 20:38, Alexander Boström (abo@root.snowtree.se) wrote:
tis 2010-05-25 klockan 20:30 +0200 skrev Lennart Poettering:
/etc/systemd/system. We could for example choose to not have that symlink by default, but ask the administrator to create it if he sets up a multiplexing print server the way Tim suggested.
Wouldn't it be started automatically anyway when something connects to systemd's *:631 socket?
Yes, absolutely.
Tim's point originally was about two things:
1) what if browsing for daemons takes a long time and hence starting cupsd only when somebody opens the print dialog might not make some people happy if the print dialog is only populated with printers after a minute of searching or so. I personally believe that this is a problem of the browsing protocol, as mDNS/DNS-SD does not suffer by problems like this and should provide the list of printers in under a second in any case. (browsing protocols should probably query the network for printers only when somebody actually want to see the data and not alraedy in advance like cups native browsing protocol is currently doing, simply to minimize the traffic this generates)
2) What happens if a print server is merely a "router" for print jobs, and exclusively publishes *non-local* printers on the network for browsing. That machine wouldn't have any local printer then and starting the cups daemon on-demand would not suffice since the machine would have to announce the printer on the network first.
Lennart
Lennart Poettering wrote:
If we chose to adopt it for F14 it would probably a good idea to have native files for everything that is installed by default at least. I have mostly written those files now, so this goal should not be too hard to reach, if we can convince all the maintainers involved to include them in their packages.
I think that if the maintainers don't do it, it should just be done by a provenpackager. This is global distro integration and needs to be done at global distro level.
Kevin Kofler
On Tue, 2010-05-25 at 17:45 +0200, Lennart Poettering wrote:
Please, judge systemd on technical grounds, don't judge it on political, or emotional grounds.
I'm not trying to "judge" it at all. But when the first thing I really hear about a project is "we should replace our init system", my ears prick up and I start to dig to find out what the new thing is (which I admit I had never heard of) and why the rush. I'll read your blog again, and I'm sure you have good ideas, I'm just not keen to see us rush into replacing the init system again without some good co-ordination (I'm not just thinking with my RHEL hat on, but I admit to also thinking about other users of the base bits in the future).
I'll shutup now and read your blog.
Jon.
On 05/25/2010 08:44 PM, Jon Masters wrote:
On Tue, 2010-05-25 at 17:45 +0200, Lennart Poettering wrote:
Please, judge systemd on technical grounds, don't judge it on political, or emotional grounds.
I'm not trying to "judge" it at all. But when the first thing I really hear about a project is "we should replace our init system", my ears prick up and I start to dig to find out what the new thing is (which I admit I had never heard of) and why the rush. I'll read your blog again, and I'm sure you have good ideas, I'm just not keen to see us rush into replacing the init system again without some good co-ordination (I'm not just thinking with my RHEL hat on, but I admit to also thinking about other users of the base bits in the future).
I'll shutup now and read your blog.
Jon.
It doesn't have to be a "rush". systemd can easily be an alternative init system in F14, if the services provide LSB initscripts. Our goal for F14 should be to try to get the socket activation patches upstream, which are really not obtrusive. The decision if and when to switch to systemd can be made later on. We are not in a hurry. Even after some releases with upstart our initscripts have not yet been ported to upstart event files, which says a lot IMHO :-)
On Tue, May 25, 2010 at 05:45:07PM +0200, Lennart Poettering wrote:
On Tue, 25.05.10 10:21, Casey Dahlin (cdahlin@redhat.com) wrote:
On Mon, May 24, 2010 at 09:05:31AM -0400, Tom spot Callaway wrote:
On 05/23/2010 04:19 AM, Kevin Kofler wrote:
Lennart Poettering wrote:
So far response from the community has been very positive, but we didn't have a fedora-devel discussion about this yet, so we'll have to see whether we can somehow make the broader community as enthusiastic about the whole idea as I am. ;-)
I, for one, think systemd should be the default ASAP.
Perhaps the first time I can recall that we have agreed. ;)
~spot
Any particular reason on either of your parts?
Just about everything in systemd is either set to be in upstart (simpler dependency syntax, xinetd-style service activation) or was discarded by it years ago (cgroups are a dead end).
Oh, is that so?
Have you actually read the blog story I put together?
Yes, but I'm going to go read it again just to be sure.
Why do you say "cgroups are a dead end"? Sure, Scott claims that, but uh, it's not the only place where he is simply wrong and his claims baseless. In fact it works really well, and is one of the strong points in systemd. I simply see no alternative for it. The points Scott raised kinda showed that he never really played around with them.
Please read up on cgroups, before you just dismiss technology like that as "dead end".
I did. When upstart was about to use them. 2 years ago. We chucked them by the following LPC.
The problem we've found is that cgroups are too aggressive. They don't have a notion of sessions and count too much as being part of your service, so you end up with your screen session being counted as part of gdm.
This is why setsid was added to the netlink connector.
The assumption that just because its new means its more advanced is in this case a bit misguided.
Well, please read the blog story. I know it's long, but it should be an interesting read. The whole point of the blog story is to make clear the reason systemd exists is purely technical, and that we think our design is simply the better one.
So you have:
1) Socket activation. Part of Upstart's roadmap. Would happen sooner if you cared to submit the patch. We don't think its good enough by itself, hence the rest of Upstart, but a socket activation subsystem that could reach as far as systemd and even work standalone in settings where systemd can work is perfectly within Upstart's scope. I'd be happy to firm up the design details with you if you wanted to contribute patches.
2) Bus activation. Missed opportunity here to actually become the launchpoint for activated services. I won't criticize that too much though, as its usefulness is largely dependent on kernelspace DBus, which I've been trying to bludgeon Marcel Holtmann into turning over to the public for a year now.
3) Cutting down on the forking by replacing some of the shell scripts... cool 3a) With C code... really?
4) Process environment control. No complaints, and also nothing Upstart doesn't want to do.
We did systemd because we thought that technically Upstart is fundamentally flawed and misses out on so many opportunities.
And we think the same of systemd.
And if you cannot see that then I can only beg you to read the blog story, because it goes into much detail about all the technical features.
Please, judge systemd on technical grounds, don't judge it on political, or emotional grounds.
Not to be specifically political, but did you ever consider submitting systemd itself as a patch? Literally:
diff -pruN ~lennart/coding/upstart ~lennart/coding/systemd
And mail it to upstart-devel-list. I'm being a bit hyperbolic, but actually not much. That would have been a valid move.
You should really come work with us. We're fun guys.
--CJD
On 05/26/2010 08:32 AM, Casey Dahlin wrote:
I'd be happy to firm up the design details with you if you wanted to contribute patches.
I would recommend that noone do that unless Canonical's drops it's flawed copyright license agreement.
Rahul
On 05/26/2010 05:07 AM, Rahul Sundaram wrote:
On 05/26/2010 08:32 AM, Casey Dahlin wrote:
I'd be happy to firm up the design details with you if you wanted to contribute patches.
I would recommend that noone do that unless Canonical's drops it's flawed copyright license agreement.
Rahul
I second that!
On 05/26/2010 05:02 AM, Casey Dahlin wrote:
On Tue, May 25, 2010 at 05:45:07PM +0200, Lennart Poettering wrote:
We did systemd because we thought that technically Upstart is fundamentally flawed and misses out on so many opportunities.
And we think the same of systemd.
Who is "we" and which opportunity is systemd missing?
On 26/05/10 04:02, Casey Dahlin wrote:
On Tue, May 25, 2010 at 05:45:07PM +0200, Lennart Poettering wrote:
On Tue, 25.05.10 10:21, Casey Dahlin (cdahlin@redhat.com) wrote:
On Mon, May 24, 2010 at 09:05:31AM -0400, Tom spot Callaway wrote:
On 05/23/2010 04:19 AM, Kevin Kofler wrote:
Lennart Poettering wrote:
So far response from the community has been very positive, but we didn't have a fedora-devel discussion about this yet, so we'll have to see whether we can somehow make the broader community as enthusiastic about the whole idea as I am. ;-)
I, for one, think systemd should be the default ASAP.
Perhaps the first time I can recall that we have agreed. ;)
~spot
Any particular reason on either of your parts?
Just about everything in systemd is either set to be in upstart (simpler dependency syntax, xinetd-style service activation) or was discarded by it years ago (cgroups are a dead end).
Oh, is that so?
Have you actually read the blog story I put together?
Yes, but I'm going to go read it again just to be sure.
Why do you say "cgroups are a dead end"? Sure, Scott claims that, but uh, it's not the only place where he is simply wrong and his claims baseless. In fact it works really well, and is one of the strong points in systemd. I simply see no alternative for it. The points Scott raised kinda showed that he never really played around with them.
Please read up on cgroups, before you just dismiss technology like that as "dead end".
I did. When upstart was about to use them. 2 years ago. We chucked them by the following LPC.
The problem we've found is that cgroups are too aggressive. They don't have a notion of sessions and count too much as being part of your service, so you end up with your screen session being counted as part of gdm.
This is why setsid was added to the netlink connector.
The assumption that just because its new means its more advanced is in this case a bit misguided.
Well, please read the blog story. I know it's long, but it should be an interesting read. The whole point of the blog story is to make clear the reason systemd exists is purely technical, and that we think our design is simply the better one.
So you have:
- Socket activation. Part of Upstart's roadmap. Would happen sooner if you
cared to submit the patch. We don't think its good enough by itself, hence the rest of Upstart, but a socket activation subsystem that could reach as far as systemd and even work standalone in settings where systemd can work is perfectly within Upstart's scope. I'd be happy to firm up the design details with you if you wanted to contribute patches.
- Bus activation. Missed opportunity here to actually become the launchpoint
for activated services. I won't criticize that too much though, as its usefulness is largely dependent on kernelspace DBus, which I've been trying to bludgeon Marcel Holtmann into turning over to the public for a year now.
- Cutting down on the forking by replacing some of the shell scripts... cool 3a) With C code... really?
Yeah. I think this is odd too. The blog complains about how many awk spawns there are - but this looks like a complaint that belongs in the 70's.
It really doesn't take long to launch awk. at all. And most of the things people are asking awk to do in shell scripts are very trivial, requiring very little processing.
using a simple for i in {1..1000}; do ... loop I can launch on this rubbish old laptop a thousand awk processes in 3.35 seconds. By comparison, it takes 2.24 seconds to launch a thousand C hello world programs. So C is faster. Just about. But the complaint in the blog is that awk is called 92 times. By this metric that costs the user 0.3 seconds of CPU time. To get rid of this horrible waste of resources we are compiling all our startup scripts.... wait. Something is wrong with that picture ;)
Modern systems just don't take very long to spawn awk. Or sed. Or cut. Or bash. IMO this sort of tradeoff between speed and ease of use hasn't been appropriate in 20 years.
It's really not at all uncommon for me to need to modify an init script. There would be much rage if in order to do this I had to download the SRPM, extract the init code, figure out what I needed to change, modify it, recompile then install.
The rest of systemd looks great to me - and the sooner we can switch the lesser the pain in some respects (as the longer we wait, the more used people become to upstart, and then we have to switch again, causing user frustration).
-siXy
James Findley wrote:
Modern systems just don't take very long to spawn awk. Or sed. Or cut. Or bash. IMO this sort of tradeoff between speed and ease of use hasn't been appropriate in 20 years.
It's really not at all uncommon for me to need to modify an init script. There would be much rage if in order to do this I had to download the SRPM, extract the init code, figure out what I needed to change, modify it, recompile then install.
Absolutely.
I remember something similar with hal-disk-something, related to mount options. One day everything got switched to compiled code and manageability approached zero.
On Wed, 2010-05-26 at 10:01 +0100, James Findley wrote:
On 26/05/10 04:02, Casey Dahlin wrote:
On Tue, May 25, 2010 at 05:45:07PM +0200, Lennart Poettering wrote:
On Tue, 25.05.10 10:21, Casey Dahlin (cdahlin@redhat.com) wrote:
On Mon, May 24, 2010 at 09:05:31AM -0400, Tom spot Callaway wrote:
On 05/23/2010 04:19 AM, Kevin Kofler wrote:
Lennart Poettering wrote: > So far response from the community has been very positive, but we didn't > have a fedora-devel discussion about this yet, so we'll have to see > whether we can somehow make the broader community as enthusiastic about > the whole idea as I am. ;-)
I, for one, think systemd should be the default ASAP.
Perhaps the first time I can recall that we have agreed. ;)
~spot
Any particular reason on either of your parts?
Just about everything in systemd is either set to be in upstart (simpler dependency syntax, xinetd-style service activation) or was discarded by it years ago (cgroups are a dead end).
Oh, is that so?
Have you actually read the blog story I put together?
Yes, but I'm going to go read it again just to be sure.
Why do you say "cgroups are a dead end"? Sure, Scott claims that, but uh, it's not the only place where he is simply wrong and his claims baseless. In fact it works really well, and is one of the strong points in systemd. I simply see no alternative for it. The points Scott raised kinda showed that he never really played around with them.
Please read up on cgroups, before you just dismiss technology like that as "dead end".
I did. When upstart was about to use them. 2 years ago. We chucked them by the following LPC.
The problem we've found is that cgroups are too aggressive. They don't have a notion of sessions and count too much as being part of your service, so you end up with your screen session being counted as part of gdm.
This is why setsid was added to the netlink connector.
The assumption that just because its new means its more advanced is in this case a bit misguided.
Well, please read the blog story. I know it's long, but it should be an interesting read. The whole point of the blog story is to make clear the reason systemd exists is purely technical, and that we think our design is simply the better one.
So you have:
- Socket activation. Part of Upstart's roadmap. Would happen sooner if you
cared to submit the patch. We don't think its good enough by itself, hence the rest of Upstart, but a socket activation subsystem that could reach as far as systemd and even work standalone in settings where systemd can work is perfectly within Upstart's scope. I'd be happy to firm up the design details with you if you wanted to contribute patches.
- Bus activation. Missed opportunity here to actually become the launchpoint
for activated services. I won't criticize that too much though, as its usefulness is largely dependent on kernelspace DBus, which I've been trying to bludgeon Marcel Holtmann into turning over to the public for a year now.
- Cutting down on the forking by replacing some of the shell scripts... cool 3a) With C code... really?
Yeah. I think this is odd too. The blog complains about how many awk spawns there are - but this looks like a complaint that belongs in the 70's.
It really doesn't take long to launch awk. at all. And most of the things people are asking awk to do in shell scripts are very trivial, requiring very little processing.
using a simple for i in {1..1000}; do ... loop I can launch on this rubbish old laptop a thousand awk processes in 3.35 seconds. By comparison, it takes 2.24 seconds to launch a thousand C hello world programs. So C is faster. Just about.
Now run a loop, in C, which does the same thing.
$ time ./foo > /dev/null
real 0m0.002s user 0m0.001s sys 0m0.001s
But the complaint in the blog is that awk is called 92 times. By this metric that costs the user 0.3 seconds of CPU time. To get rid of this horrible waste of resources we are compiling all our startup scripts.... wait. Something is wrong with that picture ;)
There's no compiling of startup scripts, read the blog again.
Modern systems just don't take very long to spawn awk. Or sed. Or cut. Or bash. IMO this sort of tradeoff between speed and ease of use hasn't been appropriate in 20 years.
Not very long multiplied by cold caches, and memory allocations and frees, etc. The problem isn't that awk is launched, is that it's launched a 100 times along with grep, cut, whatever kind of sticks and strings you can get in shell text processing. That's hardly something a modern init system should be doing.
On 26/05/10 11:12, Bastien Nocera wrote:
On Wed, 2010-05-26 at 10:01 +0100, James Findley wrote:
On 26/05/10 04:02, Casey Dahlin wrote:
On Tue, May 25, 2010 at 05:45:07PM +0200, Lennart Poettering wrote:
On Tue, 25.05.10 10:21, Casey Dahlin (cdahlin@redhat.com) wrote:
On Mon, May 24, 2010 at 09:05:31AM -0400, Tom spot Callaway wrote:
On 05/23/2010 04:19 AM, Kevin Kofler wrote: > Lennart Poettering wrote: >> So far response from the community has been very positive, but we didn't >> have a fedora-devel discussion about this yet, so we'll have to see >> whether we can somehow make the broader community as enthusiastic about >> the whole idea as I am. ;-) > > I, for one, think systemd should be the default ASAP.
Perhaps the first time I can recall that we have agreed. ;)
~spot
Any particular reason on either of your parts?
Just about everything in systemd is either set to be in upstart (simpler dependency syntax, xinetd-style service activation) or was discarded by it years ago (cgroups are a dead end).
Oh, is that so?
Have you actually read the blog story I put together?
Yes, but I'm going to go read it again just to be sure.
Why do you say "cgroups are a dead end"? Sure, Scott claims that, but uh, it's not the only place where he is simply wrong and his claims baseless. In fact it works really well, and is one of the strong points in systemd. I simply see no alternative for it. The points Scott raised kinda showed that he never really played around with them.
Please read up on cgroups, before you just dismiss technology like that as "dead end".
I did. When upstart was about to use them. 2 years ago. We chucked them by the following LPC.
The problem we've found is that cgroups are too aggressive. They don't have a notion of sessions and count too much as being part of your service, so you end up with your screen session being counted as part of gdm.
This is why setsid was added to the netlink connector.
The assumption that just because its new means its more advanced is in this case a bit misguided.
Well, please read the blog story. I know it's long, but it should be an interesting read. The whole point of the blog story is to make clear the reason systemd exists is purely technical, and that we think our design is simply the better one.
So you have:
- Socket activation. Part of Upstart's roadmap. Would happen sooner if you
cared to submit the patch. We don't think its good enough by itself, hence the rest of Upstart, but a socket activation subsystem that could reach as far as systemd and even work standalone in settings where systemd can work is perfectly within Upstart's scope. I'd be happy to firm up the design details with you if you wanted to contribute patches.
- Bus activation. Missed opportunity here to actually become the launchpoint
for activated services. I won't criticize that too much though, as its usefulness is largely dependent on kernelspace DBus, which I've been trying to bludgeon Marcel Holtmann into turning over to the public for a year now.
- Cutting down on the forking by replacing some of the shell scripts... cool 3a) With C code... really?
Yeah. I think this is odd too. The blog complains about how many awk spawns there are - but this looks like a complaint that belongs in the 70's.
It really doesn't take long to launch awk. at all. And most of the things people are asking awk to do in shell scripts are very trivial, requiring very little processing.
using a simple for i in {1..1000}; do ... loop I can launch on this rubbish old laptop a thousand awk processes in 3.35 seconds. By comparison, it takes 2.24 seconds to launch a thousand C hello world programs. So C is faster. Just about.
Now run a loop, in C, which does the same thing.
$ time ./foo> /dev/null
real 0m0.002s user 0m0.001s sys 0m0.001s
You're comparing the wrong thing here - I was demonstrating that it doesn't take noticeably longer to spawn awk than a small C app on modern systems. thus using: for i in {1..1000}; do awk 'BEGIN{print "Hello World"}' > /dev/null; done for i in {1..1000}; do ./helloworld > /dev/null; done we compare how long it takes to start a trivial C program 1000 times to a trivial awk program 1000 times. The bash for loop overhead is present in both cases, and since we are only interested in the difference in speed, we can ignore it. (I actually ran this comparison a number of times, and used the mean value)
You're comparing how long it takes to launch an awk program 1000 times to how long it takes to run 1000 iterations of a loop in C. This is not an especially useful thing to do.
But the complaint in the blog is that awk is called 92 times. By this metric that costs the user 0.3 seconds of CPU time. To get rid of this horrible waste of resources we are compiling all our startup scripts.... wait. Something is wrong with that picture ;)
There's no compiling of startup scripts, read the blog again.
"On my system the scripts in /etc/init.d call grep at least 77 times. awk is called 92 times, cut 23 and sed 74. [...] Of course, that has to be incredibly slow" #from the blog.
"So, let's get rid of shell scripts in the boot process" #from the blog.
I'm afraid it appears to be you that needs to re-read. I suggest that you read the section entitled "Keeping the First User PID Small".
I'm sorry to say that while it was slow in the 70's, and it would be too slow for a kernel function, on modern hardware all this completes in well under a second, even on this old and rubbish laptop. that's not really slow by any useful *user* definition.
Modern systems just don't take very long to spawn awk. Or sed. Or cut. Or bash. IMO this sort of tradeoff between speed and ease of use hasn't been appropriate in 20 years.
Not very long multiplied by cold caches, and memory allocations and frees, etc. The problem isn't that awk is launched, is that it's launched a 100 times along with grep, cut, whatever kind of sticks and strings you can get in shell text processing. That's hardly something a modern init system should be doing.
What. Are you seriously suggesting that launching a 340k binary, which links against a grand total of 4 libs, all of which will be in FS cache anyway as pretty much _everything_ uses them, is an issue because of "cold caches" and "memory allocations"? /really/? If saving a couple of kilobytes of memory, total, across the entire boot process is this much of an issue for you, I rather think there are easier ways to achieve that. Or, you could note that most modern systems appear to be sold with between 2 and 4 gigabytes of ram, and that it is rather hard to see any noticeable difference.
Sorry. I like fast boots as much as the next person - this is just a bad trade. We only save ourselves (much) less than a second of boot time, but turn a common and simple practice into a major headache.
If anyone has a bash/awk/whatever initscript that actually takes a user-noticeable amount of time to run, this means that you've done something badly wrong - it isn't the language at fault. I would be happy to help you fix this - just poke me on IRC.
-siXy
On Wed, May 26, 2010 at 12:53 PM, James Findley sixy@gmx.com wrote:
[...] Sorry. I like fast boots as much as the next person - this is just a bad trade. We only save ourselves (much) less than a second of boot time, but turn a common and simple practice into a major headache.
If anyone has a bash/awk/whatever initscript that actually takes a user-noticeable amount of time to run, this means that you've done something badly wrong - it isn't the language at fault. I would be happy to help you fix this - just poke me on IRC.
But the speed ups _add_ up ... lets say you save x, y, z time uints for script A, B and C ... you end up saving x+y+z.
On 26/05/10 12:03, drago01 wrote:
On Wed, May 26, 2010 at 12:53 PM, James Findleysixy@gmx.com wrote:
[...] Sorry. I like fast boots as much as the next person - this is just a bad trade. We only save ourselves (much) less than a second of boot time, but turn a common and simple practice into a major headache.
If anyone has a bash/awk/whatever initscript that actually takes a user-noticeable amount of time to run, this means that you've done something badly wrong - it isn't the language at fault. I would be happy to help you fix this - just poke me on IRC.
But the speed ups _add_ up ... lets say you save x, y, z time uints for script A, B and C ... you end up saving x+y+z.
Oh, I agree that they add up completely. It's just that they don't add up to very much. 0.3 seconds for 93 spawns of awk, remember?
In terms of a helpful comparison let's assume you run 50 initscripts on boot (unlikely on a desktop - but lets go for worst case)
We will compare 3 things, and run each comparison 3 times to get a mean result.
1) a poorly written bash script, that does horrible things like piping grep to awk (sidenote: this is always wrong, don't do it), spawning subshells, sourcing stuff when not required, etc
2) a clean bash script, that still calls awk but gets rid of unnecessary sources, subshells, etc.
3) an incredibly lightweight C program that just execv()'s the program
in all cases the program we will use is /bin/true - we just want something consistant and small. Each is run 50 times in a loop.
Result:
1: 0.57 seconds 2: 0.20 seconds 3: 0.15 seconds
cleaning up the initscripts - which are often fairly poorly written - saves us nearly as much as writing them in C. And even the worst case is only ~ half a second total across the entire boot process.
I just don't see any evidence at all that writing out initscripts in C really gets us anywhere useful in the real world, and I am extremely sure that it would be a significant pain in the ass to many, many people.
Yu want the initscripts to run faster? Sure. lets clean them up. For a start /etc/init.d/functions is a mess that takes way to many CPU cycles for what it does - and includes a lot of functions that really aren't widely used enough to justify sourcing by _every_ initscript. Massively obfuscating our boot process, however, is not the answer.
-siXy
James Findley wrote:
You're comparing the wrong thing here - I was demonstrating that it doesn't take noticeably longer to spawn awk than a small C app on modern systems. thus using: for i in {1..1000}; do awk 'BEGIN{print "Hello World"}' > /dev/null; done for i in {1..1000}; do ./helloworld > /dev/null; done we compare how long it takes to start a trivial C program 1000 times to a trivial awk program 1000 times. The bash for loop overhead is present in both cases, and since we are only interested in the difference in speed, we can ignore it. (I actually ran this comparison a number of times, and used the mean value)
You're comparing how long it takes to launch an awk program 1000 times to how long it takes to run 1000 iterations of a loop in C. This is not an especially useful thing to do.
Your comparison is the flawed one. The point of porting the shell code to C is to invoke ONE C program instead of many awk, grep etc. subprocesses. All the operations done by awk etc. would be done by native C code. So doing the loop in C is very much consistent with what we want to accomplish.
IMHO replacing slow interpreted code by fast compiled code is always a good idea, especially so if the interpreted code is shell code with its massive abuse of process spawning.
Kevin Kofler
Once upon a time, Kevin Kofler kevin.kofler@chello.at said:
IMHO replacing slow interpreted code by fast compiled code is always a good idea, especially so if the interpreted code is shell code with its massive abuse of process spawning.
No, it isn't. It makes the process much more opaque to system administrators and makes it harder to make quick fixes and simple local changes.
If there isn't a measurable and significant speed improvement, it is definately a waste of time to replace working scripts.
Chris Adams wrote:
No, it isn't. It makes the process much more opaque to system administrators and makes it harder to make quick fixes and simple local changes.
Editing the code is the wrong way to make "simple local changes".
If there isn't a measurable and significant speed improvement, it is definately a waste of time to replace working scripts.
According to the explanations given elsewhere in the thread, the idea is to have much of the stuff done directly inside the init system instead of softcoding (cf. http://en.wikipedia.org/wiki/Softcoding, http://thedailywtf.com/Articles/Soft_Coding.aspx) it as scripts.
Kevin Kofler
Once upon a time, Kevin Kofler kevin.kofler@chello.at said:
Editing the code is the wrong way to make "simple local changes".
That is only true if you can anticipate every task every system admin will ever need to do with your tools.
I've edited init scripts for multiple reasons. For example, I have multiple instances of some daemons running, so I'll make multiple copies of the init script and edit as needed for config/PID file locations, etc.
On Thu, May 27, 2010 at 10:13:16AM -0500, Chris Adams wrote:
Once upon a time, Kevin Kofler kevin.kofler@chello.at said:
Editing the code is the wrong way to make "simple local changes".
That is only true if you can anticipate every task every system admin will ever need to do with your tools.
I've edited init scripts for multiple reasons. For example, I have multiple instances of some daemons running, so I'll make multiple copies of the init script and edit as needed for config/PID file locations, etc.
Playing devils advocate a more robust init system might accomodate that use case in particular differently.
--CJD
-- Chris Adams cmadams@hiwaay.net Systems and Network Administrator - HiWAAY Internet Services I don't speak for anybody but myself - that's enough trouble. -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel
On Thu, 27.05.10 10:13, Chris Adams (cmadams@hiwaay.net) wrote:
Once upon a time, Kevin Kofler kevin.kofler@chello.at said:
Editing the code is the wrong way to make "simple local changes".
That is only true if you can anticipate every task every system admin will ever need to do with your tools.
I've edited init scripts for multiple reasons. For example, I have multiple instances of some daemons running, so I'll make multiple copies of the init script and edit as needed for config/PID file locations, etc.
Just because we want to do more stuff in C then in shell it doesnt mean things become less editable or configurable. So, when you previously edited the init script, you can now edit the (much shorter and simpler) .service file, adjusting the various options it offers you. If you previously maintained a modified copy of an existing init script, you can now just have a modified copy of a .service file. There's really nothing that changes here.
Lennart
On Wed, 26 May 2010, Bastien Nocera wrote:
Not very long multiplied by cold caches, and memory allocations and frees, etc. The problem isn't that awk is launched, is that it's launched a 100 times along with grep, cut, whatever kind of sticks and strings you can get in shell text processing.
Quite often this is simply bad use of tools. Often large parts of the shell script around the AWK use could have been easily done /within/ the AWK script. Indeed, I'm sure have seen boot systems that were done as AWK scripts. ;)
AWK is a relatively capable line/string/stream processing programming language, it's quite sad so many don't realise this and only use it to print fields by number.
regards,
On Wed, 26.05.10 10:01, James Findley (sixy@gmx.com) wrote:
- Cutting down on the forking by replacing some of the shell scripts... cool 3a) With C code... really?
Yeah. I think this is odd too. The blog complains about how many awk spawns there are - but this looks like a complaint that belongs in the 70's.
It really doesn't take long to launch awk. at all. And most of the things people are asking awk to do in shell scripts are very trivial, requiring very little processing.
Maybe individually its not a problem. But doing that all the time (> 1000x or so during boot) is just slow.
using a simple for i in {1..1000}; do ... loop I can launch on this rubbish old laptop a thousand awk processes in 3.35 seconds. By
It's no only about launching it. Take a couple of tools, pipe them together, and actually execute some code with it.
comparison, it takes 2.24 seconds to launch a thousand C hello world programs. So C is faster. Just about. But the complaint in the blog is that awk is called 92 times. By this metric that costs the user 0.3 seconds of CPU time. To get rid of this horrible waste of resources we are compiling all our startup scripts.... wait. Something is wrong with that picture ;)
Dude, this is not what I am suggesting, I want no "compiled" startup scripts.
All I am saying that the majority of stuff should just be done in the init system or the daemons themselves. And if there is something to configure then do so in the .service file or in the daemon configuration. But there is no point in keeping all in shell.
Also 2.24s is already quite a bit, if I may say so.
Modern systems just don't take very long to spawn awk. Or sed. Or cut. Or bash. IMO this sort of tradeoff between speed and ease of use hasn't been appropriate in 20 years.
Well, they actually do if you do that a thousand times.
It's really not at all uncommon for me to need to modify an init script. There would be much rage if in order to do this I had to download the SRPM, extract the init code, figure out what I needed to change, modify it, recompile then install.
We are not taking control away from you: you can still configure the .service file to your needs, and you have much more high-level controls in there, and if you really want to you can still plug in a shell script instead of the daemon binary itself and things will work just fine.
Also, much the code in the init scripts simply goes away without any need for replacement if the init system is just smarter. You will have to debug less, you will have to fix less, because there is less code, and less buggy code, and less fragile shell code. You also will have less duplication in each and every init script.
Lennart
ons 2010-05-26 klockan 10:01 +0100 skrev James Findley:
It's really not at all uncommon for me to need to modify an init script. There would be much rage if in order to do this I had to download the SRPM, extract the init code, figure out what I needed to change, modify it, recompile then install.
Various ways to deal with that:
1. Change the Exec=/usr/libexec/food to ExecStart=/usr/local/sbin/foodwrapper
2. Add some hook support in the systemd config files.
3. Add support for switching specific services back to using the initscript even when booting with systemd.
But on the other hand, shell scripts can be optimised too. Maybe the awk call is redundant anyway? Maybe something like foo="${bar%.conf}" would be enough?
/Alexander
PS. Someday I should go on a rampage and submit patches that add "set -e; set -o pipefail" to the start of every shell script in the distro. Or maybe not...
Le mercredi 26 mai 2010 à 19:39 +0200, Alexander Boström a écrit :
ons 2010-05-26 klockan 10:01 +0100 skrev James Findley:
It's really not at all uncommon for me to need to modify an init script. There would be much rage if in order to do this I had to download the SRPM, extract the init code, figure out what I needed to change, modify it, recompile then install.
Various ways to deal with that:
- Change the Exec=/usr/libexec/food to
ExecStart=/usr/local/sbin/foodwrapper
Won't work since one of the main things current scripts do is run some code as root, and some other code as the target user. Here you are forcing all the shell part to run as either the target user (in which case the root parts won't work) or as root (in which case you have to reimplement all the shell user changing logic systemd is supposed to deprecate)
On Wed, 26.05.10 19:54, Nicolas Mailhot (nicolas.mailhot@laposte.net) wrote:
Le mercredi 26 mai 2010 à 19:39 +0200, Alexander Boström a écrit :
ons 2010-05-26 klockan 10:01 +0100 skrev James Findley:
It's really not at all uncommon for me to need to modify an init script. There would be much rage if in order to do this I had to download the SRPM, extract the init code, figure out what I needed to change, modify it, recompile then install.
Various ways to deal with that:
- Change the Exec=/usr/libexec/food to
ExecStart=/usr/local/sbin/foodwrapper
Won't work since one of the main things current scripts do is run some code as root, and some other code as the target user.
We already cover for that. You can set "PermissionsStartOnly=yes" in the .service file. Then, only the program specified in ExecStart= will be started with reduced permissions (i.e. with dropped priviliges, reduced caps, yadda yadda), and everything in ExecStartPre= and friends will run as normal root user.
Lennart
On Wed, 26.05.10 19:39, Alexander Boström (abo@root.snowtree.se) wrote:
ons 2010-05-26 klockan 10:01 +0100 skrev James Findley:
It's really not at all uncommon for me to need to modify an init script. There would be much rage if in order to do this I had to download the SRPM, extract the init code, figure out what I needed to change, modify it, recompile then install.
Various ways to deal with that:
- Change the Exec=/usr/libexec/food to
ExecStart=/usr/local/sbin/foodwrapper
Yes, that works well.
- Add some hook support in the systemd config files.
We actually have that in place already. You can hook in as many shell scripts as you want, like this:
ExecStartPre=/some/shell/script/to/run/before/the/daemon ExecStartPost=/some/shell/script/to/run/after/the/daemon ExecStopPre=... ExecStopPost=...
- Add support for switching specific services back to using the
initscript even when booting with systemd.
You can easily do that, simply by renaming the .service file.
Lennart
On Wed, May 26, 2010 at 5:02 AM, Casey Dahlin cdahlin@redhat.com wrote:
On Tue, May 25, 2010 at 05:45:07PM +0200, Lennart Poettering wrote:
On Tue, 25.05.10 10:21, Casey Dahlin (cdahlin@redhat.com) wrote:
[...] 3) Cutting down on the forking by replacing some of the shell scripts... cool 3a) With C code... really?
This does make a lot of sense to me, initscripts being scripts is a major slowdown factor by itself.
It is not like you want to edit the scripts all the time, so there is no reason for them being scripts.
On Wed, 26 May 2010 12:42:13 +0200 drago01 drago01@gmail.com wrote:
On Wed, May 26, 2010 at 5:02 AM, Casey Dahlin cdahlin@redhat.com wrote:
On Tue, May 25, 2010 at 05:45:07PM +0200, Lennart Poettering wrote:
On Tue, 25.05.10 10:21, Casey Dahlin (cdahlin@redhat.com) wrote:
[...] 3) Cutting down on the forking by replacing some of the shell scripts... cool 3a) With C code... really?
This does make a lot of sense to me, initscripts being scripts is a major slowdown factor by itself.
It is not like you want to edit the scripts all the time, so there is no reason for them being scripts.
While you don't edit them *all* the time, it is something that is done regularly, and it is something most admins can do with ease. Turn them in a C program and you left admins out in the cold, most of them.
I would be very, very wary of accepting a C "init script". An unmanageable system is a useless system.
Simo.
On 26. mai 2010 14:16, Simo Sorce wrote:
On Wed, 26 May 2010 12:42:13 +0200 drago01drago01@gmail.com wrote:
On Wed, May 26, 2010 at 5:02 AM, Casey Dahlincdahlin@redhat.com wrote:
On Tue, May 25, 2010 at 05:45:07PM +0200, Lennart Poettering wrote:
On Tue, 25.05.10 10:21, Casey Dahlin (cdahlin@redhat.com) wrote:
[...] 3) Cutting down on the forking by replacing some of the shell scripts... cool 3a) With C code... really?
This does make a lot of sense to me, initscripts being scripts is a major slowdown factor by itself.
It is not like you want to edit the scripts all the time, so there is no reason for them being scripts.
While you don't edit them *all* the time, it is something that is done regularly, and it is something most admins can do with ease. Turn them in a C program and you left admins out in the cold, most of them.
Would it not be more fruitful to discuss _why_ you (we?) need to edit the initscripts? Describe what functionality is missing or wrong in the default ones?
And then see if the same problems exists with a new solution (be it systemd or upstart or something else) and how they can be fixed within _that_ init-context?
I guess most of us don't edit initscripts for the sake of editing initscripts, but to achieve something that is not possible (or at least far more difficult to do) with the scripts provided by the distro.
If these things simply work out of the box with the new world (like reordering startup of daemons to make sure network is up because you need LDAP to authenticate the startup of some other daemon), or they are moot (making sure something is mounted to access some tools that is needed by the script) then there is no need to edit any scripts, ant this whole debate is quite meaningless...
* Ola Thoresen [26/05/2010 14:39] :
Would it not be more fruitful to discuss _why_ you (we?) need to edit the initscripts? Describe what functionality is missing or wrong in the default ones?
Editing environnement variables and indicating which specific interfaces I want the daemon to listen on for requests are the only real-world cases that come to my mind straight away.
Emmanuel
On 05/26/2010 06:57 AM, Emmanuel Seyman wrote:
- Ola Thoresen [26/05/2010 14:39] :
Would it not be more fruitful to discuss _why_ you (we?) need to edit the initscripts? Describe what functionality is missing or wrong in the default ones?
Editing environnement variables and indicating which specific interfaces I want the daemon to listen on for requests are the only real-world cases that come to my mind straight away.
For most of the scripts I've seen this used, that is changed in /etc/sysconfig/daemonname. Like dhcpd etc, which isn't in the initscript itself. Just pointing it out, not taking sides...
On 05/26/2010 10:20 PM, Nathanael D. Noblet wrote:
On 05/26/2010 06:57 AM, Emmanuel Seyman wrote:
- Ola Thoresen [26/05/2010 14:39] :
Would it not be more fruitful to discuss _why_ you (we?) need to edit the initscripts? Describe what functionality is missing or wrong in the default ones?
Editing environnement variables and indicating which specific interfaces I want the daemon to listen on for requests are the only real-world cases that come to my mind straight away.
For most of the scripts I've seen this used, that is changed in /etc/sysconfig/daemonname. Like dhcpd etc, which isn't in the initscript itself. Just pointing it out, not taking sides...
And this could easily be specified in the daemon config itsself. No need for a shell wrapper, which only sets the command line arguments.
On Wed, 26.05.10 14:57, Emmanuel Seyman (emmanuel.seyman@club-internet.fr) wrote:
- Ola Thoresen [26/05/2010 14:39] :
Would it not be more fruitful to discuss _why_ you (we?) need to edit the initscripts? Describe what functionality is missing or wrong in the default ones?
Editing environnement variables and indicating which specific interfaces I want the daemon to listen on for requests are the only real-world cases that come to my mind straight away.
You can just edit the .service file instead. I'd even argue that editing a .service file is much nicer than editing a shell script, simply because it is shorter and seperates control flow from configuration.
Lennart
On Wed, 26 May 2010, Simo Sorce wrote:
While you don't edit them *all* the time, it is something that is done regularly, and it is something most admins can do with ease. Turn them in a C program and you left admins out in the cold, most of them.
I would be very, very wary of accepting a C "init script". An unmanageable system is a useless system.
+20 million.
I couldn't agree more. They need to be scripts, considering how seldom they actually run it makes even less sense to chase down optimization in them by making them compiled.
-sv
2010/5/26 Seth Vidal skvidal@fedoraproject.org:
On Wed, 26 May 2010, Simo Sorce wrote:
While you don't edit them *all* the time, it is something that is done regularly, and it is something most admins can do with ease. Turn them in a C program and you left admins out in the cold, most of them.
I would be very, very wary of accepting a C "init script". An unmanageable system is a useless system.
+20 million.
I couldn't agree more. They need to be scripts, considering how seldom they actually run it makes even less sense to chase down optimization in them by making them compiled.
i strongly agree here aswell... what can be done and should be done is to clean the mess up making it even more standardized and removing the cruft and workarounds. thats what i basically liked about initng scripts.
kind regards, Rudolf Kastl
-sv
-- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel
On Wed, May 26, 2010 at 08:54:23AM -0400, Seth Vidal wrote:
On Wed, 26 May 2010, Simo Sorce wrote:
While you don't edit them *all* the time, it is something that is done regularly, and it is something most admins can do with ease. Turn them in a C program and you left admins out in the cold, most of them.
I would be very, very wary of accepting a C "init script". An unmanageable system is a useless system.
+20 million.
I couldn't agree more. They need to be scripts, considering how seldom they actually run it makes even less sense to chase down optimization in them by making them compiled.
-21 million.
Scripts are a crutch to avoid properly designed daemons and configuration systems. I never edit initscripts to "configure" daemons, because they would just be overwritten at the next package upgrade. Configuration should be separate from code.
On Wed, 26 May 2010, Chuck Anderson wrote:
-21 million.
Scripts are a crutch to avoid properly designed daemons and configuration systems. I never edit initscripts to "configure" daemons, because they would just be overwritten at the next package upgrade. Configuration should be separate from code.
And given my experience dealing with actual real-world designed daemons and other such things, I'd say we've shown no ability to 'properly' design them and won't be showing that anytime soon. So since we have to live in the world, let's not go shooting our feet off.
-sv
On Wed, 26 May 2010 09:08:09 -0400 (EDT) Seth Vidal skvidal@fedoraproject.org wrote:
On Wed, 26 May 2010, Chuck Anderson wrote:
-21 million.
Scripts are a crutch to avoid properly designed daemons and configuration systems. I never edit initscripts to "configure" daemons, because they would just be overwritten at the next package upgrade. Configuration should be separate from code.
And given my experience dealing with actual real-world designed daemons and other such things, I'd say we've shown no ability to 'properly' design them and won't be showing that anytime soon. So since we have to live in the world, let's not go shooting our feet off.
-sv
If people are really keen on "C init scripts", then a compromise could be to make it optional to use a bash script when the admin wants to do something. It would be a change and require re-training to understand how to do that, but it will be at least possible.
Simo.
On 26/05/10 14:24, Simo Sorce wrote:
On Wed, 26 May 2010 09:08:09 -0400 (EDT) Seth Vidalskvidal@fedoraproject.org wrote:
On Wed, 26 May 2010, Chuck Anderson wrote:
-21 million.
Scripts are a crutch to avoid properly designed daemons and configuration systems. I never edit initscripts to "configure" daemons, because they would just be overwritten at the next package upgrade. Configuration should be separate from code.
And given my experience dealing with actual real-world designed daemons and other such things, I'd say we've shown no ability to 'properly' design them and won't be showing that anytime soon. So since we have to live in the world, let's not go shooting our feet off.
-sv
If people are really keen on "C init scripts", then a compromise could be to make it optional to use a bash script when the admin wants to do something. It would be a change and require re-training to understand how to do that, but it will be at least possible.
Simo.
I think a better compromise, if people care about speed (which is the only reason given for using C in the first place), is to clean up the bash code in our initscripts.
As I demonstrated in another post, you can get virtually all of the speed of C initscripts by getting rid of basic coding errors.
For example, I have one initscript here that does: family=`grep "^cpu family" /proc/cpuinfo | head -n1 | awk -F ": " '{ print $2 }'` this much slower (on this system about 3 times slower) than simply writing: family=$(awk -F: '/^cpu family/{print $2;exit}' /proc/cpuinfo)
Unfortunately, for some reason, fixing bad bash is often perceived as nitpicking rather than usefully contributing. Not sure why this is as the same isn't really true of any other language.
-siXy
I got a BZ for a package I maintain from someone who needs multilib support without using Mock:
https://bugzilla.redhat.com/show_bug.cgi?id=595923
I found myself asking what the requirements are for a -devel package. In general, do we support this in -devel libs or not? On IRC, I think I've learned that the answer is "yes", but ....
.... this also made me realize that I really don't know what other requirements we may have for -devel packages, I wondered if everyone building -devel packages is providing multilib support, and I wondered if we need some way to detect conflicts among headers for multiple architectures. In this case, the problem was a conflict in the size of a long:
#define XERCES_SIZEOF_LONG 4 vs. #define XERCES_SIZEOF_LONG 8
Are there other requirements for -devel packages that I should be aware of? Is there something I should read?
Jonathan
Jonathan Robie wrote:
I got a BZ for a package I maintain from someone who needs multilib support without using Mock:
Please send a new message instead of replying to an unrelated one. It matters for mail clients which support proper threading. See e.g.: http://en.wikipedia.org/wiki/User:DonDiego/Thread_hijacking
Kevin Kofler
On Wed, 26.05.10 09:08, Seth Vidal (skvidal@fedoraproject.org) wrote:
Scripts are a crutch to avoid properly designed daemons and configuration systems. I never edit initscripts to "configure" daemons, because they would just be overwritten at the next package upgrade. Configuration should be separate from code.
And given my experience dealing with actual real-world designed daemons and other such things, I'd say we've shown no ability to 'properly' design them and won't be showing that anytime soon. So since we have to live in the world, let's not go shooting our feet off.
Well, this sounds like an ad for systemd:
since it is hard to get writing daemons right, we have tought systemd a lot of tricks so that what you need to do for proper daemonizations is near to zero. systemd can do a lot of stuff for you, the forking, the supervising, the dropping of privs, the setting up of a clean working environment and more. Also, PID files are unnecessary with systemd. In effect writing a daemon becomes very easy then, because the environment will be set up completely for you right-away.
Lennart
On Wed, May 26, 2010 at 9:04 AM, Chuck Anderson cra@wpi.edu wrote:
On Wed, May 26, 2010 at 08:54:23AM -0400, Seth Vidal wrote:
On Wed, 26 May 2010, Simo Sorce wrote:
While you don't edit them *all* the time, it is something that is done regularly, and it is something most admins can do with ease. Turn them in a C program and you left admins out in the cold, most of them.
I would be very, very wary of accepting a C "init script". An unmanageable system is a useless system.
+20 million.
I couldn't agree more. They need to be scripts, considering how seldom they actually run it makes even less sense to chase down optimization in them by making them compiled.
-21 million.
Scripts are a crutch to avoid properly designed daemons and configuration systems. I never edit initscripts to "configure" daemons, because they would just be overwritten at the next package upgrade. Configuration should be separate from code.
I don't edit them, but I do frequently look at them to see what they're doing/why they aren't doing something/what config files i can add/edit to change behaviour etc.
actually, i do edit them sometimes to add a temporary "-x" to them. sure as heck beats gdb.
On Wed, 26.05.10 09:53, Andrew Parker (andrewparker@bigfoot.com) wrote:
I couldn't agree more. They need to be scripts, considering how seldom they actually run it makes even less sense to chase down optimization in them by making them compiled.
-21 million.
Scripts are a crutch to avoid properly designed daemons and configuration systems. I never edit initscripts to "configure" daemons, because they would just be overwritten at the next package upgrade. Configuration should be separate from code.
I don't edit them, but I do frequently look at them to see what they're doing/why they aren't doing something/what config files i can add/edit to change behaviour etc.
actually, i do edit them sometimes to add a temporary "-x" to them. sure as heck beats gdb.
But the question is whether it beats systemd's kernel opts such as "systemd.confirm_spawn=" or "systemd.log_level=", which are much more useful to debug or trace the start-up of services.
And again, nobody said anything of replacing the current shell scripts with identical equivalents written in C. There will be no shell-to-C compiler or any such madness.
Lennart
Seth Vidal wrote:
+20 million.
I couldn't agree more. They need to be scripts, considering how seldom they actually run it makes even less sense to chase down optimization in them by making them compiled.
Absolutely. I have no idea why you shouldn't use a small and light interpreted language rather than C. You would have a standard library of useful init related functions, so you wouldn't have to fork awk, etc. The actual init scripts would be very small then. C is also missing useful datatypes such as maps, which would require libraries to load.
Something like Lua would be very good. The overheads over C would be minimal, and it would have the advantage of being editable.
I've had to edit an init script to get something working properly many times.
Jeremy
On Wed, May 26, 2010 at 4:07 PM, Jeremy Sanders jeremy@jeremysanders.net wrote:
Seth Vidal wrote:
+20 million.
I couldn't agree more. They need to be scripts, considering how seldom they actually run it makes even less sense to chase down optimization in them by making them compiled.
Absolutely. I have no idea why you shouldn't use a small and light interpreted language rather than C. You would have a standard library of useful init related functions, so you wouldn't have to fork awk, etc. The actual init scripts would be very small then. C is also missing useful datatypes such as maps, which would require libraries to load.
Something like Lua would be very good. The overheads over C would be minimal, and it would have the advantage of being editable.
Well spawing your logic further means we should avoid compiled programs at all, what if I want configure $app by editing its source code? Oh wait it is written in C ...
If it goes down to "want to edit scripts for configuration reasons" (which isn't sane anyway) compared to a faster an cleaner boot process I'd opt for the later.
Seriously source code is NOT and never was intended to be a configuration system period.
drago01 wrote:
Well spawing your logic further means we should avoid compiled programs at all, what if I want configure $app by editing its source code? Oh wait it is written in C ...
If it goes down to "want to edit scripts for configuration reasons" (which isn't sane anyway) compared to a faster an cleaner boot process I'd opt for the later.
Seriously source code is NOT and never was intended to be a configuration system period.
It's a great advantage to have non-compiled programs on the system which can be edited: - Debugging packaged python programs - Customizing user interfaces - Understanding logic and parameters
That's speaking as a developer and someone who does some sysadmin work.
The overhead of a simple scripting language like Lua, awk, Python or Perl is minimal compared to the fork cost. You won't notice the difference between a Lua startup script and a C one.
Jeremy
Jeremy Sanders (jeremy@jeremysanders.net) said:
Something like Lua would be very good. The overheads over C would be minimal, and it would have the advantage of being editable.
I've had to edit an init script to get something working properly many times.
If you're going to want them to be editable to pass the lowest-common-denominator test of whatever admins might be editing them, I think bash is probably the only reasonable choice.
Bill
Bill Nottingham wrote:
Jeremy Sanders (jeremy@jeremysanders.net) said:
Something like Lua would be very good. The overheads over C would be minimal, and it would have the advantage of being editable.
I've had to edit an init script to get something working properly many times.
If you're going to want them to be editable to pass the lowest-common-denominator test of whatever admins might be editing them, I think bash is probably the only reasonable choice.
Perhaps, though C is completely non editable to many sysadmins and lacks easy to use builtin routines helpful in scripting (maps, lists, tuples, string manipulation).
At least a simple Lua script should be comprehensible to the average sysadmin in case they need to debug or trace something, even if they never write anything.
Jeremy
On Wed, 2010-05-26 at 08:54 -0400, Seth Vidal wrote:
On Wed, 26 May 2010, Simo Sorce wrote:
While you don't edit them *all* the time, it is something that is done regularly, and it is something most admins can do with ease. Turn them in a C program and you left admins out in the cold, most of them.
I would be very, very wary of accepting a C "init script". An unmanageable system is a useless system.
+20 million.
I couldn't agree more. They need to be scripts, considering how seldom they actually run it makes even less sense to chase down optimization in them by making them compiled.
This is a nice example of how discussions on this list go off into the weeds in no time.
'compiling initscripts' ? come on, that is just silly. Nobody is proposing such a thing.
It is completely clear that there needs to be some flexibility in any init system to cater to real-world services.
But it is also clear that there is a difference between gobs of shell script and nice and clean files like the ones you find in /etc/init.
On Wed, 26 May 2010, Matthias Clasen wrote:
On Wed, 2010-05-26 at 08:54 -0400, Seth Vidal wrote:
On Wed, 26 May 2010, Simo Sorce wrote:
While you don't edit them *all* the time, it is something that is done regularly, and it is something most admins can do with ease. Turn them in a C program and you left admins out in the cold, most of them.
I would be very, very wary of accepting a C "init script". An unmanageable system is a useless system.
+20 million.
I couldn't agree more. They need to be scripts, considering how seldom they actually run it makes even less sense to chase down optimization in them by making them compiled.
This is a nice example of how discussions on this list go off into the weeds in no time.
'compiling initscripts' ? come on, that is just silly. Nobody is proposing such a thing.
It is completely clear that there needs to be some flexibility in any init system to cater to real-world services.
But it is also clear that there is a difference between gobs of shell script and nice and clean files like the ones you find in /etc/init.
great - then I'm happy to be mistaken.
thanks for clearing it up.
-sv
On 26/05/10 15:20, Matthias Clasen wrote:
On Wed, 2010-05-26 at 08:54 -0400, Seth Vidal wrote:
On Wed, 26 May 2010, Simo Sorce wrote:
While you don't edit them *all* the time, it is something that is done regularly, and it is something most admins can do with ease. Turn them in a C program and you left admins out in the cold, most of them.
I would be very, very wary of accepting a C "init script". An unmanageable system is a useless system.
+20 million.
I couldn't agree more. They need to be scripts, considering how seldom they actually run it makes even less sense to chase down optimization in them by making them compiled.
This is a nice example of how discussions on this list go off into the weeds in no time.
'compiling initscripts' ? come on, that is just silly. Nobody is proposing such a thing.
It is completely clear that there needs to be some flexibility in any init system to cater to real-world services.
But it is also clear that there is a difference between gobs of shell script and nice and clean files like the ones you find in /etc/init.
Actually the blog post is proposing exactly that, as I read it. And it seems not only that lots of other people read it the same way, but some even agree with it.
So I'm not sure I see how this is going off into the weeds - if transitioning some/all initscripts to C is a genuine goal of the author of the project, on which he is not prepared to budge, then that is likely to have bearing on its adoption into fedora, and rightly so.
-siXy
James Findley (sixy@gmx.com) said:
Actually the blog post is proposing exactly that, as I read it. And it seems not only that lots of other people read it the same way, but some even agree with it.
So I'm not sure I see how this is going off into the weeds - if transitioning some/all initscripts to C is a genuine goal of the author of the project, on which he is not prepared to budge, then that is likely to have bearing on its adoption into fedora, and rightly so.
What I took from it is that code like this from rc.sysinit:
... if [ ! -e /proc/mounts ]; then mount -n -t proc /proc /proc mount -n -t sysfs /sys /sys >/dev/null 2>&1 fi ...
really doesn't need to be there. If you're redesigning the init system, rather than keeping compatibility with ancient stupid sysvinit, there's no reason that shell code is needed for this; init should Just Do It when it starts. In fact, I'm pretty sure recent upstart releases do the same thing. I'm sure we can find more examples if we look.
Bill
On Wed, 26.05.10 17:41, Bill Nottingham (notting@redhat.com) wrote:
James Findley (sixy@gmx.com) said:
Actually the blog post is proposing exactly that, as I read it. And it seems not only that lots of other people read it the same way, but some even agree with it.
So I'm not sure I see how this is going off into the weeds - if transitioning some/all initscripts to C is a genuine goal of the author of the project, on which he is not prepared to budge, then that is likely to have bearing on its adoption into fedora, and rightly so.
What I took from it is that code like this from rc.sysinit:
... if [ ! -e /proc/mounts ]; then mount -n -t proc /proc /proc mount -n -t sysfs /sys /sys >/dev/null 2>&1 fi ...
really doesn't need to be there. If you're redesigning the init system, rather than keeping compatibility with ancient stupid sysvinit, there's no reason that shell code is needed for this; init should Just Do It when it starts. In fact, I'm pretty sure recent upstart releases do the same thing. I'm sure we can find more examples if we look.
Yes, this is exactly what I meant.
Lennart
On Wed, 26.05.10 15:42, James Findley (sixy@gmx.com) wrote:
It is completely clear that there needs to be some flexibility in any init system to cater to real-world services.
But it is also clear that there is a difference between gobs of shell script and nice and clean files like the ones you find in /etc/init.
Actually the blog post is proposing exactly that, as I read it. And it seems not only that lots of other people read it the same way, but some even agree with it.
No, this is not what is meant.
So, the plan is (and much of this is actually implemented already) is to go through /etc/init.d and similar directories, and look at every script individually. Then, figure out the common parts, and see if we can perhaps implement that elsewhere and in C at some other place.
Example: /etc/rc.sysinit mounts a lot of API filesystems (such as /proc, /sys, /dev). We can do that already in the init system, very early during boot, in C. If we do this (and we did) the code is much shorter, and nicer, and does not require forking or anything.
Another example: /etc/init.d/autofs loads the autofs4 module and sets up permissions on /dev/autofs. Wouldn't it be nicer if this would be done outside of a shell script? And so we decided to do that and moved this into udev and module-init-tools: instead of loading the module manually and setting up the device nodes manually we just create the device nodes in advance and apply permissions to it via udev rules (like any other device node) and then autoload the autofs module on first access. (and this has already hit rawhide by now iirc)
Another example: /etc/init.d/btseed and .../bttrack include some amazingly evil code to fake daemonization of a process with & and disown, as well as privilege dropping in shell. We can cover that much nicer in systemd, and provide the right and clean daemonization it needs out of the box. And so we added just that to systemd itself. (i.e. there is a User= and option in the .service files and a Type= option that allows you to tell systemd to do the necessary daemonization properly.)
And a fourth example: if you look at /etc/init.d/cups you'll find some code in there that tries to make sure that sun RPC doesn't take away the CUPS port numbers. (It also retriggers the printers in the udev sysfs tree, which seems to be very wrong, i really wonder what that is for. Anybody please enlighten me?) But the port number issue can easily be fixed by systemd allocating the port number right-away, and this we can easily cover in plain C in systemd itself via .socket units. And that's what we did.
So, in summary: we go through the shell scripts and figure out piece-by-pice whether we can find a better, perhaps more generic place for it. And the right place could vary: it could be systemd itself (maybe a new option in .service is sufficient, like the Type= or User= option mentioned above) or udev or module-init-tools, or in the daemon code itself.
And suddenly, after you did this you notice that in those shell scripts the only thing that remains is boilerplate code, more often than not just the simple code copied 1:1 from the fedora reference init script. And the boilerplate code is redundant if you use native .service files.
So, there are no plans at all to replace the shell scripts 1:1 with their equivalents written in C. There will not be a shell-to-C compiler or anything like that. What we want to do (and already did for quite a few daemons now), is to replace many of the shell hacks by C code at better, more generic places of basic OS.
Lennart
On Wed, 2010-05-26 at 08:54 -0400, Seth Vidal wrote:
On Wed, 26 May 2010, Simo Sorce wrote:
While you don't edit them *all* the time, it is something that is done regularly, and it is something most admins can do with ease. Turn them in a C program and you left admins out in the cold, most of them.
I would be very, very wary of accepting a C "init script". An unmanageable system is a useless system.
+20 million.
I couldn't agree more. They need to be scripts, considering how seldom they actually run it makes even less sense to chase down optimization in them by making them compiled.
I *very* strongly agree also. I do change init scripts, but even more than this, I see a growing trend for Linux systems to be less friendly to user modification. We are not so smart that we should do this.
Jon.
On Wed, 2010-05-26 at 14:08 -0400, Jon Masters wrote:
On Wed, 2010-05-26 at 08:54 -0400, Seth Vidal wrote:
On Wed, 26 May 2010, Simo Sorce wrote:
While you don't edit them *all* the time, it is something that is done regularly, and it is something most admins can do with ease. Turn them in a C program and you left admins out in the cold, most of them.
I would be very, very wary of accepting a C "init script". An unmanageable system is a useless system.
+20 million.
I couldn't agree more. They need to be scripts, considering how seldom they actually run it makes even less sense to chase down optimization in them by making them compiled.
I *very* strongly agree also. I do change init scripts, but even more than this, I see a growing trend for Linux systems to be less friendly to user modification. We are not so smart that we should do this.
Jon.
So everybody seems to keep assuming that if more of the start up is done in the daemon itself that you'll lose the ability to configure it. I don't think that's the desired case, just that configuration will move to the configuration files, and not in the startup script. Separation of config from code seems smart to me, particularly come rpm update time.
On Wed, 26.05.10 14:08, Jon Masters (jonathan@jonmasters.org) wrote:
I couldn't agree more. They need to be scripts, considering how seldom they actually run it makes even less sense to chase down optimization in them by making them compiled.
I *very* strongly agree also. I do change init scripts, but even more than this, I see a growing trend for Linux systems to be less friendly to user modification. We are not so smart that we should do this.
Well, we won't take anything away from you:
if we add an option to systemd itself, for something that was previously done manually in the init script, then this is just that: an option you can configure as much as you want, simply by editing the .service file.
Lennart
On 05/26/2010 02:54 PM, Seth Vidal wrote:
On Wed, 26 May 2010, Simo Sorce wrote:
While you don't edit them *all* the time, it is something that is done regularly, and it is something most admins can do with ease. Turn them in a C program and you left admins out in the cold, most of them.
I would be very, very wary of accepting a C "init script". An unmanageable system is a useless system.
+20 million.
I couldn't agree more. They need to be scripts, considering how seldom they actually run it makes even less sense to chase down optimization in them by making them compiled.
-sv
We mainly speek about rc.sysinit, which most of you don't touch, because it would be overwritten the next initscripts update anyway.
On Thu, May 27, 2010 at 10:10:35AM +0200, Harald Hoyer wrote:
We mainly speek about rc.sysinit, which most of you don't touch, because it would be overwritten the next initscripts update anyway.
I would never touch it with a permanent change, but I definitely make debugging changes to it often enough. That's not down to it being a shell script though; it's because it's a crufty mess.
Matthew Miller wrote:
That's not down to it being a shell script though; it's because it's a crufty mess.
… which is exactly why it should be handled inside the init system instead of being that mess of a shell script. :-)
Kevin Kofler
On Thu, May 27, 2010 at 03:14:54PM +0200, Kevin Kofler wrote:
That's not down to it being a shell script though; it's because it's a crufty mess.
… which is exactly why it should be handled inside the init system instead of being that mess of a shell script. :-)
Maybe. That cruft is all there for a reason, and it'll take a lot of work to disentangle the good reasons from the ones that should be left behind. Putting it all in an opaque binary seems _less_ conducive to that rather than more.
On Thu, 27.05.10 07:15, Matthew Miller (mattdm@mattdm.org) wrote:
On Thu, May 27, 2010 at 10:10:35AM +0200, Harald Hoyer wrote:
We mainly speek about rc.sysinit, which most of you don't touch, because it would be overwritten the next initscripts update anyway.
I would never touch it with a permanent change, but I definitely make debugging changes to it often enough. That's not down to it being a shell script though; it's because it's a crufty mess.
Two things:
if we replace stuff like sysinit by proper C code things become less fragile and hence you need to debug less.
and secondly, bash is actually a pretty shitty debugger, especially when there are a lot of scripts running in parallel. For debugging purposes we should offer better tools, and some of that we already implemneted: if you pass "systemd.confirm_spawn=1" on the kernel command line you have the option to single-step through a serialized startup. Tools like that I believe are much more appropriate for debugging the startup process.
Lennart
Once upon a time, drago01 drago01@gmail.com said:
This does make a lot of sense to me, initscripts being scripts is a major slowdown factor by itself.
But they aren't a major slowdown factor (see the example numbers in this thread).
And, if they were, any init scripts that are a problem could probably be optimized and still be shell scripts (a number of sed/awk/grep calls could probably be rewritten as pure bash for example).
On Wed, May 26, 2010 at 4:16 PM, Chris Adams cmadams@hiwaay.net wrote:
Once upon a time, drago01 drago01@gmail.com said:
This does make a lot of sense to me, initscripts being scripts is a major slowdown factor by itself.
But they aren't a major slowdown factor (see the example numbers in this thread).
They are flawed, simply spawning awk multiple times and measure the time is not a test to compare bash to C.
And, if they were, any init scripts that are a problem could probably be optimized and still be shell scripts (a number of sed/awk/grep calls could probably be rewritten as pure bash for example).
Which would be faster than spawing random process but still orders of magnitudes slower than a C program.
Once upon a time, drago01 drago01@gmail.com said:
On Wed, May 26, 2010 at 4:16 PM, Chris Adams cmadams@hiwaay.net wrote:
Once upon a time, drago01 drago01@gmail.com said:
This does make a lot of sense to me, initscripts being scripts is a major slowdown factor by itself.
But they aren't a major slowdown factor (see the example numbers in this thread).
They are flawed, simply spawning awk multiple times and measure the time is not a test to compare bash to C.
And, if they were, any init scripts that are a problem could probably be optimized and still be shell scripts (a number of sed/awk/grep calls could probably be rewritten as pure bash for example).
Which would be faster than spawing random process but still orders of magnitudes slower than a C program.
Where are your numbers proving this is a measurable impact?
On Wed, 2010-05-26 at 12:42 +0200, drago01 wrote:
On Wed, May 26, 2010 at 5:02 AM, Casey Dahlin cdahlin@redhat.com wrote:
On Tue, May 25, 2010 at 05:45:07PM +0200, Lennart Poettering wrote:
On Tue, 25.05.10 10:21, Casey Dahlin (cdahlin@redhat.com) wrote:
[...] 3) Cutting down on the forking by replacing some of the shell scripts... cool 3a) With C code... really?
This does make a lot of sense to me, initscripts being scripts is a major slowdown factor by itself.
It is not like you want to edit the scripts all the time, so there is no reason for them being scripts.
I beg to differ. I've had to create or modify initscripts quite often, either as a sysadmin or a packager. If this is now going to require C coding skills, I'm not going to be able to do it. I don't think it's safe to assume that everyone who needs to write or modify an initscript is going to know C. What about people who write apps that need initscripts in some other language?
Adam Williamson wrote:
I beg to differ. I've had to create or modify initscripts quite often, either as a sysadmin or a packager. If this is now going to require C coding skills, I'm not going to be able to do it. I don't think it's safe to assume that everyone who needs to write or modify an initscript is going to know C. What about people who write apps that need initscripts in some other language?
What about a compromise? The initscripts are plain text files that get compiled after you edit them.
Solution 1 Example: viinit postgresql Make your changes :wq viinit compiles your script into a binary.
Solution 2: Give Bash JIT.
OTOH, why is this even a sub-topic in this sub-topic of a thread? I'd love to see some numbers from the complainers about scripting being slow. I have a normal Fedora 13 x86_64 system that boots through initscripts in under 10 seconds. Normal services are starting as I have not "tweaked" my service list. Unless Fedora needs a 1 second boot time (hey I wouldn't complain) do we really need to spend time on 100+ email threads and jump through multiple init systems to find that perfect solution? I've read similar claims of salvation when upstart was being marketed to replace SysVinit. "Everyone will switch to native scripts and everything will be better!" Has everyone switched to native upstart scripts? AFAIK - No. Will everyone switch to systemd native scripts? I'm betting - no.
On Wed, 2010-05-26 at 11:32 -0500, Michael Cronenworth wrote:
OTOH, why is this even a sub-topic in this sub-topic of a thread? I'd love to see some numbers from the complainers about scripting being slow. I have a normal Fedora 13 x86_64 system that boots through initscripts in under 10 seconds. Normal services are starting as I have not "tweaked" my service list. Unless Fedora needs a 1 second boot time (hey I wouldn't complain) do we really need to spend time on 100+ email threads and jump through multiple init systems to find that perfect solution? I've read similar claims of salvation when upstart was being marketed to replace SysVinit. "Everyone will switch to native scripts and everything will be better!" Has everyone switched to native upstart scripts? AFAIK - No. Will everyone switch to systemd native scripts? I'm betting - no.
My anecdotal evidence is up the same alley, FWIW - I have a system with a rather fast SSD in it and it completes the entire boot process, on F13, in 13 seconds or so. Which rather indicates that scripts aren't wasting a significant amount of time, and a lot of the time lost on more conventional systems is waiting for disk access.
Has anyone run bootchart on Fedora lately? I remember we did something of a co-ordinated effort on it in F11, but I don't think it's happened on F12 or F13. That would give us an indication of where our startup bottlenecks *actually* are. Maybe I'll throw up a blog post on that later today, I have three rather different F13 systems to do it on now.
On Wed, May 26, 2010 at 6:07 PM, Adam Williamson awilliam@redhat.com wrote:
On Wed, 2010-05-26 at 12:42 +0200, drago01 wrote:
On Wed, May 26, 2010 at 5:02 AM, Casey Dahlin cdahlin@redhat.com wrote:
On Tue, May 25, 2010 at 05:45:07PM +0200, Lennart Poettering wrote:
On Tue, 25.05.10 10:21, Casey Dahlin (cdahlin@redhat.com) wrote:
[...] 3) Cutting down on the forking by replacing some of the shell scripts... cool 3a) With C code... really?
This does make a lot of sense to me, initscripts being scripts is a major slowdown factor by itself.
It is not like you want to edit the scripts all the time, so there is no reason for them being scripts.
I beg to differ. I've had to create or modify initscripts quite often, either as a sysadmin or a packager.
Again the sysadmin case just implies that something *else* is broken. Well if changing over to C does only get rid of this "disease" it would be enough of a gain. It would force broken apps to be fixed, and let admins edit *configuration* files and not source code.
Why don't people try to configure lets say X by editing its code'? Does this sound wrong to you? If yes than why would initscripts be different?
If this is now going to require C coding skills, I'm not going to be able to do it. I don't think it's safe to assume that everyone who needs to write or modify an initscript is going to know C
Well if you want to write and modify something you have to know the language it is written in, in case you don't it isn't a problem either just ask for help. It is not rocket science or something that would required hundreds of man hours.
What about people who write apps that need initscripts in some other language?
See above.
On Wed, May 26, 2010 at 06:39:43PM +0200, drago01 wrote:
Again the sysadmin case just implies that something *else* is broken.
Sure. As a distribution, we don't have control over upstream projects and their assumptions for daemon startup, shutdown, status, etc. Sometimes, they want odd things.
Well if changing over to C does only get rid of this "disease" it would be enough of a gain. It would force broken apps to be fixed, and let admins edit *configuration* files and not source code.
If you think you can get every open source / free software project to agree on completely consistent behavior, or if you can create a text-format config file for your compiled daemon handler which handles every unanticipated case, well, okay. But it seems unlikely. (And that's not even considering running non-free software, which, while something I try to avoid, is a reasonable real-world use.)
Why don't people try to configure lets say X by editing its code'?
X is one program produced by one project, with a text-mode config file that handles all of its possible options. That's easy.
Does this sound wrong to you? If yes than why would initscripts be different?
Because the initscripts system needs to flexibly handle and "make pretty" any random mess thrown at it.
On Wed, 26.05.10 12:49, Matthew Miller (mattdm@mattdm.org) wrote:
On Wed, May 26, 2010 at 06:39:43PM +0200, drago01 wrote:
Again the sysadmin case just implies that something *else* is broken.
Sure. As a distribution, we don't have control over upstream projects and their assumptions for daemon startup, shutdown, status, etc. Sometimes, they want odd things.
Well if changing over to C does only get rid of this "disease" it would be enough of a gain. It would force broken apps to be fixed, and let admins edit *configuration* files and not source code.
If you think you can get every open source / free software project to agree on completely consistent behavior, or if you can create a text-format config file for your compiled daemon handler which handles every unanticipated case, well, okay. But it seems unlikely. (And that's not even considering running non-free software, which, while something I try to avoid, is a reasonable real-world use.)
Well, if we cannot get rid of all shell scripts that is fine. If we can get rid of 90% of them a lot is achieved already. And to me it looks much more like > 98% of the scripts that can be removed without ill-effect if systemd is used.
Lennart
drago01 wrote:
I beg to differ. I've had to create or modify initscripts quite often, either as a sysadmin or a packager.
Again the sysadmin case just implies that something *else* is broken. Well if changing over to C does only get rid of this "disease" it would be enough of a gain. It would force broken apps to be fixed, and let admins edit *configuration* files and not source code.
What rubbish. For instance, we customised an early Fedora to work on a diskless NFS rooted system, mainly by mucking around with init scripts. Being able to easily edit these files made this project work and work quickly. Trying to get upstream to special case our particular setup wouldn't have happened.
You're suggesting hammering shut the insides of linux to stop people playing around and reducing freedom - sounds like you want Fedora to be like the products of other large propitiatory systems.
There is a clear case for having an open and completely configurable system. It's not going to cost 1 sec of bootup either.
Jeremy
Jeremy Sanders wrote:
What rubbish. For instance, we customised an early Fedora to work on a diskless NFS rooted system, mainly by mucking around with init scripts. Being able to easily edit these files made this project work and work quickly. Trying to get upstream to special case our particular setup wouldn't have happened.
You're suggesting hammering shut the insides of linux to stop people playing around and reducing freedom - sounds like you want Fedora to be like the products of other large propitiatory systems.
C code can be changed too, if really needed. But the point is that it should not be necessary to edit code at all to get what's needed.
There is a clear case for having an open and completely configurable system. It's not going to cost 1 sec of bootup either.
I'm not so sure there. The overhead adds up.
Kevin Kofler
On Thu, 2010-05-27 at 15:39 +0200, Kevin Kofler wrote:
Jeremy Sanders wrote:
You're suggesting hammering shut the insides of linux to stop people playing around and reducing freedom - sounds like you want Fedora to be like the products of other large propitiatory systems.
C code can be changed too, if really needed. But the point is that it should not be necessary to edit code at all to get what's needed.
I'm sure we could live in a wonderful Utopia in which everything just works and there are pink butterflies everywhere, but in the *real* world (the same one where not every software update works first time), repeatedly, people have pointed out that this is not the case.
Didn't we "decide" that Fedora was intended for more technical users? I don't see many technical users crying out for a hammered shut init system where they feel like they have to go to their auto mechanic to attach the right magic dongle to fix it when it breaks.
Jon.
On Fri, May 28, 2010 at 2:06 PM, Jon Masters jonathan@jonmasters.org wrote:
Didn't we "decide" that Fedora was intended for more technical users? I don't see many technical users crying out for a hammered shut init system where they feel like they have to go to their auto mechanic to attach the right magic dongle to fix it when it breaks.
I don't think this kind of rhetoric is useful. Once an effort is made to switch to systemd, if *specific* real world examples of things that are reasonable to configure are no longer so, we can treat that as a bug.
Jon Masters wrote:
Didn't we "decide" that Fedora was intended for more technical users? I don't see many technical users crying out for a hammered shut init system where they feel like they have to go to their auto mechanic to attach the right magic dongle to fix it when it breaks.
A really TECHNICAL user has no trouble editing a C program. :-)
Kevin Kofler
Kevin Kofler wrote:
Jon Masters wrote:
Didn't we "decide" that Fedora was intended for more technical users? I don't see many technical users crying out for a hammered shut init system where they feel like they have to go to their auto mechanic to attach the right magic dongle to fix it when it breaks.
A really TECHNICAL user has no trouble editing a C program. :-)
On a router? With no gcc installed? And with no disk space to install gcc? And with no network available? (because, you know, I'm fixing the router which is failing to boot properly)
I hope your smiley face means you are joking. :-)
On Sat, May 29, 2010 at 07:27:57PM +0200, Roberto Ragusa wrote:
Kevin Kofler wrote:
Jon Masters wrote:
Didn't we "decide" that Fedora was intended for more technical users? I don't see many technical users crying out for a hammered shut init system where they feel like they have to go to their auto mechanic to attach the right magic dongle to fix it when it breaks.
A really TECHNICAL user has no trouble editing a C program. :-)
On a router? With no gcc installed? And with no disk space to install gcc? And with no network available? (because, you know, I'm fixing the router which is failing to boot properly)
I hope your smiley face means you are joking. :-)
A bad kernel or glibc could cause your system to fail to boot properly. Does that mean we should include all the source code for the kernel and glibc on the system? No.
On Sat, 29.05.10 19:27, Roberto Ragusa (mail@robertoragusa.it) wrote:
Kevin Kofler wrote:
Jon Masters wrote:
Didn't we "decide" that Fedora was intended for more technical users? I don't see many technical users crying out for a hammered shut init system where they feel like they have to go to their auto mechanic to attach the right magic dongle to fix it when it breaks.
A really TECHNICAL user has no trouble editing a C program. :-)
On a router? With no gcc installed? And with no disk space to install gcc? And with no network available? (because, you know, I'm fixing the router which is failing to boot properly)
Guys, nobody wants to take away configuration options. You can edit the .service files too, and readjust things. You can even plug in shell scripts here and there and wherever it suits you.
There are not plans to make configuration of systemd depndent on gcc or gdb. That is completely made up.
Lennart
On 6/1/2010 5:45 AM, Lennart Poettering wrote:
Guys, nobody wants to take away configuration options. You can edit the .service files too, and readjust things. You can even plug in shell scripts here and there and wherever it suits you.
There are not plans to make configuration of systemd depndent on gcc or gdb. That is completely made up.
Lennart
Experience in Fedora says that radical changes, even when they achieve their goals, come at a cost. Let us say that we accept your main premises: systemd will be much faster, much more reliable, and a better expenditure of system resources. What we haven't seen from you is a list of what will be lost. 1) Is there anything that currently works which will suddenly stop working? (I am reminded of the cups discussion) 2) Are there tools that will be needed that don't exist yet (or worse, won't exist when systemd is rolled out). 3) Has there been a trial phase with system admins who don't frequent this list or your blog? They are likely to have needs that you haven't anticipated. 4) Is systemd compatible with the functionality of a rescue disk? (I am fishing because I don't know what to expect)
Kevin Kofler wrote:
Jeremy Sanders wrote:
You're suggesting hammering shut the insides of linux to stop people playing around and reducing freedom - sounds like you want Fedora to be like the products of other large propitiatory systems.
C code can be changed too, if really needed. But the point is that it should not be necessary to edit code at all to get what's needed.
Well, I really do not want to flame anyone, but please consider that the guy proposing the change already gave us pulseaudio, which promised the "it will do anything you do now, just easier" feature too. We then discovered that some _trivial_ things where lost: - having multiple independent sound cards - having control of the mixer - having sound with no user logged in ... should I also mention latency, CPU usage, stability,...? Come on, it took a couple of years to have a decently working audio system back.
Now, should I really believe that the new "compiled but it will do anything" init system will be able to help me when ...don't know... I need to change firewalls rules and routing rules in the middle of the init scripts, because I have a multihomed internet connection and remote filesystems and I need the firewall closed and then opened in a way which is dependent on the IP I got from the ISP and I need a "sleep 5" in a proper place because the ADSL modem is still booting its firmware and I want some output printed to /dev/tty1 during boot and I want some filesystems to be mounted with "mount &" because they take time but only contain data not needed to boot and .... ?
This stuff can be trivially done by a competent sysadmin with shell-based init scripts and vi.
Linux must NOT be Windows. Linux must NOT be OS X.
Roberto Ragusa wrote:
- having control of the mixer
The KMix ALSA backend is not going away. https://fedoraproject.org/wiki/Features/KDE_PulseAudio_Integration#Release_N...
I need to change firewalls rules and routing rules in the middle of the init scripts, because I have a multihomed internet connection and remote filesystems and I need the firewall closed and then opened in a way which is dependent on the IP I got from the ISP
Ugh! Are you sure there's no better solution?!
and I need a "sleep 5" in a proper place because the ADSL modem is still booting its firmware
This is a completely broken workaround for a bug somewhere. The driver needs to wait for the firmware to be loaded before reporting ready status, and network startup should not report being complete before the driver is ready. We need to get the bug fixed so this works out of the box for everyone! "sleep" is always a bad and unreliable way to do synchronization. Plus, you're blocking the whole system startup for 5 seconds rather than just what depends on networking, because neither SysVInit nor Upstart's SysVInit compatibility mode are capable of parallel booting (whereas systemd is, even in SysVInit compatibility mode thanks to LSB initscript headers, but even more so with native configuration which Lennart is writing).
and I want some output printed to /dev/tty1 during boot
You can probably set up simple systemd config files for that using the dependency system, but… ugh!
and I want some filesystems to be mounted with "mount &" because they take time but only contain data not needed to boot
This point is moot with a parallel init system such as systemd! ALL mounts in systemd are background tasks, and autofs magic is used to block accesses to mountpoints which are not ready until they become ready.
Kevin Kofler
Kevin Kofler wrote:
Roberto Ragusa wrote:
I need to change firewalls rules and routing rules in the middle of the init scripts, because I have a multihomed internet connection and remote filesystems and I need the firewall closed and then opened in a way which is dependent on the IP I got from the ISP
Ugh! Are you sure there's no better solution?!
Kevin, this is not an exactly real scenario, but I wanted to say that sometimes it is useful to *hack* something in the middle of the init script for some reason.
I know that no "sleep 5" should be there to wait for the firmware of the ADSL modem and so on... what I'm trying to say is that in some cases you need to do something dirty to work around a bug or to confirm a bug. For example, I had really bad luck with the rt2500 driver having weird crashes with the ordering and relative timing of "modprobe", "ifconfig up", "iwconfig". Understanding what the hell was happening during boot (and only during boot) made me add strange hacks into the scripts so to be able to describe the bug.
On Sat, 29.05.10 21:00, Roberto Ragusa (mail@robertoragusa.it) wrote:
Kevin Kofler wrote:
Roberto Ragusa wrote:
I need to change firewalls rules and routing rules in the middle of the init scripts, because I have a multihomed internet connection and remote filesystems and I need the firewall closed and then opened in a way which is dependent on the IP I got from the ISP
Ugh! Are you sure there's no better solution?!
Kevin, this is not an exactly real scenario, but I wanted to say that sometimes it is useful to *hack* something in the middle of the init script for some reason.
And this is why systemd allows you to do that. You can patch the .service files the way you want, and can hook shell scripts into various places, if you want to. And on top of this it adds a couple of debug helpers such as interactive, serialized boot-up and proper tracing of what is being executed.
Lennart
On Sat, 29.05.10 19:48, Roberto Ragusa (mail@robertoragusa.it) wrote:
Kevin Kofler wrote:
Jeremy Sanders wrote:
You're suggesting hammering shut the insides of linux to stop people playing around and reducing freedom - sounds like you want Fedora to be like the products of other large propitiatory systems.
C code can be changed too, if really needed. But the point is that it should not be necessary to edit code at all to get what's needed.
Well, I really do not want to flame anyone, but please consider that the guy proposing the change already gave us pulseaudio, which promised the "it will do anything you do now, just easier" feature too.
Ah, turning this into something personal. Love you too.
We then discovered that some _trivial_ things where lost:
- having multiple independent sound cards
- having control of the mixer
- having sound with no user logged in
... should I also mention latency, CPU usage, stability,...?
You seem to have no idea what you are talking about. But anyway, let's not turn this into a discussion about PA. Don't need another one of those.
Linux must NOT be Windows. Linux must NOT be OS X.
Well I for one think we can learn a lot from the competition. Open your eyes. There's a lot of good stuff in those other OS worlds, particularly in the designs of MacOS X. There's still so much they do better than we do.
Lennart
Lennart Poettering wrote:
On Sat, 29.05.10 19:48, Roberto Ragusa (mail@robertoragusa.it) wrote:
Well, I really do not want to flame anyone, but please consider that the guy proposing the change already gave us pulseaudio, which promised the "it will do anything you do now, just easier" feature too.
Ah, turning this into something personal. Love you too.
This is not a personal attack and I want to explain. You will agree with me that pulseaudio caused a lot of complaints. (we do not discuss if motivated or unmotivated, here) That bad reputation unavoidably leads to weaker trust in your promised guarantees.
The most painful parts of PA were mainly the underestimation of both "peculiar" use cases and impact of issues in related software (e.g. bugged alsa drivers). It is only natural to be worried about the same things (like lack of customizability) for this new init system.
You *are* in a worse position than someone else when proposing a revolution in some critical part of the system. That's no personal offense. On the positive side you are now well aware of the risks you face, so you will probably play it better than someone else.
I hope your new init system will be a great success and help you clean your name from the PA mess. I honestly hope so.
We then discovered that some _trivial_ things where lost:
- having multiple independent sound cards
- having control of the mixer
- having sound with no user logged in
... should I also mention latency, CPU usage, stability,...?
You seem to have no idea what you are talking about. But anyway, let's not turn this into a discussion about PA. Don't need another one of those.
I've been personally been burned by these issues, to the point of going 90% of the way of removing PA from the system (I'm currently running the unrecommended system-wide instance, I manually restart it in some cases, I use often pasuspender and for some things I know I have to turn if off completely).
But I'm still on F10 and I read that pulseaudio has become better. Maybe I will be positively surprised when upgrading to F13.
Linux must NOT be Windows. Linux must NOT be OS X.
Well I for one think we can learn a lot from the competition. Open your eyes. There's a lot of good stuff in those other OS worlds, particularly in the designs of MacOS X. There's still so much they do better than we do.
With "must NOT" I do not mean "we have to be far", I mean "we are not obligated to be near".
In recent times some stupid (IMHO) ideas have been adopted in Linux just to copy what others do. Just as examples: the control of desktop widgets in KDE4 (functional GUI elements modified by a mouse-over???), the fast-user-switching approach (the Unix way is to have multiple X servers).
In conclusion, your innovation is certainly welcome in the Linux world, but disadvantages have to be properly weighted against advantages. If you only list advantages, people is rightly suspicious. You are trying to clarify things: I see you are replying to almost everyone on this thread and that effort has to be appreciated. You even replied to my mail, which you took for a personal attack (which, as I said as first sentence in this and the previous mail, was not).
Roberto Ragusa wrote:
In recent times some stupid (IMHO) ideas have been adopted in Linux just to copy what others do. Just as examples: the control of desktop widgets in KDE4 (functional GUI elements modified by a mouse-over???),
I only know of 2 plasmoids triggering actions on mouse-over: * the folder view's popping up of subfolders. This is not an active action, it's just displaying stuff, I don't see how this is fundamentally different from a tooltip. You don't actually CHANGE anything in the folders or files without a mouse click, it just shows you stuff. * Lancelot's clickless mode. While those are true actions (i.e. they're active), this mode is a deliberate OPTION (i.e. it can be turned off) in a plasmoid which is not shown by default, nor even INSTALLED by default (it's in kdeplasma-addons).
I don't think either is a real problem.
the fast-user-switching approach (the Unix way is to have multiple X servers).
FWIW, KDE/KDM uses the "multiple X servers" approach. There are advantages and drawbacks to either method. Unfortunately, the different approaches mean user switching doesn't work with KDE under GDM nor with GNOME under KDM, which is the only real problem I see in that area (and one of my semi-secret plans is to try to fix this at some point one way or the other, but I'm way too busy).
Kevin Kofler
On Wed, 2010-06-02 at 02:33 +0200, Kevin Kofler wrote:
Roberto Ragusa wrote:
In recent times some stupid (IMHO) ideas have been adopted in Linux just to copy what others do. Just as examples: the control of desktop widgets in KDE4 (functional GUI elements modified by a mouse-over???),
I only know of 2 plasmoids triggering actions on mouse-over:
- the folder view's popping up of subfolders. This is not an active action,
it's just displaying stuff, I don't see how this is fundamentally different from a tooltip. You don't actually CHANGE anything in the folders or files without a mouse click, it just shows you stuff.
- Lancelot's clickless mode. While those are true actions (i.e. they're
active), this mode is a deliberate OPTION (i.e. it can be turned off) in a plasmoid which is not shown by default, nor even INSTALLED by default (it's in kdeplasma-addons).
I don't think either is a real problem.
the fast-user-switching approach (the Unix way is to have multiple X servers).
FWIW, KDE/KDM uses the "multiple X servers" approach. There are advantages and drawbacks to either method. Unfortunately, the different approaches mean user switching doesn't work with KDE under GDM nor with GNOME under KDM, which is the only real problem I see in that area (and one of my semi-secret plans is to try to fix this at some point one way or the other, but I'm way too busy).
So does gdm use multiple X servers, I wasn't aware there was any other way.
Dave.
Dave Airlie wrote:
So does gdm use multiple X servers, I wasn't aware there was any other way.
So what does it do exactly? Spawn a new X server on the same vterm? Or on a different vterm? What KDM does is to spawn a new X server on a different vterm.
Kevin Kofler
On Wed, 2010-06-02 at 07:58 +0200, Kevin Kofler wrote:
Dave Airlie wrote:
So does gdm use multiple X servers, I wasn't aware there was any other way.
So what does it do exactly? Spawn a new X server on the same vterm? Or on a different vterm? What KDM does is to spawn a new X server on a different vterm.
New X server on a different VT. I'm unaware of plans to make it operate any different, though that might not mean people have plans I don't know about.
Dave.
Kevin Kofler wrote:
Roberto Ragusa wrote:
In recent times some stupid (IMHO) ideas have been adopted in Linux just to copy what others do. Just as examples: the control of desktop widgets in KDE4 (functional GUI elements modified by a mouse-over???),
I only know of 2 plasmoids triggering actions on mouse-over:
Sorry, I didn't manage to explain me well. I'm referring to the vertical bar which popups at the left of right of _every_ plasmoid. The thing with the close button and which you can drag around to move the plasmoid. It is basically a window title bar done vertically. The bad part is that it popups on mouse movement and creates active elements (buttons) just under your mouse by guessing that you want them. If you have a crowded screen with overlapping windows and plasmoids, you get this popups in your way when you just want to click on a near window. Tooltips in general have this problem (uncontrollable creation of obstructions), but in this case the tooltip even contains clickable elements, so you have to be careful to not click them by error. Be_careful => be_slow_and_think => bad_GUI_concept.
The folder view popping up you cited is another bad example (but I was not thinking about that). You say it's only visualization, but it changes the context, in the sense that now my dropping the icon has a new meaning (something randomly changed under my pointer). If the change happens just an instant before I'm releasing the button, my jpg will not go into Friends, but into Friends/DiscardedPhotos. So what should I do? Be careful to not park my pointer on any active area while I'm thinking about where to place my jpg; and every folder is now an active area; my desktop has turned into minesweeper. :-) I think the original idea from Apple was to use the spacebar to enter the directory. That is perfectly acceptable.
In my opinion every "automatic" element (popups and tooltips) should only be allowed to show inactive things (better yet if the obstruction is not complete, for example, by using partial opacity and, if we want to be smart, increasing the opacity when the mouse is near, for legibility). In no case this thing must have clickable items. In no case this thing must intercept clicks: if I click on it the click should go to the elements it is covering (that is where transparency helps), because those elements have earned my attention for some time, before the appearance of the little intruder. The mouse pointer should be blended _below_ the tooltip. Tooltips should just be semitransparent post-it notes attached to my monitor.
On Wed, Jun 02, 2010 at 11:25:56AM +0200, Roberto Ragusa wrote:
Kevin Kofler wrote:
Roberto Ragusa wrote:
In recent times some stupid (IMHO) ideas have been adopted in Linux just to copy what others do. Just as examples: the control of desktop widgets in KDE4 (functional GUI elements modified by a mouse-over???),
I only know of 2 plasmoids triggering actions on mouse-over:
Sorry, I didn't manage to explain me well. I'm referring to the vertical bar which popups at the left of right of _every_ plasmoid. The thing with the close button and which you can drag around to move the plasmoid.
yes, found that also very confusing in the beginning. You realise that you can get rid of those when you lock the widgets (there is a shortcut for that). Locking the widgets has other disadvantages, like you cant drag anything onto desktop so you need to remember to unlock it. Which is the biggest problem I have with this feature.
Richard
On Tue, Jun 01, 2010 at 09:58:37PM +0200, Roberto Ragusa wrote:
Lennart Poettering wrote:
On Sat, 29.05.10 19:48, Roberto Ragusa (mail@robertoragusa.it) wrote:
Well, I really do not want to flame anyone, but please consider that the guy proposing the change already gave us pulseaudio, which promised the "it will do anything you do now, just easier" feature too.
Ah, turning this into something personal. Love you too.
This is not a personal attack and I want to explain. You will agree with me that pulseaudio caused a lot of complaints. (we do not discuss if motivated or unmotivated, here) That bad reputation unavoidably leads to weaker trust in your promised guarantees.
The most painful parts of PA were mainly the underestimation of both "peculiar" use cases and impact of issues in related software (e.g. bugged alsa drivers). It is only natural to be worried about the same things (like lack of customizability) for this new init system.
You *are* in a worse position than someone else when proposing a revolution in some critical part of the system. That's no personal offense. On the positive side you are now well aware of the risks you face, so you will probably play it better than someone else.
Regardless of how this applies in this case, don't forget that digging your way out of a big mess is a different way to build trust. Sooner or later we all screw up, knowing how a person handles screwups can be quite valuable.
I hope your new init system will be a great success and help you clean your name from the PA mess. I honestly hope so.
We then discovered that some _trivial_ things where lost:
- having multiple independent sound cards
- having control of the mixer
- having sound with no user logged in
... should I also mention latency, CPU usage, stability,...?
You seem to have no idea what you are talking about. But anyway, let's not turn this into a discussion about PA. Don't need another one of those.
I've been personally been burned by these issues, to the point of going 90% of the way of removing PA from the system (I'm currently running the unrecommended system-wide instance, I manually restart it in some cases, I use often pasuspender and for some things I know I have to turn if off completely).
But I'm still on F10 and I read that pulseaudio has become better. Maybe I will be positively surprised when upgrading to F13.
for better or worse, released Fedora versions, especially <= N-1 don't tend to see a lot of updates. Developer manpower seems to shift quite early to rawhide and/or upstream and there's a few packages that only see token efforts once the next release is out.
Staying on a particular release is unfortunately not the solution to get real fixes into your system.
Linux must NOT be Windows. Linux must NOT be OS X.
Well I for one think we can learn a lot from the competition. Open your eyes. There's a lot of good stuff in those other OS worlds, particularly in the designs of MacOS X. There's still so much they do better than we do.
With "must NOT" I do not mean "we have to be far", I mean "we are not obligated to be near".
In recent times some stupid (IMHO) ideas have been adopted in Linux just to copy what others do. Just as examples: the control of desktop widgets in KDE4 (functional GUI elements modified by a mouse-over???), the fast-user-switching approach (the Unix way is to have multiple X servers).
For every "stupid (IMHO) idea" there's people who disagree with the "stupid", "IMHO" and sometimes even the "idea" part. Long term, all this is evolutionary and some ideas die off, others prevail. Unlike in nature, it is steered evolution though and you can help steer away from ideas you deem bad by talking to the upstream developers. Venting on a distribution list won't do a lot of difference.
Cheers, Peter
On Thu, May 27, 2010 at 9:56 AM, Jeremy Sanders jeremy@jeremysanders.net wrote:
drago01 wrote: [..] You're suggesting hammering shut the insides of linux to stop people playing around and reducing freedom - sounds like you want Fedora to be like the products of other large propitiatory systems.
What?
You can edit it anytime it is OPEN SOURCE ( you have the freedom to do whatever the OSS license used allows you *including* editing). Configuration is not supposed to be done by editing code. The whole C vs. bash aside, even editing bash scripts which are part of the system for _configuration_ reasons is *wrong*.
Separating source code and configuration is just well designed software not "non free software".
Anyway I am done with this discussion.
On Wed, 26.05.10 09:07, Adam Williamson (awilliam@redhat.com) wrote:
On Wed, 2010-05-26 at 12:42 +0200, drago01 wrote:
On Wed, May 26, 2010 at 5:02 AM, Casey Dahlin cdahlin@redhat.com wrote:
On Tue, May 25, 2010 at 05:45:07PM +0200, Lennart Poettering wrote:
On Tue, 25.05.10 10:21, Casey Dahlin (cdahlin@redhat.com) wrote:
[...] 3) Cutting down on the forking by replacing some of the shell scripts... cool 3a) With C code... really?
This does make a lot of sense to me, initscripts being scripts is a major slowdown factor by itself.
It is not like you want to edit the scripts all the time, so there is no reason for them being scripts.
I beg to differ. I've had to create or modify initscripts quite often, either as a sysadmin or a packager. If this is now going to require C coding skills, I'm not going to be able to do it. I don't think it's safe to assume that everyone who needs to write or modify an initscript is going to know C. What about people who write apps that need initscripts in some other language?
THERE ARE NO PLANS TO SHIP COMPILED INIT SCRIPTS OR ANYTHING LIKE THAT!
The plan is to reduce what is currenlty done in files like /etc/init.d/messagebus to files like http://0pointer.de/public/dbus.service.
And those files you can edit just fine, and reconfigure.
Lennart
On Wed, May 26, 2010 at 12:50 PM, Lennart Poettering mzerqung@0pointer.de wrote:
Note the ExecStartPre here, like most daemons, is conceptually busted. There's no reason we shouldn't lay that file down once when the OS is installed, and not check it every boot. Or alternatively, just move the uuid generation into the daemon itself.
On Wed, 26.05.10 12:57, Colin Walters (walters@verbum.org) wrote:
On Wed, May 26, 2010 at 12:50 PM, Lennart Poettering mzerqung@0pointer.de wrote:
Note the ExecStartPre here, like most daemons, is conceptually busted. There's no reason we shouldn't lay that file down once when the OS is installed, and not check it every boot. Or alternatively, just move the uuid generation into the daemon itself.
I think it kinda makes sense to to leave the uuid generating for the first boot, simply to make it easy to generate a hdd image during installation which can tzhen be booted from various machines, where each of them will then get its own uuid.
But yes, I too think that dbus itself should just create that uuid on startup.
Lennart
On Wed, May 26, 2010 at 12:50 PM, Lennart Poettering mzerqung@0pointer.de wrote:
On Wed, 26.05.10 09:07, Adam Williamson (awilliam@redhat.com) wrote:
On Wed, 2010-05-26 at 12:42 +0200, drago01 wrote:
On Wed, May 26, 2010 at 5:02 AM, Casey Dahlin cdahlin@redhat.com wrote:
On Tue, May 25, 2010 at 05:45:07PM +0200, Lennart Poettering wrote:
On Tue, 25.05.10 10:21, Casey Dahlin (cdahlin@redhat.com) wrote:
[...] 3) Cutting down on the forking by replacing some of the shell scripts... cool 3a) With C code... really?
This does make a lot of sense to me, initscripts being scripts is a major slowdown factor by itself.
It is not like you want to edit the scripts all the time, so there is no reason for them being scripts.
I beg to differ. I've had to create or modify initscripts quite often, either as a sysadmin or a packager. If this is now going to require C coding skills, I'm not going to be able to do it. I don't think it's safe to assume that everyone who needs to write or modify an initscript is going to know C. What about people who write apps that need initscripts in some other language?
THERE ARE NO PLANS TO SHIP COMPILED INIT SCRIPTS OR ANYTHING LIKE THAT!
The plan is to reduce what is currenlty done in files like /etc/init.d/messagebus to files like http://0pointer.de/public/dbus.service.
Also:
Description=D-Bus System Bus
This seems unnecessary. Can we default to the name of the script? If this isn't translated, I don't see how it's more interesting than just "dbus".
Requires=basic.target sockets.target dbus.socket After=basic.target sockets.target dbus.socket
What does this goop mean and why is it necessary?
On Wed, 26.05.10 13:08, Colin Walters (walters@verbum.org) wrote:
I beg to differ. I've had to create or modify initscripts quite often, either as a sysadmin or a packager. If this is now going to require C coding skills, I'm not going to be able to do it. I don't think it's safe to assume that everyone who needs to write or modify an initscript is going to know C. What about people who write apps that need initscripts in some other language?
THERE ARE NO PLANS TO SHIP COMPILED INIT SCRIPTS OR ANYTHING LIKE THAT!
The plan is to reduce what is currenlty done in files like /etc/init.d/messagebus to files like http://0pointer.de/public/dbus.service.
Also:
Description=D-Bus System Bus
This seems unnecessary. Can we default to the name of the script? If this isn't translated, I don't see how it's more interesting than just "dbus".
Later on this shall be translatable, the same way as the Comment field of .desktop files.
And if you omit this option we'll already default to the unit name, the way you suggsted.
Requires=basic.target sockets.target dbus.socket After=basic.target sockets.target dbus.socket
What does this goop mean and why is it necessary?
basic.target encapsulates the early boot process (kinda the same stuff rc.sysinit currently does). The Requires= make sure that this is pulled in by dbus.service. The After= makes sure that it has finished before we fork dbus.
And ignore the sockets.target/dbus.socket stuff, that I had in there for debugging only. It's not necessary, and completely redundant. It will not be in the final version of this .service file.
The reason why basic.target is explicitly mentioned in the .service file is that we want to handle early boot and normal daemon start-up with the same .service files. This is different from launchd for example, where early boot is basically a shell script handled completely independently and differently from normal services. I think we need more flexibility there, simply because we have to cover way more than Apple has to when it comes to plugging something into early boot. The price for that is that normal daemons that are started in "late boot", have to add these Requires= and After= lines for basic.target.
This felxible design has various other advantages too, for example we can blur the destinction between early and late boot a bit and remove the synchronization point that seperates them, for selected services.
Lennart
Lennart Poettering (mzerqung@0pointer.de) said:
Requires=basic.target sockets.target dbus.socket After=basic.target sockets.target dbus.socket
What does this goop mean and why is it necessary?
basic.target encapsulates the early boot process (kinda the same stuff rc.sysinit currently does). The Requires= make sure that this is pulled in by dbus.service. The After= makes sure that it has finished before we fork dbus.
How are these evaluated differently that you'd need to list both 'Requires' and 'After', as opposed to just one? (I would think Requires would imply After.)
Bill
On Tue, 01.06.10 15:25, Bill Nottingham (notting@redhat.com) wrote:
Lennart Poettering (mzerqung@0pointer.de) said:
Requires=basic.target sockets.target dbus.socket After=basic.target sockets.target dbus.socket
What does this goop mean and why is it necessary?
basic.target encapsulates the early boot process (kinda the same stuff rc.sysinit currently does). The Requires= make sure that this is pulled in by dbus.service. The After= makes sure that it has finished before we fork dbus.
How are these evaluated differently that you'd need to list both 'Requires' and 'After', as opposed to just one? (I would think Requires would imply After.)
Well, in systemd ordering dependencies are independent of requirement independencies.
Explanation:
A requires B means that when A is started B is started too, at the same time.
A after B means that when A is started and B is started as well, then B is started first and only when that finished A is started too.
Now, if you combine both, then you get A requires B + A after B, which means that when A is started we first start B and when that is finished wwe load A too.
There are use-cases for all three cases listed above, so we thought we cover this in just two dependency types, instead of three. (And in fact actually, since we have "requires" and "requisite" too, this saves us quite a few additional types)
Now, since base.target is pulled in by the default boot target anyway, one could argue that in this case an After= would suffice, and the requires= is redundant. But uh, on a logical level base.target is actually required, so we should list both elements I think.
Lennart
On Wed, 2010-05-26 at 18:50 +0200, Lennart Poettering wrote:
I beg to differ. I've had to create or modify initscripts quite often, either as a sysadmin or a packager. If this is now going to require C coding skills, I'm not going to be able to do it. I don't think it's safe to assume that everyone who needs to write or modify an initscript is going to know C. What about people who write apps that need initscripts in some other language?
THERE ARE NO PLANS TO SHIP COMPILED INIT SCRIPTS OR ANYTHING LIKE THAT!
The plan is to reduce what is currenlty done in files like /etc/init.d/messagebus to files like http://0pointer.de/public/dbus.service.
And those files you can edit just fine, and reconfigure.
There's no need to yell, you only explained that a couple of minutes ago, before I wrote the above mail. From your blog post, it sounded very much like compiled initscripts were what you were proposing.
This seems perfectly reasonable, but at the same time, when you explain it this way, it doesn't seem like anything that needs a new init system to happen. You can move stuff into the daemons themselves no matter what init system you're using, and it seems like upstart would be open to moving appropriate things into the init system. That does seem like a perfectly sensible thing to do, though, so I hope it happens, whatever init system we wind up with.
On Wed, 26.05.10 12:27, Adam Williamson (awilliam@redhat.com) wrote:
The plan is to reduce what is currenlty done in files like /etc/init.d/messagebus to files like http://0pointer.de/public/dbus.service.
And those files you can edit just fine, and reconfigure.
There's no need to yell, you only explained that a couple of minutes ago, before I wrote the above mail. From your blog post, it sounded very much like compiled initscripts were what you were proposing.
This seems perfectly reasonable, but at the same time, when you explain it this way, it doesn't seem like anything that needs a new init system to happen. You can move stuff into the daemons themselves no matter what init system you're using, and it seems like upstart would be open to moving appropriate things into the init system. That does seem like a perfectly sensible thing to do, though, so I hope it happens, whatever init system we wind up with.
Well. Sure. Upstart can copy every feature we have. But while all of this is still in the future for Upstart we already have implemented a fair bit of it in systemd.
Lennart
On 05/26/2010 12:07 PM, Adam Williamson wrote:
It is not like you want to edit the scripts all the time, so there is no reason for them being scripts.
I beg to differ. I've had to create or modify initscripts quite often, either as a sysadmin or a packager. If this is now going to require C coding skills, I'm not going to be able to do it. I don't think it's safe to assume that everyone who needs to write or modify an initscript is going to know C. What about people who write apps that need initscripts in some other language?
It could work out if systemd provided access to a system() equivalent which could then execute an arbitrary script.
I think one good argument for redoing initscripts is that they are so repetitive: most of the content is fairly standard: initialization, argument parsing, case $1 in start) stop), etc etc. ; stuff that might as well be done in the common framework.
On Wed, 26.05.10 13:37, Przemek Klosowski (przemek.klosowski@nist.gov) wrote:
On 05/26/2010 12:07 PM, Adam Williamson wrote:
It is not like you want to edit the scripts all the time, so there is no reason for them being scripts.
I beg to differ. I've had to create or modify initscripts quite often, either as a sysadmin or a packager. If this is now going to require C coding skills, I'm not going to be able to do it. I don't think it's safe to assume that everyone who needs to write or modify an initscript is going to know C. What about people who write apps that need initscripts in some other language?
It could work out if systemd provided access to a system() equivalent which could then execute an arbitrary script.
You can easily hook shell scripts into .service files via stuff like ExecStartPre=/some/shell/script which will then be executed before the actual daemon is forked off.
I think one good argument for redoing initscripts is that they are so repetitive: most of the content is fairly standard: initialization, argument parsing, case $1 in start) stop), etc etc. ; stuff that might as well be done in the common framework.
That is true. Most scripts are 1:1 copies of the init script template of our guidelines.
Lennart
On 05/26/2010 06:07 PM, Adam Williamson wrote:
On Wed, 2010-05-26 at 12:42 +0200, drago01 wrote:
On Wed, May 26, 2010 at 5:02 AM, Casey Dahlincdahlin@redhat.com wrote:
On Tue, May 25, 2010 at 05:45:07PM +0200, Lennart Poettering wrote:
On Tue, 25.05.10 10:21, Casey Dahlin (cdahlin@redhat.com) wrote:
[...] 3) Cutting down on the forking by replacing some of the shell scripts... cool 3a) With C code... really?
This does make a lot of sense to me, initscripts being scripts is a major slowdown factor by itself.
It is not like you want to edit the scripts all the time, so there is no reason for them being scripts.
I beg to differ. I've had to create or modify initscripts quite often, either as a sysadmin or a packager. If this is now going to require C coding skills, I'm not going to be able to do it. I don't think it's safe to assume that everyone who needs to write or modify an initscript is going to know C. What about people who write apps that need initscripts in some other language?
unless you want rc.sysinit changes, you would have no problem with systemd to modify the system to your needs
On Tue, 25.05.10 23:02, Casey Dahlin (cdahlin@redhat.com) wrote:
Why do you say "cgroups are a dead end"? Sure, Scott claims that, but uh, it's not the only place where he is simply wrong and his claims baseless. In fact it works really well, and is one of the strong points in systemd. I simply see no alternative for it. The points Scott raised kinda showed that he never really played around with them.
Please read up on cgroups, before you just dismiss technology like that as "dead end".
I did. When upstart was about to use them. 2 years ago. We chucked them by the following LPC.
Who is "we"?
The problem we've found is that cgroups are too aggressive. They don't have a notion of sessions and count too much as being part of your service, so you end up with your screen session being counted as part of gdm.
Well, how exactly you set up the groups is up to you, but the way we do it in systemd is stick every service in a seperate cgroup, plus every user in a seperate one, too. Some examples:
/systemd-1/avahi.service /systemd-1/getty@tty1.service /systemd-1/gdm.service /systemd-1/apache.service /user/lennart /user/cjd
The per-user cgroups are controlled via a PAM module. That way there's finally a nice way how we can reliably clean up behind a user when he logs out: we just kill his complete cgroup and he's gone.
In addition we can easily set all kinds of cgroup-based resource enforcement to these groups, i.e. force user "lennart" to CPU 1, and say that apache and all the cgi scripts it creates can only get up to 20% CPU. And avahi-daemon could be forced to get a quarter of the available RAM at max -- with all its processes summed up, regardless how often it might fork.
And the whole thing is even recursive. If you run a per-user systemd as user lennart, you will end up with a sub-hierarchy like this:
/user/lennart/systemd-4711/dbus-daemon.service /user/lennart/systemd-4711/dconfd.service
And so on.
And the nice thing is that these cgroups are shown when you do "ps -eo cgroup,...". You can always figure out from "ps" to which service a process belongs, even if if it fork()ed a gazillions of times. And all the keeping track is done by the kernel, basically for free. No involvement from userspace.
This is why setsid was added to the netlink connector.
Well, this is just flawed, on so many levels, that it hurts. Asynchronously trying to follow how daemons fork/exit is just inherently broken because they can do an exponential amount of forks in the time you can (realisticly) collect them linearly only. Also, if a daemon forks too often, netlink willl drop your messages, which makes an easy-peasy way for processes to escape your supervision, using only inprivileged operations. You have constant userspace wakeups. Everything you apply on the processes is done asynchronously and hence is racy (killing, renice, yadda yadda). The problem is simply that your grip on the processes can never work, because you are scheduled at the same priority as the daemons you supervise and you get all notifications asynchronously. You *really* want to leave process tracking to the kernel, and not try to emulate that in userspace. Everything else is just unsafe and hence a joke in the context of process baby sitting. It's like if you'd employ a babysitter and give the kid a bike it can escape on while chaining your babysitter to the couch.
So, it's just not safe, processes can *easily* escape your supervision. On top of that it is just ugly. And finally, you cannot nicely show the service something belongs to in "ps" the way cgroups give it to you for free. Then, you cannot set cgroup resource enforcement for your services, since you simply have no cgroups. And no nice interfacing with the other libcgroup tools either.
Meh, and this lists gets on like this.
People should not use cn_proc. It's evil. And if you are using for anything except logging you are doomed. And even for logging it isnt really useful.
- Socket activation. Part of Upstart's roadmap. Would happen sooner if you
cared to submit the patch. We don't think its good enough by itself, hence the rest of Upstart, but a socket activation subsystem that could reach as far as systemd and even work standalone in settings where systemd can work is perfectly within Upstart's scope. I'd be happy to firm up the design details with you if you wanted to contribute patches.
Well, for once, it would be nice to judge things due to actually existign features, not of big plans nobody is working on as you apparently admit outright.
And then, the socket activtion is nice for various reasons, and lazy-loading is just one of them. The bigger advantage is that it does automatic dependency handling -- which of course is nothign that really fits into upstart's design, since that is based on "events" not dependencies -- events are just broken, as I might note. And adding dependency would turn around upstart's design, making it a completely different beast.
I mean, you called socket activation "xinetd-style activation" in the earlier mail of yours -- that is just completely besides the point, because this all is not so much about doing on-demand starting of internet services. systemd-style activation is about parallelizing startup of (mostly) local services and making fully written dependencies obsolete. And that's what is so magic about it. And an init systemd should be designed around this at its core! And systemd is.
- Bus activation. Missed opportunity here to actually become the launchpoint
for activated services. I won't criticize that too much though, as its usefulness is largely dependent on kernelspace DBus, which I've been trying to bludgeon Marcel Holtmann into turning over to the public for a year now.
Not sure what this has to do with kernel space D-Bus, except that that is practically dead.
If people want to reinvestigate the kernel/dbus issue they should not focus on an AF_DBUS, but instead just use netlink and use BSD socket filters for minimizing wakeups, plus come up with something inspired by iptables/ebtables to filter netlink traffic, for the permission problems. But that's a completely different story.
- Cutting down on the forking by replacing some of the shell scripts... cool 3a) With C code... really?
Yes, really. MacOS could do it, and so can we. Its not that hard. And as I my add here I already hacked up a big part of it now for the servcies we start by default.
- Process environment control. No complaints, and also nothing Upstart doesn't
want to do.
Well, have you seen the functionality we provide thre, and the limited stuff upstart has there?
And what about the other features? the automounter, a full blown dependency system, depedencies between mounts, automounts, devices, sockets, services, timers, paths, swaps? The snapshot system? The fact that we take advantage of the LSB stuff right now, to paralleize the boot, without changing a single file? All the process control stuff, i.e. the syslog/kmsg hookup of stdout/stderr of every process we spawn? The FS namespace stuff we do? The TTY stuff we do? the IO/CPU scheduler tricks we do? The capability stuff we do? The CPU affinity stuff we do? the full integration of /etc/fstab and friends? The transaction logic? The crosslinking between systemd and syslog/abrt? the almost complete dbus coverage? all the small btis we already took out of the shell boot rpocess and already moved into proper C code in system (and some of it into udevd)? the fact that systemd works for normal users/session supervisor too? The fact that we support different boot targets? The fact we have a UI? the sane copyright? The fact that we don't use bloody bzr? And so on and so forth, i could repeat the whole blog story here. Please just read that instead.
We did systemd because we thought that technically Upstart is fundamentally flawed and misses out on so many opportunities.
And we think the same of systemd.
We?
OK, I am listening. What's flawed about systemd? I wrote very detailed explanation why Upstart is just wrong in its core design. Please be so kind and be more specific if you claim the same abotu systemd, because otherwise all you are doing is spreading FUD.
And mail it to upstart-devel-list. I'm being a bit hyperbolic, but actually not much. That would have been a valid move.
Please read my blog story. Thank you. It actually answers you that very question:
"Why didn't you just add this to Upstart, why did you invent something new?
Well, the point of the part about Upstart above was to show that the core design of Upstart is flawed, in our opinion. Starting completely from scratch suggests itself if the existing solution appears flawed in its core. However, note that we took a lot of inspiration from Upstart's code-base otherwise."
If there is a valid reason for starting anew if something exists already, then it is that the basic design of the existing system is just flawed. And hence we started anew.
You should really come work with us. We're fun guys.
Man, you are suggesting I didn't talk to the Upstart folks. That's a ridiculous claim, and quite insulting that you imply that. Kay and I have had long discussions with Scott, during the last three years or so, at various confernces. And as far as I can see Upstart is Scott and Scott is Upstart, and the bzr repo commits underline that. And I am sorry if weren't part of those discussions.
You should really come work with us. We're even funnier guys.
Lennart
On Wed, May 26, 2010 at 01:26:48PM +0200, Lennart Poettering wrote:
The problem we've found is that cgroups are too aggressive. They don't have a notion of sessions and count too much as being part of your service, so you end up with your screen session being counted as part of gdm.
The per-user cgroups are controlled via a PAM module. That way there's finally a nice way how we can reliably clean up behind a user when he logs out: we just kill his complete cgroup and he's gone.
You are avoiding the question: what about screen sessions? Whole point of screen is to stay after logout, and by killing cgroup you nullify it.
On Wed, May 26, 2010 at 02:01:35PM +0200, Tomasz Torcz wrote:
On Wed, May 26, 2010 at 01:26:48PM +0200, Lennart Poettering wrote:
The problem we've found is that cgroups are too aggressive. They don't have a notion of sessions and count too much as being part of your service, so you end up with your screen session being counted as part of gdm.
The per-user cgroups are controlled via a PAM module. That way there's finally a nice way how we can reliably clean up behind a user when he logs out: we just kill his complete cgroup and he's gone.
You are avoiding the question: what about screen sessions? Whole point of screen is to stay after logout, and by killing cgroup you nullify it.
Precisely my point.
--CJD
On Wed, 26.05.10 14:01, Tomasz Torcz (tomek@pipebreaker.pl) wrote:
On Wed, May 26, 2010 at 01:26:48PM +0200, Lennart Poettering wrote:
The problem we've found is that cgroups are too aggressive. They don't have a notion of sessions and count too much as being part of your service, so you end up with your screen session being counted as part of gdm.
The per-user cgroups are controlled via a PAM module. That way there's finally a nice way how we can reliably clean up behind a user when he logs out: we just kill his complete cgroup and he's gone.
You are avoiding the question: what about screen sessions? Whole point of screen is to stay after logout, and by killing cgroup you nullify it.
Well, that depends on configuration.
Many admins will probably like it if they have an easy control that allows them to enforce that a user doesn't continue running processes after he is logged out. For example, in an university network it is probably a good idea to enforce something like that on workstation machines.
And in other cases (i.e. central login servier) you might want to allow screen and suchlike, i.e. processes continuing to run after the user logged out. But then, when you delete a user you still want a nice way to kill all his processes.
And in both cases you still might want to enforce resources limitations on the various users. Hence grouping user processes in proper cgroups is really useful, even if you ultimately don't enable the "kil user group on last logout" checkbox.
So, the cgroups stuff allows you to do a lot of stuff we couldn't do before. But that doesn't mean all of it is useful in all cases.
In systemd you can choose individually for each unit whether you want to allow it to continue run processes on shut down, whether you want the main process killed, the process group to be killed or the cgroup to be killed.
Lennart
On Wed, May 26, 2010 at 5:55 AM, Lennart Poettering mzerqung@0pointer.de wrote:
In systemd you can choose individually for each unit whether you want to allow it to continue run processes on shut down, whether you want the main process killed, the process group to be killed or the cgroup to be killed.
So in other words... we are going to have a knockdown dragout over default unit config for a systemd enabled gdm and for anything that allows shell logins....just not today.
-jef
I've made some benchmarks starting a dummy service (do not call any programs or kill) and a samba server on my notebook. I run those tests 4 times and discarded the first one. Each test execute 100 times the command:
service dummy restart = 0,023ms service smb restart = 0,158ms c application = 0,016ms
After I made this change:
--- /etc/init.d/functions 2010-05-26 13:26:00.000000000 -0300 +++ /etc/init.d/functions 2010-05-26 13:03:01.000000000 -0300 @@ -305,12 +305,13 @@ if checkpid $pid 2>&1; then # TERM first, then KILL if not dead kill -TERM $pid >/dev/null 2>&1 - usleep 100000 - if checkpid $pid && sleep 1 && + usleep 1000 + if checkpid $pid && usleep 100000 && + checkpid $pid && sleep 1 && checkpid $pid && sleep $delay && checkpid $pid ; then kill -KILL $pid >/dev/null 2>&1 - usleep 100000 + usleep 50000 fi fi checkpid $pid
After this, the time dropped 60%:
service smb restart = 0,051ms
And finally I wrote this C application:
#include <unistd.h> #include <stdlib.h> #include <sys/wait.h>
int main(int argc,char *argv[]) { int pid,ret,a;
for(a=0;a<100;a++) { if((pid=fork())==0) { execlp("smbd","smbd","-D",NULL); exit(-1); } waitpid(pid,&ret,0); kill(pid,9); } exit(0); }
This is the final result:
service dummy restart = 0,023ms service smb restart = 0,158ms service smb restart (after hack) = 0,051ms c application = 0,016ms
We are talking about to gain 0.035ms per process on init using C (service restart) in my notebook.
---- Gustavo Junior Alves
On Wed, 26.05.10 08:19, Jeff Spaleta (jspaleta@gmail.com) wrote:
On Wed, May 26, 2010 at 5:55 AM, Lennart Poettering mzerqung@0pointer.de wrote:
In systemd you can choose individually for each unit whether you want to allow it to continue run processes on shut down, whether you want the main process killed, the process group to be killed or the cgroup to be killed.
So in other words... we are going to have a knockdown dragout over default unit config for a systemd enabled gdm and for anything that allows shell logins....just not today.
I don't think the will be much fuss about this, as I personally think that we should continue with the current behaviour here, and support screen out-of-the-box.
Lennart
On Wed, May 26, 2010 at 5:55 AM, Lennart Poettering mzerqung@0pointer.de wrote:
Well, that depends on configuration.
In systemd you can choose individually for each unit whether you want to allow it to continue run processes on shut down, whether you want the main process killed, the process group to be killed or the cgroup to be killed.
Do you have a service file example yet in systemd git that can be used to get an understanding of the various configuration options which determine what gets killed and what doesn't?
-jef
On Wed, 26.05.10 09:01, Jeff Spaleta (jspaleta@gmail.com) wrote:
On Wed, May 26, 2010 at 5:55 AM, Lennart Poettering mzerqung@0pointer.de wrote:
Well, that depends on configuration.
In systemd you can choose individually for each unit whether you want to allow it to continue run processes on shut down, whether you want the main process killed, the process group to be killed or the cgroup to be killed.
Do you have a service file example yet in systemd git that can be used to get an understanding of the various configuration options which determine what gets killed and what doesn't?
Nope, not really.
But it is as easy as this: when we stop a service the "KillMode=" option controls whether and how any processes remaining after the "ExecStop=" command (if there is such a command, and if there are any processes left) is killed.
KillMode=control-group → the entire cgroup is shot down KillMode=process-group → only the process group of the process we forked is shot down KillMode=process → only the process we forked is shot down KillMode=none → nothing is shot down
Lennart
On Mon, May 31, 2010 at 5:32 PM, Lennart Poettering mzerqung@0pointer.de wrote:
On Wed, 26.05.10 09:01, Jeff Spaleta (jspaleta@gmail.com) wrote:
On Wed, May 26, 2010 at 5:55 AM, Lennart Poettering mzerqung@0pointer.de wrote:
Well, that depends on configuration.
In systemd you can choose individually for each unit whether you want to allow it to continue run processes on shut down, whether you want the main process killed, the process group to be killed or the cgroup to be killed.
Do you have a service file example yet in systemd git that can be used to get an understanding of the various configuration options which determine what gets killed and what doesn't?
Nope, not really.
But it is as easy as this: when we stop a service the "KillMode=" option controls whether and how any processes remaining after the "ExecStop=" command (if there is such a command, and if there are any processes left) is killed.
KillMode=control-group → the entire cgroup is shot down KillMode=process-group → only the process group of the process we forked is shot down KillMode=process → only the process we forked is shot down KillMode=none → nothing is shot down
And what is the default?
On Tue, 01.06.10 01:56, Mike Fedyk (mfedyk@mikefedyk.com) wrote:
KillMode=control-group → the entire cgroup is shot down KillMode=process-group → only the process group of the process we forked is shot down KillMode=process → only the process we forked is shot down KillMode=none → nothing is shot down
And what is the default?
KillMode=control-group for native services and KillMode=process-group for SysV services.
Lennart
On Tue, Jun 1, 2010 at 4:22 AM, Lennart Poettering mzerqung@0pointer.de wrote:
On Tue, 01.06.10 01:56, Mike Fedyk (mfedyk@mikefedyk.com) wrote:
KillMode=control-group → the entire cgroup is shot down KillMode=process-group → only the process group of the process we forked is shot down KillMode=process → only the process we forked is shot down KillMode=none → nothing is shot down
And what is the default?
KillMode=control-group for native services and KillMode=process-group for SysV services.
Lennart
Ok, the defaults look good.
What type of cgroup are you using? Does it impede the use of lxc for containers? Ie, the cgroup type that systemd needs to be able to be nested inside a container in a whole OS virtualization (think VPS / Virtual Private Server where each VPS has root in its container).
I currently use openvz and lxc (which is similar but based on cgroups) is getting close to feature pairity. systemd shouldn't get in the way of being used within a container based on lxc...
What type of cgroup are you using? Does it impede the use of lxc for containers? Ie, the cgroup type that systemd needs to be able to be nested inside a container in a whole OS virtualization (think VPS / Virtual Private Server where each VPS has root in its container).
systemd uses a named hierarchy without mounting any other subsystem. So no, it does not impede the use of lxc for containers.
Dhaval
On Tue, 01.06.10 05:53, Mike Fedyk (mfedyk@mikefedyk.com) wrote:
On Tue, Jun 1, 2010 at 4:22 AM, Lennart Poettering mzerqung@0pointer.de wrote:
On Tue, 01.06.10 01:56, Mike Fedyk (mfedyk@mikefedyk.com) wrote:
KillMode=control-group → the entire cgroup is shot down KillMode=process-group → only the process group of the process we forked is shot down KillMode=process → only the process we forked is shot down KillMode=none → nothing is shot down
And what is the default?
KillMode=control-group for native services and KillMode=process-group for SysV services.
Lennart
Ok, the defaults look good.
What type of cgroup are you using? Does it impede the use of lxc for containers? Ie, the cgroup type that systemd needs to be able to be nested inside a container in a whole OS virtualization (think VPS / Virtual Private Server where each VPS has root in its container).
I currently use openvz and lxc (which is similar but based on cgroups) is getting close to feature pairity. systemd shouldn't get in the way of being used within a container based on lxc...
As Dhaval already pointed out we use our own, named hierarchy, independent of any controller. On top of that we use it recursively: i.e. if you run systemd it will create the service groups beneath the group it itself is running in.
That means that systemd should not interfere with any other system (unless you tell it to do so, via some config item), and is nicely recursively stackable.
Lennart
On Wed, May 26, 2010 at 01:26:48PM +0200, Lennart Poettering wrote:
On Tue, 25.05.10 23:02, Casey Dahlin (cdahlin@redhat.com) wrote:
Why do you say "cgroups are a dead end"? Sure, Scott claims that, but uh, it's not the only place where he is simply wrong and his claims baseless. In fact it works really well, and is one of the strong points in systemd. I simply see no alternative for it. The points Scott raised kinda showed that he never really played around with them.
Please read up on cgroups, before you just dismiss technology like that as "dead end".
I did. When upstart was about to use them. 2 years ago. We chucked them by the following LPC.
Who is "we"?
Upstart has about 1.7 developers. The 1 is Scott, myself and Johann Kiviniemi fight over the .7.
The problem we've found is that cgroups are too aggressive. They don't have a notion of sessions and count too much as being part of your service, so you end up with your screen session being counted as part of gdm.
Well, how exactly you set up the groups is up to you, but the way we do it in systemd is stick every service in a seperate cgroup, plus every user in a seperate one, too. Some examples:
<snip>
And so on.
Someone else already pointed out the issues here.
And the nice thing is that these cgroups are shown when you do "ps -eo cgroup,...". You can always figure out from "ps" to which service a process belongs, even if if it fork()ed a gazillions of times. And all the keeping track is done by the kernel, basically for free. No involvement from userspace.
This is why setsid was added to the netlink connector.
Well, this is just flawed, on so many levels, that it
<snip>
enforcement for your services, since you simply have no cgroups. And no nice interfacing with the other libcgroup tools either.
There's no reason Upstart couldn't offer cgroups for resource limits, its just passed them up as a process supervision mechanism. And they are broken for the screen case, though perhaps that could be fixed in the kernel.
Meh, and this lists gets on like this.
People should not use cn_proc. It's evil. And if you are using for anything except logging you are doomed. And even for logging it isnt really useful.
- Socket activation. Part of Upstart's roadmap. Would happen sooner if you
cared to submit the patch. We don't think its good enough by itself, hence the rest of Upstart, but a socket activation subsystem that could reach as far as systemd and even work standalone in settings where systemd can work is perfectly within Upstart's scope. I'd be happy to firm up the design details with you if you wanted to contribute patches.
Well, for once, it would be nice to judge things due to actually existign features, not of big plans nobody is working on as you apparently admit outright.
You worked on it, and finished it. You just didn't do it within Upstart. The manpower was there it was just misapplied.
And then, the socket activtion is nice for various reasons, and lazy-loading is just one of them. The bigger advantage is that it does automatic dependency handling -- which of course is nothign that really fits into upstart's design, since that is based on "events" not dependencies -- events are just broken, as I might note. And adding dependency would turn around upstart's design, making it a completely different beast.
Event-driven in Upstart's case just talks about the internal operation of Upstart. Its rather exposed in current iterations but its just a design philosophy. You can implement "dependencies" within it, though in the past Upstart has been hesitant with the term because it tends to imply a dependency-solving algorithm, where as Upstart provides its dependencies reactively, in response to change.
I mean, you called socket activation "xinetd-style activation" in the earlier mail of yours -- that is just completely besides the point, because this all is not so much about doing on-demand starting of internet services. systemd-style activation is about parallelizing startup of (mostly) local services and making fully written dependencies obsolete. And that's what is so magic about it. And an init systemd should be designed around this at its core! And systemd is.
Yes. I get it.
- Bus activation. Missed opportunity here to actually become the launchpoint
for activated services. I won't criticize that too much though, as its usefulness is largely dependent on kernelspace DBus, which I've been trying to bludgeon Marcel Holtmann into turning over to the public for a year now.
Not sure what this has to do with kernel space D-Bus, except that that is practically dead.
If people want to reinvestigate the kernel/dbus issue they should not focus on an AF_DBUS, but instead just use netlink and use BSD socket filters for minimizing wakeups, plus come up with something inspired by iptables/ebtables to filter netlink traffic, for the permission problems. But that's a completely different story.
- Cutting down on the forking by replacing some of the shell scripts... cool 3a) With C code... really?
Yes, really. MacOS could do it, and so can we. Its not that hard. And as I my add here I already hacked up a big part of it now for the servcies we start by default.
Good for Apple? Maybe now they can design a better kernel? This is linux. We configure our systems here.
- Process environment control. No complaints, and also nothing Upstart doesn't
want to do.
Well, have you seen the functionality we provide thre, and the limited stuff upstart has there?
<snip>
supervisor too? The fact that we support different boot targets? The fact we have a UI? the sane copyright? The fact that we don't use bloody bzr? And so on and so forth, i could repeat the whole blog story here. Please just read that instead.
Again, could have been Upstart patches (except for the last couple).
We did systemd because we thought that technically Upstart is fundamentally flawed and misses out on so many opportunities.
And we think the same of systemd.
We?
OK, I am listening. What's flawed about systemd? I wrote very detailed explanation why Upstart is just wrong in its core design. Please be so kind and be more specific if you claim the same abotu systemd, because otherwise all you are doing is spreading FUD.
Apart from the issue of circular dependencies, which I know you've already had explained to you, I'd like to see how you intend to manage, say Veritas clustering products. Like it or not there are systems out there running software that's unstable, not open source, written by people who don't like you, will /never/ take your socket passing patch and would probably find clever ways to break or do it wrong if they did (yes, because of a 10-line patch).
Upstart doesn't ask anything of the userspace it intends to manage, and that userspace is a harsher place than you seem to realize.
And mail it to upstart-devel-list. I'm being a bit hyperbolic, but actually not much. That would have been a valid move.
Please read my blog story. Thank you. It actually answers you that very question:
"Why didn't you just add this to Upstart, why did you invent something new?
Well, the point of the part about Upstart above was to show that the core design of Upstart is flawed, in our opinion. Starting completely from scratch suggests itself if the existing solution appears flawed in its core. However, note that we took a lot of inspiration from Upstart's code-base otherwise."
If there is a valid reason for starting anew if something exists already, then it is that the basic design of the existing system is just flawed. And hence we started anew.
You should really come work with us. We're fun guys.
Man, you are suggesting I didn't talk to the Upstart folks. That's a ridiculous claim, and quite insulting that you imply that. Kay and I have had long discussions with Scott, during the last three years or so, at various confernces. And as far as I can see Upstart is Scott and Scott is Upstart, and the bzr repo commits underline that. And I am sorry if weren't part of those discussions.
See Scott's reply a few mails down.
--CJD
On Wed, 26.05.10 10:16, Casey Dahlin (cdahlin@redhat.com) wrote:
Who is "we"?
Upstart has about 1.7 developers. The 1 is Scott, myself and Johann Kiviniemi fight over the .7.
the bzr history tells a different story.
The problem we've found is that cgroups are too aggressive. They don't have a notion of sessions and count too much as being part of your service, so you end up with your screen session being counted as part of gdm.
Well, how exactly you set up the groups is up to you, but the way we do it in systemd is stick every service in a seperate cgroup, plus every user in a seperate one, too. Some examples:
<snip> > > And so on. >
Someone else already pointed out the issues here.
Hmm, where?
enforcement for your services, since you simply have no cgroups. And no nice interfacing with the other libcgroup tools either.
There's no reason Upstart couldn't offer cgroups for resource limits, its just passed them up as a process supervision mechanism. And they are broken for the screen case, though perhaps that could be fixed in the kernel.
They are not broken for the screen case, and there is no fixing in the kernel necessary.
Scott is simply a bit confused about cgroups, there is no screen problem.
Well, for once, it would be nice to judge things due to actually existign features, not of big plans nobody is working on as you apparently admit outright.
You worked on it, and finished it. You just didn't do it within Upstart. The manpower was there it was just misapplied.
Well, in my blog story I tried to explain why we started anew, instead of "fixing" Upstart. Won't repeat this here.
And then, the socket activtion is nice for various reasons, and lazy-loading is just one of them. The bigger advantage is that it does automatic dependency handling -- which of course is nothign that really fits into upstart's design, since that is based on "events" not dependencies -- events are just broken, as I might note. And adding dependency would turn around upstart's design, making it a completely different beast.
Event-driven in Upstart's case just talks about the internal operation of Upstart. Its rather exposed in current iterations but its just a design philosophy. You can implement "dependencies" within it, though in the past Upstart has been hesitant with the term because it tends to imply a dependency-solving algorithm, where as Upstart provides its dependencies reactively, in response to change.
Ah, if events are hidden from the outside in upcoming versions, then Upstart will become a completely different beast, and reinvent itself another time completely. Are you sure Upstart is really ready for use if every version is a complete redesign of what was before, and a departure from the core design paradigm that the old versions followed?
Yes, really. MacOS could do it, and so can we. Its not that hard. And as I my add here I already hacked up a big part of it now for the servcies we start by default.
Good for Apple? Maybe now they can design a better kernel? This is linux. We configure our systems here.
Well, no need to shut your eyes that Apple is really good at some things. We should learn from them where it is a good idea. And here they are a positive example we can be inspired of.
OK, I am listening. What's flawed about systemd? I wrote very detailed explanation why Upstart is just wrong in its core design. Please be so kind and be more specific if you claim the same abotu systemd, because otherwise all you are doing is spreading FUD.
Apart from the issue of circular dependencies, which I know you've already had explained to you, I'd like to see how you intend to manage, say
Circular dependencies? I don't think I heard that from you ever. Please explain?
I mean, dependencies are dependencies. Whether they are configured manually or implicitly doesn't have any effect on the fact that they are there or not there. So if there is a dep loop with systemd in place there is a dep loop without systemd too.
So please, elaborate on this, and tell me exactly what you mean by this.
Veritas clustering products. Like it or not there are systems out there running software that's unstable, not open source, written by people who don't like you, will /never/ take your socket passing patch and would probably find clever ways to break or do it wrong if they did (yes, because of a 10-line patch).
And, so? They can stay sysv init scripts just fine.
Upstart doesn't ask anything of the userspace it intends to manage, and that userspace is a harsher place than you seem to realize.
Neither do we ask anything. Socket actviation is cool, and a nice way to make things more robust and faster. But it's an optional feature. You don't have to use it. We support classic non-socket activation too, and we support classic Sysv too.
Lennart
On Sun, 2010-05-23 at 00:34 +0200, Lennart Poettering wrote:
On Sun, 23.05.10 02:40, Rahul Sundaram (metherid@gmail.com) wrote:
On 05/23/2010 02:36 AM, Lennart Poettering wrote:
(And as a side note: systemd by default puts a tmpfs to both /var/run and /var/lock).
So do you plan on getting it by default for Fedora 14? :-)
Well, I am certainly planning to have a package for it in F14. But whether we can have it as default is to be seen.
This is not intended to start a flamewar.
I hadn't really heard about systemd, so I did some poking through your blog (http://0pointer.de/blog/projects/systemd.html ), which has a very lengthy amount on the subject, and thanks for writing that. There's even a section entitled "On upstart", which points out a few issues with Upstart and other things, such as SMF. But I'm still not really sure how to answer the first thing I thought of, which was along the lines of "why replace init yet again with something else when Upstart is just now getting some traction in the wider community?". Can you point us to where any background discussion has taken place with Upstart folks?
The thing is, I like some of the things Fedora re-invents differently. For example, dracut is quite nice (though there are too many initramfs creation tools available at this point, but then they do tend to be more distro specific), but IMO it is better to avoid redoing something at all costs unless driven by necessity of innovation. So assuming there's a nice backstory here, a need for Fedora to do something different, etc. then cool. But if there isn't, I'm much more weary of this.
Jon.
On Mon, 24.05.10 21:17, Jon Masters (jonathan@jonmasters.org) wrote:
So do you plan on getting it by default for Fedora 14? :-)
Well, I am certainly planning to have a package for it in F14. But whether we can have it as default is to be seen.
This is not intended to start a flamewar.
I hadn't really heard about systemd, so I did some poking through your blog (http://0pointer.de/blog/projects/systemd.html ), which has a very lengthy amount on the subject, and thanks for writing that. There's even a section entitled "On upstart", which points out a few issues with Upstart and other things, such as SMF. But I'm still not really sure how to answer the first thing I thought of, which was along the lines of "why replace init yet again with something else when Upstart is just now getting some traction in the wider community?".
Well, it would be much worse if we did this later on. The earlier the better.
Can you point us to where any background discussion has taken place with Upstart folks?
No, I cannot. Kay and I and a couple of others sat down at various LPC and GUADEC and discussed what we would like to see in an init system. And we had long discussions, but ultimately most of our ideas were outright rejected by Scott, such as the launchd-style activation and the cgroup stuff, two of the most awesome features in systemd now. (That said, we actually managed to convince him on other points, i.e. I believe we played a role in turning him from a D-Bus-hater into a D-Bus-lover).
But anyway, these discussions did happen, over years. But there is no recorded archive of that, no mailing list discussion I could point you to, sorry. You can ask Kay and me and Scott about it though.
So we have discussed this with Scott in much detail, and we have followed his development for a longer time. But in the end I just don't think Upstart is the right thing, and fundamentally flawed and unlikely to change direction, which is why we chose to start anew, and not just "fix" Upstart. For more about that just read my blog story.
In summary, this is not coming out of the blue for Scott, we have discussed that in length with him, but at one point we just saw that Upstart is fundamentally not going to be what we have in mind, and so we started a new experiment, and so far it turned out to have very convincing results, if I may say in my humbleness.
The thing is, I like some of the things Fedora re-invents differently. For example, dracut is quite nice (though there are too many initramfs creation tools available at this point, but then they do tend to be more distro specific), but IMO it is better to avoid redoing something at all costs unless driven by necessity of innovation. So assuming there's a nice backstory here, a need for Fedora to do something different, etc. then cool. But if there isn't, I'm much more weary of this.
Well, just read the core design and the feature list on our blog story, and compare that with Upstart. And I am quite sure that if you grok the awesomeness of the socket based activation that then you will no longer wonder why systemd is the future and Upstart is not.
Lennart
On Tue, 2010-05-25 at 17:24 +0200, Lennart Poettering wrote:
Can you point us to where any background discussion has taken place with Upstart folks?
No, I cannot. Kay and I and a couple of others sat down at various LPC and GUADEC and discussed what we would like to see in an init system. And we had long discussions, but ultimately most of our ideas were outright rejected by Scott, such as the launchd-style activation and the cgroup stuff, two of the most awesome features in systemd now. (That said, we actually managed to convince him on other points, i.e. I believe we played a role in turning him from a D-Bus-hater into a D-Bus-lover).
Sorry, but that's complete bullshit.
We did sit down and discuss things, and you convinced me that launchd-style activation was a useful thing to have. Then you went off and wrote systemd anyway.
And it was Ryan Lortie who convinced me that D-Bus was the right way to go very early on, the conversion of Upstart to D-Bus happened years ago (Fedora is lagging behind on versions so only just got that).
So we have discussed this with Scott in much detail, and we have followed his development for a longer time. But in the end I just don't think Upstart is the right thing, and fundamentally flawed and unlikely to change direction, which is why we chose to start anew, and not just "fix" Upstart. For more about that just read my blog story.
Given that I have changed direction a couple of times with Upstart, and have been swayed to different courses by a good argument, I refuse that it's "unlikely to change direction" ;-)
I'm certainly more interested in getting Upstart *right* than in rushing to get it finished by a certain date.
To be clear, I believe the reason you implemented systemd instead of contributing help to Upstart is:
a) your personal distaste for Ubuntu and Canonical
b) your personal distaste for the copyright assignment policy (RedHat have signed this agreement for Upstart fwiw)
c) your personal love of nih ;-)
I don't think that's a bad thing, I certainly share (c) in equal measures <g>. I'm also not going to argue that Fedora shouldn't chose a different init system to mine, that's not really my place to do so.
However I do dispute that I haven't been flexible wrt Upstart's design; indeed I would claim that part of the reason development is slower than the rapid against-the-wall pace of other projects, is that I'm too flexible with its design ;-)
Scott
On Wed, 2010-05-26 at 12:35 +0100, Scott James Remnant wrote:
We did sit down and discuss things, and you convinced me that launchd-style activation was a useful thing to have. Then you went off and wrote systemd anyway.
If you want to add socket passing to upstart as well, we can turn this into a win-win situation instead of flaming each other.
If both upstart systemd support this in the same way, it will will be much easier to get the patches for the various services upstream. That is great.
Matthias
On Wed, 2010-05-26 at 08:43 -0400, Matthias Clasen wrote:
On Wed, 2010-05-26 at 12:35 +0100, Scott James Remnant wrote:
We did sit down and discuss things, and you convinced me that launchd-style activation was a useful thing to have. Then you went off and wrote systemd anyway.
If you want to add socket passing to upstart as well, we can turn this into a win-win situation instead of flaming each other.
If both upstart systemd support this in the same way, it will will be much easier to get the patches for the various services upstream. That is great.
I don't see any reason not to at least pass the LISTEN_FDS environment variable (though I can't figure out what LISTEN_PID is for?)
Upstart will support a different mechanism as well though, because for the services we want to activate this way in Ubuntu, there are benefits to having the services "phone back" to Upstart to pick up the socket.
Scott
On Wed, 26.05.10 15:52, Scott James Remnant (scott@canonical.com) wrote:
On Wed, 2010-05-26 at 08:43 -0400, Matthias Clasen wrote:
On Wed, 2010-05-26 at 12:35 +0100, Scott James Remnant wrote:
We did sit down and discuss things, and you convinced me that launchd-style activation was a useful thing to have. Then you went off and wrote systemd anyway.
If you want to add socket passing to upstart as well, we can turn this into a win-win situation instead of flaming each other.
If both upstart systemd support this in the same way, it will will be much easier to get the patches for the various services upstream. That is great.
I don't see any reason not to at least pass the LISTEN_FDS environment variable (though I can't figure out what LISTEN_PID is for?)
Ah nice, now we are talking, yesterday you were still refusing cooperation on this, and claimed the systemd scheme was "too simple"...
Regarding the LISTEN_PID env var:
environment variables are normally inherited when forking/execing. We want to make sure that only the process we actually start ourselves parses and handles LISTEN_FDS. We want to avoid that if this daemon might spawn some other process, it might get confused into handling LISTEN_FDS, although that env var wasn't actually intended for it.
And hence we say that LISTEN_PID should be verified first, and only if it matches LISTEN_FDS should be handled.
This is actually explained in my long blog story. Please read it. It's number 8 in the feature list!
Upstart will support a different mechanism as well though, because for the services we want to activate this way in Ubuntu, there are benefits to having the services "phone back" to Upstart to pick up the socket.
Right, would be good if you could elaborate about that. I alead asked you a couple of times about this. Would love to hear about the reasoning.
Lennart
On Wed, 2010-05-26 at 18:20 +0200, Lennart Poettering wrote:
On Wed, 26.05.10 15:52, Scott James Remnant (scott@canonical.com) wrote:
On Wed, 2010-05-26 at 08:43 -0400, Matthias Clasen wrote:
On Wed, 2010-05-26 at 12:35 +0100, Scott James Remnant wrote:
We did sit down and discuss things, and you convinced me that launchd-style activation was a useful thing to have. Then you went off and wrote systemd anyway.
If you want to add socket passing to upstart as well, we can turn this into a win-win situation instead of flaming each other.
If both upstart systemd support this in the same way, it will will be much easier to get the patches for the various services upstream. That is great.
I don't see any reason not to at least pass the LISTEN_FDS environment variable (though I can't figure out what LISTEN_PID is for?)
Ah nice, now we are talking, yesterday you were still refusing cooperation on this, and claimed the systemd scheme was "too simple"...
Regarding the LISTEN_PID env var:
environment variables are normally inherited when forking/execing. We want to make sure that only the process we actually start ourselves parses and handles LISTEN_FDS. We want to avoid that if this daemon might spawn some other process, it might get confused into handling LISTEN_FDS, although that env var wasn't actually intended for it.
And hence we say that LISTEN_PID should be verified first, and only if it matches LISTEN_FDS should be handled.
This is actually explained in my long blog story. Please read it. It's number 8 in the feature list!
Upstart will support a different mechanism as well though, because for the services we want to activate this way in Ubuntu, there are benefits to having the services "phone back" to Upstart to pick up the socket.
Right, would be good if you could elaborate about that. I alead asked you a couple of times about this. Would love to hear about the reasoning.
Scott, Lennart, A Proposal: maybe the two of you should continue this discussion off-list, in private. It may help facilitate more open communication since neither of you will feel you have to respond to things for an audience and you won't get any extraneous remarks from the peanut gallery (like myself). Perhaps there is more common ground than there appeared at first. If so - feeling it out in private may help all of us.
Thanks, -sv
On Wed, May 26, 2010 at 12:27:38PM -0400, seth vidal wrote:
On Wed, 2010-05-26 at 18:20 +0200, Lennart Poettering wrote:
On Wed, 26.05.10 15:52, Scott James Remnant (scott@canonical.com) wrote:
On Wed, 2010-05-26 at 08:43 -0400, Matthias Clasen wrote:
On Wed, 2010-05-26 at 12:35 +0100, Scott James Remnant wrote:
We did sit down and discuss things, and you convinced me that launchd-style activation was a useful thing to have. Then you went off and wrote systemd anyway.
If you want to add socket passing to upstart as well, we can turn this into a win-win situation instead of flaming each other.
If both upstart systemd support this in the same way, it will will be much easier to get the patches for the various services upstream. That is great.
I don't see any reason not to at least pass the LISTEN_FDS environment variable (though I can't figure out what LISTEN_PID is for?)
Ah nice, now we are talking, yesterday you were still refusing cooperation on this, and claimed the systemd scheme was "too simple"...
Regarding the LISTEN_PID env var:
environment variables are normally inherited when forking/execing. We want to make sure that only the process we actually start ourselves parses and handles LISTEN_FDS. We want to avoid that if this daemon might spawn some other process, it might get confused into handling LISTEN_FDS, although that env var wasn't actually intended for it.
And hence we say that LISTEN_PID should be verified first, and only if it matches LISTEN_FDS should be handled.
This is actually explained in my long blog story. Please read it. It's number 8 in the feature list!
Upstart will support a different mechanism as well though, because for the services we want to activate this way in Ubuntu, there are benefits to having the services "phone back" to Upstart to pick up the socket.
Right, would be good if you could elaborate about that. I alead asked you a couple of times about this. Would love to hear about the reasoning.
Scott, Lennart, A Proposal: maybe the two of you should continue this discussion off-list, in private. It may help facilitate more open communication since neither of you will feel you have to respond to things for an audience and you won't get any extraneous remarks from the peanut gallery (like myself). Perhaps there is more common ground than there appeared at first. If so
- feeling it out in private may help all of us.
Also, while I certainly don't want to discourage a techincal discussion on the devel list, I would think much of this conversation should have been had on the systemd-devel list instead. At least it wouldn't have gotten lost there.
josh
On Wed, 26.05.10 12:27, seth vidal (skvidal@fedoraproject.org) wrote:
Right, would be good if you could elaborate about that. I alead asked you a couple of times about this. Would love to hear about the reasoning.
Scott, Lennart, A Proposal: maybe the two of you should continue this discussion off-list, in private.
Well, just to point out, Scott and I and Kay had a private email exchange just about this yesterday and the day before yesterday. Was kinda one-sided, the public discussion is sometimes helpful to actually force those involved to make real points, instead of wishy-washy comments...
But anyway, I see no point on continuing that here either.
Lennart
On Wed, 2010-05-26 at 18:40 +0200, Lennart Poettering wrote:
Well, just to point out, Scott and I and Kay had a private email exchange just about this yesterday and the day before yesterday. Was kinda one-sided, the public discussion is sometimes helpful to actually force those involved to make real points, instead of wishy-washy comments...
But anyway, I see no point on continuing that here either.
I didn't realize there was a previous private exchange. I was just noticing the escalation in the discussion and it worried me for anything useful coming out of it. Like I said - I was just making a proposal. I'll step out of this, now.
It appears this subject has been picked up on lwn - so I'm certain there will be a fruitful, productive and constructive discussion there.
-sv
seth vidal wrote:
It appears this subject has been picked up on lwn - so I'm certain there will be a fruitful, productive and constructive discussion there.
Hahaha! You gotta be kidding! LWN keeps posting flamewars as "news" and their comments are infested by trolls like no other place!
Kevin Kofler
On Wed, 2010-05-26 at 23:39 +0200, Kevin Kofler wrote:
seth vidal wrote:
It appears this subject has been picked up on lwn - so I'm certain there will be a fruitful, productive and constructive discussion there.
Hahaha! You gotta be kidding! LWN keeps posting flamewars as "news" and their comments are infested by trolls like no other place!
I believe Seth was displaying that common Fedorian trait generally referred to as 'sarcasm' =)
On Wed, 2010-05-26 at 23:39 +0200, Kevin Kofler wrote:
seth vidal wrote:
It appears this subject has been picked up on lwn - so I'm certain there will be a fruitful, productive and constructive discussion there.
Hahaha! You gotta be kidding! LWN keeps posting flamewars as "news" and their comments are infested by trolls like no other place!
Kevin Kofler
May I introduce you to sarcasm?
On Wed, May 26, 2010 at 23:39:49 +0200, Kevin Kofler kevin.kofler@chello.at wrote:
seth vidal wrote:
It appears this subject has been picked up on lwn - so I'm certain there will be a fruitful, productive and constructive discussion there.
Hahaha! You gotta be kidding! LWN keeps posting flamewars as "news" and
What's interesting is that Fedora's development / user list "discussions" get so much press on LWN.
their comments are infested by trolls like no other place!
You must not read slashdot.
On Wed, 26 May 2010 18:20:08 +0200 Lennart Poettering mzerqung@0pointer.de wrote:
Regarding the LISTEN_PID env var:
environment variables are normally inherited when forking/execing. We want to make sure that only the process we actually start ourselves parses and handles LISTEN_FDS. We want to avoid that if this daemon might spawn some other process, it might get confused into handling LISTEN_FDS, although that env var wasn't actually intended for it.
And hence we say that LISTEN_PID should be verified first, and only if it matches LISTEN_FDS should be handled.
If you are mandating behavior in daemons, wouldn't it be simpler to mandate the daemon unsets LISTEN_FDS ?
If I replace the process with a script, or the dameon runs other processes LISTEN_PID is going to be wrong anyway, not sure how useful it really is.
You are assuming that the process you run is always going to be *the* daemon. I think it is an unrealistic assumption to make.
Simo.
On Wed, 26.05.10 14:47, Simo Sorce (ssorce@redhat.com) wrote:
environment variables are normally inherited when forking/execing. We want to make sure that only the process we actually start ourselves parses and handles LISTEN_FDS. We want to avoid that if this daemon might spawn some other process, it might get confused into handling LISTEN_FDS, although that env var wasn't actually intended for it.
And hence we say that LISTEN_PID should be verified first, and only if it matches LISTEN_FDS should be handled.
If you are mandating behavior in daemons, wouldn't it be simpler to mandate the daemon unsets LISTEN_FDS ?
Yes, our reference implementation actually does that. But we didn't want to rely on that, simply because handling the environ[] array is so messy, since memory allocation is not clear and the whole thing is not thread-safe. In many case environ[] should probably be considered a read-only data structure during runtime.
If I replace the process with a script, or the dameon runs other processes LISTEN_PID is going to be wrong anyway, not sure how useful it really is.
Nah, as long as the script calls exec() in the end it should be fine, as the PID isn't changed on exec(). Note that for the purpose of baby-sitting it is kinda nice to know which process is the main process of a daemon, hence needless fork()ing on startup sucks anyway, and should better not be done if we can.
You are assuming that the process you run is always going to be *the* daemon. I think it is an unrealistic assumption to make.
Oh, its very much realistic I think. It holds for every single of the 10 daemons or so from the default F13 install and beyond I have patched so far.
Lennart
On Tue, 2010-06-01 at 02:52 +0200, Lennart Poettering wrote:
On Wed, 26.05.10 14:47, Simo Sorce (ssorce@redhat.com) wrote:
environment variables are normally inherited when forking/execing. We want to make sure that only the process we actually start ourselves parses and handles LISTEN_FDS. We want to avoid that if this daemon might spawn some other process, it might get confused into handling LISTEN_FDS, although that env var wasn't actually intended for it.
And hence we say that LISTEN_PID should be verified first, and only if it matches LISTEN_FDS should be handled.
If you are mandating behavior in daemons, wouldn't it be simpler to mandate the daemon unsets LISTEN_FDS ?
Yes, our reference implementation actually does that. But we didn't want to rely on that, simply because handling the environ[] array is so messy, since memory allocation is not clear and the whole thing is not thread-safe. In many case environ[] should probably be considered a read-only data structure during runtime.
I beg to differ, at least if we're talking about languages where you are able to just let a single thread run (not sure about Java): Simply document that the daemon should read and unset LISTEN_FDS (using unsetenv() instead of messing with environ manually) while there is only a single thread.
That is, if you really must use environment variables for passing that information... Others have mentioned it already: The environment is for information that is meant to be long-lived and shared between processes, it should be feasible to pass this information via a command line option instead. Even more so if handling of the environment is so messy.
Nils
Lennart Poettering wrote:
Regarding the LISTEN_PID env var:
environment variables are normally inherited when forking/execing. We want to make sure that only the process we actually start ourselves parses and handles LISTEN_FDS. We want to avoid that if this daemon might spawn some other process, it might get confused into handling LISTEN_FDS, although that env var wasn't actually intended for it.
And hence we say that LISTEN_PID should be verified first, and only if it matches LISTEN_FDS should be handled.
This suggests to me that environment variables isn't the right way to do this. Environment variables are good for parameters that should be available to many processes. Command line parameters are better when the parameter is only meant for one specific process. I can see how looking up two environment variables may be a smaller patch than adding a parameter to the program's command line parser, but I still think it should be done with command line parameters.
LISTEN_PID isn't bullet-proof by the way, because PIDs are reused. If the original daemon is restarted but its children live on, then later some descendant process may get the same PID as the original daemon, and may try to handle LISTEN_FDS. The risk may be low, but I always prefer a solution that is guaranteed to work over one that mostly works.
Once a lot of programs start using this it will be difficult to change it, so it would be good to get it right early on.
Björn Persson
On Wed, 26.05.10 22:06, Björn Persson (bjorn@rombobjörn.se) wrote:
This suggests to me that environment variables isn't the right way to do this. Environment variables are good for parameters that should be available to many processes. Command line parameters are better when the parameter is only meant for one specific process. I can see how looking up two environment variables may be a smaller patch than adding a parameter to the program's command line parser, but I still think it should be done with command line parameters.
This is a valid point and we have pondered this for a while and in the end decided to use environ[] instead of argv[], simply because this allows us to use the same code for handling it in all daemons, while handling --listen-fds=xxx in argv would work for some daemons, but not for others. (i.e. some don't do long getopt, others do it with one dash only). Also, quite a few projects (rsyslog for example) implement socket handling in loadable modules, where we have no access to argv[] but do have access to environ[].
LISTEN_PID isn't bullet-proof by the way, because PIDs are reused. If the original daemon is restarted but its children live on, then later some descendant process may get the same PID as the original daemon, and may try to handle LISTEN_FDS. The risk may be low, but I always prefer a solution that is guaranteed to work over one that mostly works.
Well, this is purely theoretical, since LISTEN_FDS should normally only be set for daemons that can actually handle this and hence as long as these are running none of their children can get the same PID.
Lennart
On Tue, 2010-06-01 at 04:13 +0200, Lennart Poettering wrote:
On Wed, 26.05.10 22:06, Björn Persson (bjorn@rombobjörn.se) wrote:
This suggests to me that environment variables isn't the right way to do this. Environment variables are good for parameters that should be available to many processes. Command line parameters are better when the parameter is only meant for one specific process. I can see how looking up two environment variables may be a smaller patch than adding a parameter to the program's command line parser, but I still think it should be done with command line parameters.
This is a valid point and we have pondered this for a while and in the end decided to use environ[] instead of argv[], simply because this allows us to use the same code for handling it in all daemons, while handling --listen-fds=xxx in argv would work for some daemons, but not for others. (i.e. some don't do long getopt, others do it with one dash only). Also, quite a few projects (rsyslog for example) implement socket handling in loadable modules, where we have no access to argv[] but do have access to environ[].
From looking at /etc/rsyslog.conf, rsyslogd already seems to have a
means to pass configuration into its modules. Offering the same interface on the command line shouldn't be rocket science.
LISTEN_PID isn't bullet-proof by the way, because PIDs are reused. If the original daemon is restarted but its children live on, then later some descendant process may get the same PID as the original daemon, and may try to handle LISTEN_FDS. The risk may be low, but I always prefer a solution that is guaranteed to work over one that mostly works.
Well, this is purely theoretical, since LISTEN_FDS should normally only be set for daemons that can actually handle this and hence as long as these are running none of their children can get the same PID.
Daemons are known to occasionally go down unplanned and as I read it, systemd is intended to restart them in that case. While child processes could then be killed off via the cgroup to which they belong, this is not always desirable, think of sshd and the children it forks for every login.
Nils
On Tue, 2010-06-01 at 04:13 +0200, Lennart Poettering wrote:
On Wed, 26.05.10 22:06, Björn Persson (bjorn@rombobjörn.se) wrote:
This suggests to me that environment variables isn't the right way to do this. Environment variables are good for parameters that should be available to many processes. Command line parameters are better when the parameter is only meant for one specific process. I can see how looking up two environment variables may be a smaller patch than adding a parameter to the program's command line parser, but I still think it should be done with command line parameters.
This is a valid point and we have pondered this for a while and in the end decided to use environ[] instead of argv[], simply because this allows us to use the same code for handling it in all daemons, while handling --listen-fds=xxx in argv would work for some daemons, but not for others. (i.e. some don't do long getopt, others do it with one dash only). Also, quite a few projects (rsyslog for example) implement socket handling in loadable modules, where we have no access to argv[] but do have access to environ[].
From looking at /etc/rsyslog.conf, rsyslogd already seems to have a
means to pass configuration into its modules. Offering the same interface on the command line shouldn't rocket science.
LISTEN_PID isn't bullet-proof by the way, because PIDs are reused. If the original daemon is restarted but its children live on, then later some descendant process may get the same PID as the original daemon, and may try to handle LISTEN_FDS. The risk may be low, but I always prefer a solution that is guaranteed to work over one that mostly works.
Well, this is purely theoretical, since LISTEN_FDS should normally only be set for daemons that can actually handle this and hence as long as these are running none of their children can get the same PID.
Daemons are known to occasionally go down unplanned and as I read it, systemd is intended to restart them in that case. While child processes could then be killed off via the cgroup to which they belong, this is not always desirable, think of sshd and the children it forks for every login.
Nils
Lennart Poettering wrote:
On Wed, 26.05.10 22:06, Björn Persson (bjorn@rombobjörn.se) wrote:
This suggests to me that environment variables isn't the right way to do this. Environment variables are good for parameters that should be available to many processes. Command line parameters are better when the parameter is only meant for one specific process. I can see how looking up two environment variables may be a smaller patch than adding a parameter to the program's command line parser, but I still think it should be done with command line parameters.
This is a valid point and we have pondered this for a while and in the end decided to use environ[] instead of argv[], simply because this allows us to use the same code for handling it in all daemons, while handling --listen-fds=xxx in argv would work for some daemons, but not for others. (i.e. some don't do long getopt, others do it with one dash only).
To handle different command line syntaxes I would apply some simple macro substitution to the command line in the .service file, replacing for example the string "%listen_FDs%" (or some other syntax) with the number of sockets. One daemon could then have the parameter "--listen-fds=%listen_FDs%", another could have "-sockets=%listen_FDs%" and a third could have "-q %listen_FDs%".
Also, quite a few projects (rsyslog for example) implement socket handling in loadable modules, where we have no access to argv[] but do have access to environ[].
I'd be surprised if any of those programs are designed such that they have no way of passing parameters to their modules.
LISTEN_PID isn't bullet-proof by the way, because PIDs are reused. If the original daemon is restarted but its children live on, then later some descendant process may get the same PID as the original daemon, and may try to handle LISTEN_FDS. The risk may be low, but I always prefer a solution that is guaranteed to work over one that mostly works.
Well, this is purely theoretical, since LISTEN_FDS should normally only be set for daemons that can actually handle this and hence as long as these are running none of their children can get the same PID.
I'm afraid I don't understand what you mean with "handle this". I thought at first that you meant that LISTEN_FDS should only be used for daemons that are known to clear it, but if that were the case you wouldn't have invented LISTEN_PID. Do you perchance mean that LISTEN_FDS should only be used in cases where all child processes will be killed if the daemon dies?
Björn Persson
On Wed, 26.05.10 12:35, Scott James Remnant (scott@canonical.com) wrote:
and GUADEC and discussed what we would like to see in an init system. And we had long discussions, but ultimately most of our ideas were outright rejected by Scott, such as the launchd-style activation and the cgroup stuff, two of the most awesome features in systemd now. (That said, we actually managed to convince him on other points, i.e. I believe we played a role in turning him from a D-Bus-hater into a D-Bus-lover).
Sorry, but that's complete bullshit.
We did sit down and discuss things, and you convinced me that launchd-style activation was a useful thing to have. Then you went off and wrote systemd anyway.
Well, my reading of this is different. You didn't seem convinced back then and nothing ever landed in the Upstart tree.
The cgroup start you outright rejected a couple of times since then.
And it was Ryan Lortie who convinced me that D-Bus was the right way to go very early on, the conversion of Upstart to D-Bus happened years ago (Fedora is lagging behind on versions so only just got that).
Ok, if you claim that we didn't play a role then I won't repeat that anymore. ;-)
So we have discussed this with Scott in much detail, and we have followed his development for a longer time. But in the end I just don't think Upstart is the right thing, and fundamentally flawed and unlikely to change direction, which is why we chose to start anew, and not just "fix" Upstart. For more about that just read my blog story.
Given that I have changed direction a couple of times with Upstart, and have been swayed to different courses by a good argument, I refuse that it's "unlikely to change direction" ;-)
Well, so you are willing to get rid of the evnt logic because it is broken?
I'm certainly more interested in getting Upstart *right* than in rushing to get it finished by a certain date.
Hmm, so far the "right" part didn't really work out, did it? ;-)
To be clear, I believe the reason you implemented systemd instead of contributing help to Upstart is:
a) your personal distaste for Ubuntu and Canonical
Oh come on. Thanks for turning this into something personal. I mean, I see how it can be handy to make this personal, because then you can just say that systemd is born out of a personal vendetta or something and hence ignore it or so. But uh, this is just stupid, especially since I have no distaste at all for Ubuntu or Canonical, that is completely made up.
I mean, I have publicly criticized some of the work Canonical has been doing in the past on technical grounds, but otoh I have been defending you too. For example, in this very recent blog story i only said good things about you:
http://0pointer.de/blog/projects/when-pa-and-when-not.html
And also I have been attending a few UDSes, and am working with your folks on various audio related things. I even hat a longer chat with your desktop manager at GUADEC last year to improve cooperation. If I would "dislike" you that much, why would I do this?
There is no distaste. Maybe you wish there was, but that is FUD, und unfair, and personal accusation. Stop that.
And learn to distuingish "technical criticism" from "emotional disliking".
b) your personal distaste for the copyright assignment policy (RedHat have signed this agreement for Upstart fwiw)
Oh yes, as if it was only me. I think the majority of free software folks dislike copyright assignment.
And I am not even very vocal about all of this, I am not a lawyer, and I pretty good at staying out of any discussions like that.
Also, rewriting something because of copyright assignment is stupid. As long as it is Free Software you can simply fork it, nothing more.
I mean, copyright assignment is just annoying for contributors, it gives potential contributors the clear signal that you are not interested in their code, and that if you take it you want to benefit from it more than the contributors could. That's just a dick move.
c) your personal love of nih ;-)
Oh, really? this is unsulting. May I quote my blog story:
"Is this an NIH project? Well, I hope that I managed to explain in the text above why we came up with something new, instead of building on Upstart or launchd. We came up with systemd due to technical reasons, not political reasons."
This is just annoying.
I mean, I read the upstart sources very closely, and I like the code and publicly stated that. And I have contrubuted code to numerious other open source projects. And that should tell you that this is not about NIH, for whatever that actually should be.
I don't think that's a bad thing, I certainly share (c) in equal measures <g>. I'm also not going to argue that Fedora shouldn't chose a different init system to mine, that's not really my place to do so.
Well, nice rethorical trick, but uh, it's just bogus. I have no distaste for Ubuntu/Canonical, and the copyright assignment mess certainly didn't help to make me love upstart, but also certainly only played a minor role in the reasoning for systemd. And the NIH claim is just bogus.
I'd prefer it we would keep this discussion purely technical. Everything else does not help at all in this matter.
So, if you have say something, then please criticise systemd on a technical level, and tell us why Upstart is better in your opinion. I am pretty sure most folks on this list appreciate technical discussions much more than personal flaming. Thank you.
STAY TECHNICAL! DROP THE PERSONAL ACCUSATIONS! Thank you.
However I do dispute that I haven't been flexible wrt Upstart's design; indeed I would claim that part of the reason development is slower than the rapid against-the-wall pace of other projects, is that I'm too flexible with its design ;-)
That doesn't really sound very inviting. I mean "Hey, adopt Upstart now, we haven't made our mind up yet what we want to be, and we will redesign the whole story soon!" is not really useful as an advertisement for Upstart, is it?
Lennart
On Wed, 2010-05-26 at 18:14 +0200, Lennart Poettering wrote:
Oh come on. Thanks for turning this into something personal.
You did that last week - I got forwarded logs from #systemd. That's probably why I wasn't in a great mood with you this morning ;-)
I'd prefer it we would keep this discussion purely technical. Everything else does not help at all in this matter.
I think you're wrong, you think I'm wrong; let's go shopping :-)
I only jumped in to refute your comment that you'd talked to me, and I hadn't listened, because that was incorrect.
I'm not sure there's any point in technical discussion about the relative merits of our two approaches at this point, since you've already *written* systemd and you're already pushing for inclusion in distributions, and I'm continuing to develop Upstart and already have it in distributions.
So what we've ended up with is two different systems, and one can assume that roughly half the distributions will end up with one, and another half with the other.
At least we have the common standard of the LSB Init Scripts that both will support.
Scott
On Wed, 26.05.10 18:02, Scott James Remnant (scott@canonical.com) wrote:
On Wed, 2010-05-26 at 18:14 +0200, Lennart Poettering wrote:
Oh come on. Thanks for turning this into something personal.
You did that last week - I got forwarded logs from #systemd. That's probably why I wasn't in a great mood with you this morning ;-)
Not sure what you are referring to.
I'm not sure there's any point in technical discussion about the relative merits of our two approaches at this point, since you've already *written* systemd and you're already pushing for inclusion in distributions, and I'm continuing to develop Upstart and already have it in distributions.
Well, the members of this mailing list are definitely interested in the relative merits of both systems, since it is people on this mailing list who in the end will have to come up with an informed decision about systemd adoption in Fedora.
I mean, I have been writing novels here about how awesome systemd is (and how upstart isn't ;-)). If you think that Fedora would make a big mistake in adopting systemd, then please point out why, I am pretty sure people will listen if you keep things technical.
It's always good to hear both sides when a decision needs to be made.
So what we've ended up with is two different systems, and one can assume that roughly half the distributions will end up with one, and another half with the other.
Well. We'll see about that.
At least we have the common standard of the LSB Init Scripts that both will support.
Well, it would be good if we'd have more than that. Since you want to support socket-based activation too now in Upstart it would be great if we could also come to an agreement on the $LISTEN_FD iface and similar.
Lennart
Le dimanche 23 mai 2010 à 00:34 +0200, Lennart Poettering a écrit :
ATM everything looks rosy. I just finished porting over all F13 installed-by-default daemons to socket activation, and a few more (and the patches are good enough to be upstreamable).
For this kind of stuff I strongly suggest you do not limit yourself to F13 installed-by-default daemons (which are mostly well-behaved C/C++ desktop-oriented code) but pass the reality check of converting important server daemons (postfix, apache, bind...) and non C/C++ services (jboss or tomcat in java, amavisd-new or something else in perl, etc)
Otherwise you'll replay the networkmanager drama with part of the Fedora users going the new laptop way, part refusing to even look at it because it can not translate in the server stuff they need at work, and everyone being very sad, unhappy, and angry at others.
On Wed, 26.05.10 19:45, Nicolas Mailhot (nicolas.mailhot@laposte.net) wrote:
Le dimanche 23 mai 2010 à 00:34 +0200, Lennart Poettering a écrit :
ATM everything looks rosy. I just finished porting over all F13 installed-by-default daemons to socket activation, and a few more (and the patches are good enough to be upstreamable).
For this kind of stuff I strongly suggest you do not limit yourself to F13 installed-by-default daemons (which are mostly well-behaved C/C++ desktop-oriented code) but pass the reality check of converting important server daemons (postfix, apache, bind...) and non C/C++ services (jboss or tomcat in java, amavisd-new or something else in perl, etc)
Well, I'd argue that for server software like that neither the lazy-loading of daemons nor fast booting is really crucial. It's OK if a server takes a bit longer to boot. It's way less important than for a desktop or laptop. The focus of the service activation work should be on services needed by desktop systems I guess. For everything else the implicit activation is handy too, but not as crucial.
Otherwise you'll replay the networkmanager drama with part of the Fedora users going the new laptop way, part refusing to even look at it because it can not translate in the server stuff they need at work, and everyone being very sad, unhappy, and angry at others.
Well, while network configuration is certainly very important for server setups, super-fast booting and lazy-loading of daemons is not.
Lennart
On Wed, 2010-06-02 at 02:50 +0200, Kevin Kofler wrote:
Lennart Poettering wrote:
It's OK if a server takes a bit longer to boot.
A longer boot time for your server means more downtime if you need to reboot your server for whatever reason.
Please be careful not to take Lennart's remark out of context. A server takes longer /than a desktop/ since it doesn't take full advantage of systemd; it doesn't take longer than without systemd, because presumably the SysV init emulation doesn't have a significant performance penalty. There is no disadvantage of systemd here.
If you were just saying that it may be worth the effort at some point to optimize server boot time, that point is taken.
Matt McCutchen wrote:
Please be careful not to take Lennart's remark out of context. A server takes longer /than a desktop/ since it doesn't take full advantage of systemd; it doesn't take longer than without systemd, because presumably the SysV init emulation doesn't have a significant performance penalty. There is no disadvantage of systemd here.
Oh, of course, sorry for not having made that clear.
If you were just saying that it may be worth the effort at some point to optimize server boot time, that point is taken.
Right. That's what I really meant.
Kevin Kofler
On 05/22/2010 11:06 PM, Lennart Poettering wrote:
On Sat, 22.05.10 18:30, Xose Vazquez Perez (xose.vazquez@gmail.com) wrote:
Is it worth using tmpfs for some directories(/var/run, lock...) ?
Yes. But this requires some changes all across the distro, just have a look at the output of "rpm -qf /var/run/*".
That said most apps are fixed by now and don't choke when their subdir in /var/run goes away on reboot, since both SUSE and Ubuntu are using tmpfs on /var/run, and have done most of the work. So at this point this should be mostly packaging work (%ghost in .spec files!), not programming work to make /var/run compatible with tmpfs.
I hope to see it in f14 with upstart, and/or systemd.
(And as a side note: systemd by default puts a tmpfs to both /var/run and /var/lock).
It would be wonderful to see systemd in rawhide, and let people play with it.
-thanks-
On Sun, 30.05.10 00:38, Xose Vazquez Perez (xose.vazquez@gmail.com) wrote:
On 05/22/2010 11:06 PM, Lennart Poettering wrote:
On Sat, 22.05.10 18:30, Xose Vazquez Perez (xose.vazquez@gmail.com) wrote:
Is it worth using tmpfs for some directories(/var/run, lock...) ?
Yes. But this requires some changes all across the distro, just have a look at the output of "rpm -qf /var/run/*".
That said most apps are fixed by now and don't choke when their subdir in /var/run goes away on reboot, since both SUSE and Ubuntu are using tmpfs on /var/run, and have done most of the work. So at this point this should be mostly packaging work (%ghost in .spec files!), not programming work to make /var/run compatible with tmpfs.
I hope to see it in f14 with upstart, and/or systemd.
(And as a side note: systemd by default puts a tmpfs to both /var/run and /var/lock).
It would be wonderful to see systemd in rawhide, and let people play with it.
To make that happen somebody needs to propose that for F14, and work on it, and file the necessary bugs. It won't happen on its own.
Anyone wants to pick this up?
Lennart
devel@lists.stg.fedoraproject.org