/srv/irclogs.ubuntu.com/2010/05/02/#upstart.txt

dkamHey 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:14
dkamSeems like a good way to do it - starts up at system startup, respawns if it crashes. 02:15
dkamDoes this look sane?  http://gist.github.com/38680802:16
dkam(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:18
tormenthow can i tell upstart to not start network-interface from grub?02:40
tormentits hanging my system boot02:50
tormentno takers huh03:07
Keybukdon'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 :-(07:49
ionHeh08:10
ionPerhaps some unknown person just happens to get hold of it and post it anonymously in a pastebin/wikileaks/something. :-P08:12
Keybuklol08:22
KeybukI don't really want to enter a public argument with Lennart over systemd vs. upstart08:23
Keybukor, indeed, a private argument ;)08:23
Keybukmail was answering internal questions as to why Upstart doesn't do some of the things systemd does08:24
Keybuklike why cgroups don't work for process supervision08:24
* Keybuk played with them for Upstart a couple of years ago, if you recall08:27
ionYeah, vaguely08:29
Keybukit's the screen problem08:29
Keybukyou place each service in a cgroup08:30
Keybukcgroups ensure each child process is in the same cgroup08:31
Keybukand you use the cgroup feature where a cgroup becoming empty notifies the cgroup creator08:31
Keybukso, getty has a service08:31
Keybukthat service has a cgroup (debug:/systemd-1/getty@.service/tty1 in systemd)08:31
Keybukyou login, your login process stays in that cgroup08:31
Keybukand your bash process stays in that cgroup08:32
Keybuknow you run screen08:32
Keybukthat stays in that cgroup08:32
Keybukand you run something like irc08:32
Keybukthat stays in that cgroup08:32
Keybukyou now detach screen, and exit bash (and thus exit login)08:32
Keybukscreen is still running08:32
Keybukirc is still running08:32
Keybukthe cgroup is not empty08:32
Keybukgetty is not respawned08:32
ionRight08:37
ionI 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
ion... 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:38
Keybukit would be pretty trivial with btrfs08:39
Keybukthough why would you want to reorder the filesystem all the time?08:39
Keybukyou only really care about the order of things read during boot08:39
Keybukto try and group them together08:39
ionI also care about things read during post-boot computer usage. Windows™ does that too, optimizing blocks for frequently started pieces of software.08:40
ionThe actual reordering doesn’t need to be constant. It could also happen every now and then.08:40
Keybukbear in mind though that the newer Linux filesystems tend to not fragment as much08:43
Keybukso exactly what windows does might not be relevant08:43
Keybukyou might, instead, for example want to keep track of the most commonly used files08:44
Keybukrather than blocks08:44
ionNevertheless, 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
Keybukand when those packages are upgraded, hint strongly to btrfs not to accept fragmentation08:44
Keybukright, but the windows approach is probably wrong08:44
Keybuk(for Linux's filesystems)08:44
ionThe 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:46
ionAnd, naturally, keep evolving the model forever. There should also be a bias toward recent usage patterns.08:48
Keybukno08:48
Keybukagain08:48
Keybukyou don't want to reorder *blocks* on a Linux filesystem08:49
Keybukyou want to reorder *files*08:49
ionMake that more generic: s/blocks/data/, so an implementation that reorders files matches the description. :-)08:50
Keybukit'd be pretty easy to write though08:50
Keybukjust enable open tracing08:50
Keybukand on shutdown read through /sys/debug/tracing/trace and update your file lists08:50
Keybukthen reorder08:51
ionYeah08:51
JanCreordering files takes time too  ;)09:59
ionNaturally10:09
Keybukmy iPhone feels a lot smaller now10:34

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!