[02:14] Hey guys - I run a web app which requires a couple of daemons to run - is it appropriate to use Upstart to manage these users based processes? [02:15] Seems like a good way to do it - starts up at system startup, respawns if it crashes. [02:16] Does this look sane? http://gist.github.com/386808 [02:18] (I'm still not quite sure about where the environment variables go - I think sudo eats them if I don't put them within the sudo call) [02:40] how can i tell upstart to not start network-interface from grub? [02:50] its hanging my system boot [03:07] no takers huh [07:49] don't you just hate it when you write an e-mail that would make an awesome blog post, but can't, for any number of reasons, post it publicly :-( [08:10] Heh [08:12] Perhaps some unknown person just happens to get hold of it and post it anonymously in a pastebin/wikileaks/something. :-P [08:22] lol [08:23] I don't really want to enter a public argument with Lennart over systemd vs. upstart [08:23] or, indeed, a private argument ;) [08:24] mail was answering internal questions as to why Upstart doesn't do some of the things systemd does [08:24] like why cgroups don't work for process supervision [08:27] * Keybuk played with them for Upstart a couple of years ago, if you recall [08:29] Yeah, vaguely [08:29] it's the screen problem [08:30] you place each service in a cgroup [08:31] cgroups ensure each child process is in the same cgroup [08:31] and you use the cgroup feature where a cgroup becoming empty notifies the cgroup creator [08:31] so, getty has a service [08:31] that service has a cgroup (debug:/systemd-1/getty@.service/tty1 in systemd) [08:31] you login, your login process stays in that cgroup [08:32] and your bash process stays in that cgroup [08:32] now you run screen [08:32] that stays in that cgroup [08:32] and you run something like irc [08:32] that stays in that cgroup [08:32] you now detach screen, and exit bash (and thus exit login) [08:32] screen is still running [08:32] irc is still running [08:32] the cgroup is not empty [08:32] getty is not respawned [08:37] Right [08:38] I was thinking of how to collect disk usage patterns for optimum reordering in the far future. There could be a daemon that constantly gets information about block reads from the kernel and updates a markov chain. A defrag process could then run with idle IO priority and reorder filesystem blocks to optimize for the parts of the chain with the highest usage weights. The chain could additionally be pruned of stuff below a weight threshold every now and then. I have ... [08:38] ... no idea whether that would actually be feasible, but there must be a way to do something similar, since Windows™ is doing it. Another thought: a device mapper that does filesystem-independent block reordering based on that data. [08:39] it would be pretty trivial with btrfs [08:39] though why would you want to reorder the filesystem all the time? [08:39] you only really care about the order of things read during boot [08:39] to try and group them together [08:40] I also care about things read during post-boot computer usage. Windows™ does that too, optimizing blocks for frequently started pieces of software. [08:40] The actual reordering doesn’t need to be constant. It could also happen every now and then. [08:43] bear in mind though that the newer Linux filesystems tend to not fragment as much [08:43] so exactly what windows does might not be relevant [08:44] you might, instead, for example want to keep track of the most commonly used files [08:44] rather than blocks [08:44] Nevertheless, if a person always starts OpenOffice and Firefox after booting the system, it would be nice for the blocks to be in roughly sequential order. [08:44] and when those packages are upgraded, hint strongly to btrfs not to accept fragmentation [08:44] right, but the windows approach is probably wrong [08:44] (for Linux's filesystems) [08:46] The base concept sounds good for any filesystem. Generate a statistical model, such as a markov chain, and reorder blocks based on what weighs the most in the model. [08:48] And, naturally, keep evolving the model forever. There should also be a bias toward recent usage patterns. [08:48] no [08:48] again [08:49] you don't want to reorder *blocks* on a Linux filesystem [08:49] you want to reorder *files* [08:50] Make that more generic: s/blocks/data/, so an implementation that reorders files matches the description. :-) [08:50] it'd be pretty easy to write though [08:50] just enable open tracing [08:50] and on shutdown read through /sys/debug/tracing/trace and update your file lists [08:51] then reorder [08:51] Yeah [09:59] reordering files takes time too ;) [10:09] Naturally [10:34] my iPhone feels a lot smaller now