Search Results: "bab"

19 April 2007

Russell Coker: a Heartbeat developer comments on my blog post

Alan Robertson (a major contributor to the Heartbeat project) commented on my post failure probability and clusters. His comment deserves wider readership than a comment generally gets so I'm making a post out of it. Here it is:


One of my favorite phrases is "complexity is the enemy of reliability" . This is absolutely true, but not a complete picture, because you don't actually care much about reliability, you care about availability.

Complexity (which reduces MTBF) is only worth it if you can use it to drastically cut MTTR - which in turn raises availability significantly. If your MTTR was 0, then you wouldn't care if you ever had a failure. Of course, it's never zero

But, with normal clustering software, you can significantly improve your availability, AND your maintainability.

Your post makes some assumptions which are more than a little simplistic. To be fair, the real mathematics of this are pretty darn complicated.

First I agree that there are FAR more 2-node clusters than larger clusters. But, I think for a different reason. People understand 2-node clusters. I'm not saying this isn't important, it is important. But, it's not related to reliability.

Second, you assume a particular model of quorum, and there are many. It is true that your model is the most common, but it's hardly the only one - not even for heartbeat (and there are others we want to implement).

Third, if you have redundant networking, and multiple power sources, as it should, then system failures become much less correlated. The normal model which is used is completely uncorrelated failures.

This is obviously an oversimplification as well, but if you have redundant power supplies supplied from redundant power feeds, and redundant networking etc. it's not a bad approximation.

So, if you have an MTTR of 4 hours to repair broken hardware, what you care about is the probability of having additional failures during those four hours.

If your HA software can recover from an error in 60 seconds, then that's your effective MTTR as seen by (a subset) of users. Some won't see it at all. And, of course, that should also go into your computation. This depends on knowing a lot about what kind of protocol is involved, and what the probability of various lengths of failures is to be visible to various kinds of users. And, of course, no one really knows that either in practice.

If you have a hardware failure every 5 years approximately, and a hardware repair MTTR of 4 hours, then the probability of a second failure during that time is about .009%. The probability of two failures occuring during that time is about 8^10-7% - which is a pretty small number.

Probabilities for higher order failures are proportionately smaller.

But, of course, like any calculation, the probabilities of this are calculated using a number of simplifying assumptions.

It assumes, for example, that the probabilities of correlated failures are small. For example, the probability of a flood taking out all the servers, or some other disaster is ignored.

You can add complexity to solve those problems too ;-), but at some point the managerial difficulties (complexity) overwhelms you and you say (regardless of the numbers) that you don't want to go there.

Mangerial complexity is minimized by uniformity in the configuration. So, if all your nodes can run any service, that's good. If they're asymmetric, and very wildly so, that's bad.

I have to go now, I had a family emergency come up while I was writing this. Later...


End quote.

It's interesting to note that there are other models of quorum, I'll have to investigate that. Most places I have worked have had a MTTR that is significantly greater than four hours. But if you have hot-swap hard drives (so drive failure isn't a serious problem) then having machines have an average of one failure per five years should be possible.

Alastair McKinstry: Cool Stars: Brown dwarfs as pulsars

Super Aurora, believed to cause brown dwarf pulsations
Artist's impression of the "super-aurorae" present at the magnetic poles of these radio emitting dwarfs which are responsible for the radio pulsations. (Image thanks to Gregg Hallinan, NUI Galway).
As a followup to the talk given at Galway Astrofest 2007 by Dr. Aaron Golden on work done by the Cool Stars research Group here at NUIG, the detail of this work were announced this week at the RAS National Astronomy Meeting 2007. Other press releases can be found at Spaceflight Now, and NRAO, though the best summary is probably at the NUIG Webpage (Thanks to Ronan Newman for the links). Kudos to all involved: Gregg and Stephen are currently writing up their PhDs and should have an interesting dissertions from this. Basically, they discovered that some Brown Dwarfs can act as Pulsars, blasting out huge amounts of radio-wave energy. Brown Dwarfs are objects between 'Planet' and 'Star' in mass terms, often thought of as boring failed stars, not large enough to ignite into fusion. They were thought by most to be highly boring : this discovery was completely unexpected. As the group in Galway has a lot of pulsar experience, they were well set to explain this. It looks as though this phenomena is due to a 'coherent maser' : an effect seen in large planets such as Jupiter, where the magnetic field spins up electrons from a solar wind. Certainly, it makes Brown Dwarfs, undiscovered until 1994 but thought to be widespread across the universe, more interesting things to look at.

Adam Rosi-Kessel: Adam s Super Simple Guide to mbox->maildir conversion

There are a lot of pages out there explaining how to convert your mail from mbox to maildir. I’m going to add one more, resurrecting the “tips” section of my blog. (All the tips from my blosxom days are grouped together on one page — someday I’ll get around to breaking those up properly.) If nothing else, I’ll never have to write these instructions in an email to someone again, instead I’ll just send them the link to this entry. I hope these steps are specific enough so anyone savvy enough to even have this problem in the first place will be able to follow them. One thing I find consistently concerns people when converting to maildir is how to make sure no mail is lost in the transition. The steps below address that concern. It’s really not hard at all once you understand how maildir works. First, I’m assuming you have mb2md installed and procmail support. Also, if you plan to access your mail through IMAP, your IMAP server needs to know to use ~/Maildir if ~/Mail does not exist. This is often default behavior (at least it is for Dovecot). Finally, I assume that your inbox is in /var/mail/username, and your other mail folders are in ~/mail. So, here goes:
  1. Edit your .procmailrc. The first two lines should read:
    MAILDIR=$HOME/Maildir
    DEFAULT=$MAILDIR/

    This will cause all new mail to be delivered (after you save your .procmailrc) to be stored in maildir format under ~/Maildir. The key for procmail to know to use the maildir format is the trailing slash in the “DEFAULT” line. Note that under the new system, your inbox and all your folders are kept in ~/Maildir, rather than having an inbox in /var/mail and your folders under your home directory. (This is nice because it makes it easier to back up all your mail together, among other things).
  2. If you have any specific procmail rules in your .procmailrc, you’ll also need to change the target folders for that. For example, if you have a spam filtering rule like this:
    :0 H
    * ^X-Spam-Level: *****
    spam
    It needs to be changed to this:

    :0 H
    * ^X-Spam-Level: *****
    .spam/

    The trailing slash, again, tells procmail to use maildir rather mbox format for delivery. The leading dot will make the folder appear properly for your IMAP client (there’s a trick I suggest below for making “dot” folders easy to access with a command line client like mutt).
If you have mail being delivered to a nested mail folder, an additional change is needed because maildir has a flat hierarchy. So if your mail was being delivered to “misc/other/spam” the new target should be “.misc.other.spam/”.
  • Save your .procmailrc. From this point forward, all mail will be delivered to your maildir folders. You can now import all your old mail to the new folders without concern. Since maildir stores each individual message as a separate unique file, you don’t need to worry about any overwriting issues while you are making the transition. New mail will be delivered to newly named files; old mail will be imported to other, unique, newly named files.
  • Import your mail folders:
    mb2md -s ~/mail -R
    The -R just means to import recursively through all your folders; if your mail folder is Mail rather than mail, use that instead. No destination is needed because mb2md uses ~/Maildir by default.
  • Import your inbox:
    mb2md -m
  • Move your old inbox out of the way. Most people won’t actually be able to move or delete files in /var/mail (since they don’t have directory write privileges), so the easiest thing is probably to just open the inbox in your IMAP client or with mutt and save or delete all the messages.
  • Move your old mail folder out of the way:mv ~/mail ,.bak Once you’ve confirmed that everything is okay, you should be able to delete ~/mail.bak (or compress it and move it elsewhere.) If you saved your inbox to mail folder in step 6, that will get moved out of the way here as well.
  • That’s it, you’re done.
  • Okay, so you’re not quite done if you access your mail with mutt rather than an IMAP client. (You could just point your mutt at your local IMAP server, of course). I’ve found the most convenient way to access the “dot” folders with mutt is to create a parallel symlinked folder structure without the dots. Here’s a hacked-together shell script that will do that. This could obviously be rewritten to be much more elegant (probably in perl). But we all have our messy scripts, right?

    #!/bin/bash
  • cd ~/Maildir for x in .*
    do
    y=$ x##.
    if ( echo $y grep -q ‘.’ )
    then
    mkdir -p ~/mymail/$ y%.*
    fi
    ln -s ~/Maildir/$x ~/mymail/ echo $y sed “s/.///g”
    done for x in *
    do
    ln -s ~/Maildir/$x ~/mymail
    done
    Then, just add these lines to your .muttrc file:
    set folder="~/mymail"
    set spoolfile=”~/mymail”
    Any questions?

    18 April 2007

    Jos Parrella: Sobre moderaci n en Planeta Linux

    Desde su concepci n, Planeta Linux ha exhortado a sus participantes a sindicar contenido exclusivamente relacionado con tecnolog a, computaci n, software libre y Linux, en orden incremental de preferencia. Pronto se determin que la exhortaci n no era suficiente y se pas al requerimiento. H ctor Colina y Milton Mazzarri, por nombrar dos venezolanos, estuvieron involucrados en los Lineamientos y las Preguntas Frecuentes de Planeta Linux Venezuela. Como para ese momento ya hab amos hecho un grupo inicial de “venezolanos con blog que hablan de Linux” (b sicamente gente de VELUG, SOLVE, Debian Venezuela y de unplug.org.ve), no tuvimos la oportunidad de requerirles que tuvieran una categor a dedicada a Planeta Linux. A las nuevas personas que se inscrib an por la lista, en ocasiones se les requer a la categor a si su blog conten a, a primera vista, contenido no relacionado con Linux. En todos los casos, se requer a estar de acuerdo con los Lineamientos. En el caso de las personas que me solicitaban a mi directamente (que desde hace no mucho tengo acceso al SVN de Planeta Linux) yo les requer a una categor a particular, a menos de que su software no lo permitiera. En este ltimo caso, muy a pesar de los quejones de oficio, elimin bamos a la persona de PL. Es el caso de Luigino Bracci, quien en alguna ocasi n lleg a llenar todo Planeta Linux con contenido pol tico parcializado, y quien manifest que su sistema de blogs no le permit a agregar categor as. Hay casos en los que una persona que escribe poco o que suele escribir de Linux llega y hace algun desastre al estilo Alberto Capella con su foto a tama o gigante. En esos casos alguien se da cuenta y me avisa (aunque es un error, al final de la p gina hay direcciones de contacto y en Venezuela somos varios que administramos!) pero estoy involucrado en muchas cosas como para dar respuesta inmediata a ese tipo de casos. Y ah viene otro problema. En Planeta Linux NO PODEMOS moderar un post o a una persona. Solo podemos suspenderlo o eliminarlo. No podemos borrar una imagen ni un post ni nada, porque en 15 minutos perdemos los cambios. Espero que eso de algunas luces cuando haya algo de que quejarse en Planeta Linux. El ltimo caso es particular. Jes s Lara hizo varios posts no relacionados con Linux en su blog. Particularmente hubo gente que reclam que hab an recien escrito algo relacionado con Linux y los posts de Jes s “empujaron” los posts relacionados con Linux hacia el final del Planeta. Por lo tanto suspendi la suscripci n de Jes s y lo contact el 9 de Abril. Cre una categor a y me lo comunic . Eso es suficiente para volver a reactivar su suscripci n (en este caso me tard unos d as porque el commit fall y nunca me enter de ello, ni Jes s me lo inform , realmente) Ya hay mucha gente que sindica categor as en PL, y pronto ser n muchos m s. Cont ctenme si quieren hacer el proceso pronto. Por favor, la pr xima vez que encuentren un problema en Planeta Linux:

    Russell Coker: 2 node vs 3+ node clusters

    A comment on my post about the failure probability of clusters suggested that a six node cluster that has one node fail should become a five node cluster.

    The problem with this is what to do when nodes recover from a failure. For example if a six node cluster had a node fail and became a five node cluster, then became a three node cluster after another two nodes had failed, then you would have half the cluster that was disconnected. If the three nodes that appeared to have failed became active again but unable to see the other three nodes then you would have a split-brain situation.

    As noted in the comment the special case of a two node cluster does have different failure situations. If the connection between nodes goes down and the router can still be pinged then you can have a split brain situation. To avoid this you will generally have a direct connection between the two nodes (either a null-modem cable or a crossover Ethernet cable), such cables are more reliable than networking which involves a switch or hub. Also the network interface which involves the router in question will ideally also be used as a method of maintaining cluster status - it seems unlikely that two nodes will both be able to ping the router but be unable to send data to each other.

    For best reliability you need to use multiple network interfaces between cluster nodes. One way of doing this is to have a pair of Ethernet ports bonded for providing the service (connected to two switches and pinging a router to determine which switch is best to use). The Heartbeat software supports encrypted data so it should be safe to run it on the same interface as used for providing the service (of course if you provide a service to the public Internet then you want a firewall to prevent machines on the net from trying to attack it).

    Heartbeat also supports using multiple interfaces for maintaining the cluster data, so you can have one network dedicated to cluster operations and the network that is used for providing the service can be a backup network for cluster data. The pingd service allows Heartbeat to place services on nodes that have good connectivity to the net. So you could have multiple nodes that each have one Ethernet port for providing the service and one port as a backup for Heartbeat operations, if pingd indicates that the service port was not functioning correctly then the services would be moved to other nodes.

    If you want to avoid having private Heartbeat data going over the service interface then in the two-node case you need a minimum of two Ethernet ports for Heartbeat and one port for providing the service if you use pingd. If you don't use pingd then you need two bonded ports for providing the service and two ports (either bonded or independently configured in Hertbeat) for Heartbeat giving a total of four ports.

    When there are more than two nodes in the cluster the criteria for cluster membership is that a majority of nodes are connected. This makes split-brain impossible and reduces the need to have reliable Ethernet interfaces. A cluster with three or more nodes could have a single service port and a single private port for Heartbeat, or if you trust the service interface you could do it all on one Ethernet port.

    In summary, three nodes is better than two, but requires more hardware. Five nodes is better than three, but as I wrote in my previous post four nodes is not much good. I recommend against any even number of nodes other than two for the same reason.

    David Welton: Startups and Pronouns

    Aside from Paul Graham's list of reasons not to do a startup on your own (http://www.paulgraham.com/startupmistakes.html), there's another very simple one: pronouns. It's much, much nicer to be able to write "we" on a corporate web site. "We" could be anything from 2 to IBM's zillions, but it implies a real organization, whereas "I" implies some guy off working on his own. Of course, you could lie and write "we", but that will probably catch up with you at an inopportune moment.

    Jordi Mallach: Debian's GNOME 2.18: are we there yet?

    The short answer is no, but as our status page easily reflects, there has been lots of work going on during the last two weeks, once etch's release unblocked the way to upload new versions to unstable. This post intends to resume the trend of updating on the status of GNOME in Debian, after we ended up deciding we'd ship etch with 2.14 for a number of reasons, most notably some complications with the GTK 2.10 transition at that time. You'll be able to find other related news items in Debian GNOME team's website. What has the Debian GNOME team up to during the last 6 months? Our first priority was to focus on unstable's GNOME 2.14 packages again, in an attempt to fix any outstanding remaining bugs from our packaging, and get them in the best shape possible to deliver a polished GNOME desktop for etch. I think the result is really good, and Debian's default GNOME desktop is both very usable and attractive. In parallel, the preparations for a complete set of GNOME 2.16 packages continued in our Subversion repository and kept appearing, little by little, in experimental. The most visible consequence of our 2.16 efforts translated into nobse's backport of 2.16 for etch, which can be found in the corresponding repository. And then, with etch deep frozen and nearly ready to be released, GNOME 2.18 was released, and of course the GNOME team didn't wait too much to start working on it. Our current status is looking good: the Developer Platform is already available in unstable, although buildd's are fighting the builds on various architectures. When the dust settles (GTK 2.10's landing has generated quite a big cloud; we have a list of packages that still haven't completed the GTK+ 2.10 transition), we'll be able to prepare and upload the more complex Desktop components like the panel, nautilus, evolution or control-center. Unstable users should probably be seeing daily progress on this front, so keep an eye on your package managers! Although Debian 4.0 released with an old version of GNOME, vast amounts of time and work have been invested to release it with the necessary backported fixes and enhancements. The newer GNOME versions have been available in Debian official ftp archives in very reasonable timeframes; this has only been possible thanks to the restless efforts of the (fortunately) growing Debian GNOME team members: giskard, feedback, HE, lool, np237, slomo, shaka, sjoerd, xaiki and not forgetting our incredible bug triager, svena. Thanks! On the behind the scenes department, it's a pleasure to report that Lo c Minier and Jordi Mallach very recently joined the GNOME Foundation's board of advisors in representation of the Debian Project, replacing Matthew Garrett, who has been representing us for the last few years until he left the project. Thanks, Matthew!

    17 April 2007

    MJ Ray: Webmastering: How fat is your feed? (2)

    Smigs commented:
    "perhaps the ultimate example of this is the ebay uk announcements feed - the items date back to 2004 and it totals 267.86 kB - so big that the livejournal syndicator refuses to use it at all. I went so far as to contact ebay about it, but they didn't do anything."
    I'm having a little problem getting some money from ebay (which I might write about after I resolve it), so the above comes as no surprise to me. That sounds like the Carlsberg of feeds: probably the fattest feed in the world. Martijn wrote:
    "I think a feed should contain all content the other versions of the page have, it's an alternative (link rel etc.) after all. Imho, parsers should just be made smarter, and drop things they consider to be 'too old'."
    I agree that a feed should be the same content as other versions (or at least the main one of them should... see my site's filtered feeds) but my comment about being too big and too old applies to the non-feed versions too: Recent Changes pages should drop items which aren't recent. I disagree that parsers should drop things that are too old because it would do more harm than good: generally, you can't tell how old an item claims to be until after you've read it; and a lot of publishers have subtly broken clocks (which is why my aggregator uses ordered lists, instead of sorting by timestamps like planet). Related link: Problogger: 34 Reasons Why People Unsubscribe from RSS feeds.

    Gunnar Wolf: Init followup

    First of all, sorry for the delay. Leaving just as the discussion gets started is bad, yes... But I'm only now reading Erich's and Sven's follow-ups. Both (as well as some comments in my blog) ask why not integrating the startup links in each of the packages - Well, basically because I don't think that most maintainers will take care to do this, and we will end up having a situation very close to what we have today: If I'm not interested in supporting your favorite init system in my packages, I just won't bother to make the scripts.
    Note: I'm going into braindump mode. Verbose blabber and some stupidity might follow ;-)
    Think on the webapp scene - Most webapps ship with an Apache-like snippet so that http://yourserver/thisapp just works(tm). I love that, and it's one of the little details that make Debian shine - Things usually work with the least administrator burden possible. But it happens that there are other web servers around there - They just become somehow second class citizens (I happen to sponsor/comaintain Cherokee, for instance), as nobody cares to include the equivalent snippets for them. Apache is the standard, and is good enough.
    The same goes for sysv-rc: It just rules the world. Who will work all the needed patches to support all the different init systems? As the maintainer for a simple package which requires to be started up, I probably won't care to even understand all the intimacies of every init system, at least until they all have a decent user base. But by having one package per (server,init-scheme) pair, any maintainer can come up with the needed initialization.
    Of course, this degrades quickly. First of all, as a user: if mydaemon is not correctly starting up, I will probably file bugs at mydaemon, not at mydaemon-initscheme. If mydaemon changes its parameters, we will witness transition of mydaemon-*.
    Further, remember this is Debian, and volunteer-work has its downsides. If the mydaemon maintainer is a primadonna (or just does not give a flying crap about the runit init scheme), he will just trash reports regarding a nonimportant init scheme. Bad. And, as Erich points out, we have ~1000 packages including /etc/init.d/something - It will mean 3000 or so packages for a decent (not complete!) coverage of the different schemes. And, of course, a very uncoordinated way of working. But back to my line of thought: If I'm promoting an init scheme, I cannot just push it down each maintainer's throat. I must include at least the most important init scripts somewhere. Maybe we could just group daemons by task, and then have -say- a webservers-runit package providing the init scripts for each webserver for runit? This could cut down from 3000 to some 100 packages, most probably team-maintained... But it still faces many scalability problems, and the bug-filled-somewhere-else problem seems unavoidable.
    I think something interesting could come off Sven's idea of providing several independent scripts instead of today's complete init scripts - This would make it easier to adapt startup/shutdown and similar events to different world views, and if not specifically needed, most init scripts could even be autogenerated calling the right bits here and there. That would rock - except in the corner cases (I predict no less than 10% of the packages will become corner cases ;-) ) where it will crumble apart. But maybe if a package declares it should be autostarted and provides the separate bits, the sysv-rc, upstart or runit helper can come up with an autobuilt initscript (or equivalent) - And if it does not work, it can always be overriden by a maintainer- (or user-) supplied, explicitly built script. Humh...
    The topic surely calls for a Debcamp session, as Joachim says in comments in two of our posts and Erich acknowledges. Erich, as the main instigator of this blog series, I hope you can at least join via Ekiga or such, as it can be quite interesting - But, yes, none of the people involved so far participates in any of the inits' maintenance... Anyway, please keep the ideas flowing. I want to sketch something up, as I feel this can be useful - and not only for initscripts, but for many of the areas where Debian provides several ways to do the same thing. And, once again, that's one of the best points of Debian for me.

    Gunnar Wolf: On system init schemes

    I was delighted at finding Erich's series of posts regarding init schemes - In fact, when reading the bottom of your third message I got disappointing at you stating that this concludes this series of blog posts. Maybe someone can follow up with some details on upstart (which seems to be the most promising init replacement)? - I expected you to delve a bit into other schemes, such as file-rc (which is, AFAIK, quite similar to the standard sysv-rc, but instead of having directories with symlinks has files describing each runlevel in similar terms, and I understand works in quite a similar logic to sysv-rc), runit seems to work in a way quite similar to BSD's RC...
    I was particularly interested on your point of view on something like Init NG - And, of course, Upstart sounds sexy, and besides, being Scott's brainchild automatically stamps a must be good legend on it, at least for me. Shame that you didn't follow on with the series - but hey, nobody's paying you to do it ;-)
    Anyway... I was thinking on a way we could get at least Debian maintainers work more easily towards having more than one init scheme for our daemons and such - or at least, shipping less cruft for derived distributions to clean up. Specifically, yes, our most notorious descendant goes Upstart, so /etc/init.d/* becomes crufty for them. So, what if:
    This means, yes, a serious explosion of very small packages. But it also means less dependency on a specific maintainer to be sympathetic to yet-another-init-scheme. If I'm pushing superb-init, which does preemptive reverse dependency tracking and invention and works based on the oh-so-3v1l aptsh, and I'm having a hard time convincing anybody to update their packages to support my init scheme before it matures, I can at least come up with all the needed scripts to get my system usable and considerable for the masses. Sounds decent? Did I smoke too much crack? No, I haven't had my morning coffee yet, so I'll go grab some while this hits the planet.

    John Goerzen: Conferences Suggestions

    At work, we use Linux (and Debian, in specific) for a lot of different things: everything from our phone system (running on Asterisk) to file serving and running some proprietary applications. I'm one of the people that finds, sets up, and maintains these systems, and I write code for our in-house use as well. I like to learn from others, and get to know others that may have things in common with me and with our environment. So going to conferences is a useful thing to do.

    I'm hoping that some reader out there will have a good suggestion for a conference I ought to attend. Here are some that I've looked into and my thoughts on them:



    My leading candidates are probably Usenix and OSCon. I'm interested to hear what people think, especially those that have attended some of these conferences.

    Erich Schubert: Init hacking at Debconf?

    ... I would appreciate that (any *init maintainers going to DebConf?) - but I won't be around. I missed the DebConf sponsorship deadline (which was end of January; since I'm currently devoted to getting my diploma done, I don't have an income, so sponsorship would be good); and even now (they're currently asking for reconfirmation) I don't plan that far ahead. I have no idea what the state of my diploma thesis will be back then in June. Probably not yet stressful, but I just don't know. So I can't commit to DebConf.A pity, I'd really like to go to a DebConf again, the last (and only) one I was at was in Oslo in 2003. I don't think we needed to sign up that early back then; the school building we could sleep in (and use the showers) was fine with me.And of course I'd also love to contribute some swing dancing 'course' to the social dancing event...

    16 April 2007

    Randall Donald: PHP IDE

    Dear Lazyweb,

    The company I work is going through a merger of sorts and the amount of our php development will probably be up. We have our Java environment working pretty good now with Netbeans and subversion in both Linux and Windows so we'd like the same features for php, specifically:

    1) Both Windows and Linux support
    2) Debugging
    3) Not too ugly an UI ;)

    Somehow I figure eclipse may work its way into this but I'm not sure I want that.

    So what recommendations do you have?

    P.S. I'm gonna do some NVIDIA stuff on the weekend if not sooner.

    Jonathan McDowell: In search of a HDTV PVR

    As mentioned in the past I got a new TV this year. It's an LG 32LCD2DB with a native panel resolution of 1366x768. As well as the usual SCART/component inputs it has VGA and HDMI. Currently my homebrew PVR outputs to the TV via a full featured DVB card with onboard MPEG2 decoder, but this limits me to 720x576 output and a basic OSD. My current box is a PIII-800 with a basic onboard SiS graphics chipset, so it's not got the grunt to drive the TV directly itself. I'm thus on the lookout for an upgrade. Let's start with my constraints. I have a Silverstone LC-02 case. I'd previously planned to upgrade to something bigger, but the discovery that LinITX can provide a variety of riser cards to suit PCI-E/PCI as needed means I don't have to. The LC-02 will take a MicroATX board and provide me with 2 slots, one of which is taken up by the PCI DVB card. This box lives in my living room, so it needs to be quiet - the current incarnation is a bit too loud but I believe that's mainly due to using a standard heatsink+fan assembly, so I'm hoping that something specifically designed to be quiet will be better. An lirc dongle and wireless keyboard/mouse are already sorted. I'd like to expand the use of the PVR to be a more general PC as well; up until now it's just been a PVR, but being able to check email/IRC would be nice, as would the ability to play games. Up until now I've run VDR, which takes full advantage of the MPEG2 decoder, but I'd like to give MythTV a decent try. All of this points to wanting more than just a HD hardware MPEG2/MPEG4 decoder. First lets start with the graphics chipset options. The contenders seem to be ATI, Intel, nVidia and Via. From my reading ATI lack any form of XvMC support in both their Free and binary blob drivers, so we can discount them. nVidia have support, but only in their binary drivers. The Nouveau project have support on their TODO list, but I can't see any sign of it yet. I'd really rather avoid non-free drivers, so that leaves us with just Intel and Via. I really like the look of the Intel G965/X3000. They've opened up their driver development and it seems to be quite active from reading the Xorg mailing lists. However they don't have any XvMC support; Keith Packard on the xorg list in February says "For media purposes, the current drivers aren't taking full advantage of the hardware yet", though later on does say "XvMC is on several of our lists; I don't know when someone will pick it up and implement it". Unfortunately I get the feeling it's not a high priority; I've seen/heard several comments about the fact that any processor that'll get hooked up to this chipset will be more than fast enough to cope without the assistance. That may be true, but I don't want my CPU to be spending all its time trying to decode MPEG2 or MPEG4 at 1920x1080i while the GPU sits mostly unused. I'd much rather the GPU was used to the full giving me spare CPU cycles, or perhaps the ability to clock it a bit slower for common use cases, reducing power and heat. I'm keeping Intel on my list because I hope they do get round to proper support sooner rather than later. They've also talked about the fact the GPU is programmable which would make it perfectly possible to add MPEG4 acceleration to the chipset; that would be pretty sweet. It's a bit odd to end up with Via on the list. I mainly think of them as associated with MiniITX boards, but they do also produce various motherboards for Intel/AMD CPUs with integrated graphics. They managed to shoot themselves in the foot for a period of time by limiting the maximum accelerated resolution to 1024x1024, but recently they've released the CX700M /P4M900 chipsets which appear to do 2048x2048. The OpenChrome project have these up and running to a basic level from what I can tell, but work on XvMC support appears to be progressing with various patches and reports flying about on the list. So currently it looks like Via has the best option (albeit through the Free software community, rather than a concerted effort on their part), while Intel has something that could be very appealing if the driver was more complete. The other factor is the CPU. 3 contenders this time; AMD Intel and Via. My current PIII-800 is rated at 20.8W TDP. Modern processors are in general a lot hotter, but I need to keep in mind that I'm looking for a quiet machine, and that the case doesn't have a huge amount of room for big cooling systems. AMD's dual core chips all start at 89W or more, though some of their single core lower end CPUs are more like 67W. Of course the Intel graphics won't work with it and I'm not 100% sure Via has a suitable Athlon chipset at present either (the 2 I found were for Intel/Via). Intel's P4 offerings aren't much better for power consumption, with many of the highest end chips being over 100W. Core 2 Duo looks promising; 65W, so more than the current CPU, but a lot more grunt. Via come out tops here; 20W for their 2GHz top end processor. However this is only single core and compares poorly to the equivalent clock speed of Core 2 Duo. A MiniITX board with a 2GHz C7 and a CX700M would probably make a fine PVR, but I'm not convinced about there being enough grunt for anything else. The Via chipsets appear to have more active in-progress support for media acceleration, which suggests a P4M900 + Core 2 Duo. That's contrasted with what looks to be the more powerful X3000, that actually has a manufacturer who seems to want to get full Free support out there. I'm probably a couple of months off actually making a decision; partly because I want to watch how it all plays out in the hope that the Intel chipset will get some more support, or that the Via chipset will be proven to be reliable in operation. And assuming I do make a video chipset/CPU decision I then get the joys of trying to find a motherboard with DVI + SP/DIF. I know the G965 can do DVI out with an ADD2 card in the PCI-E slot, but I don't know if the P4M900 supports the same thing. I can't see an Intel MicroATX 965 board with SP/DIF out - there's an HD audio header, but this doesn't seem to be a direct mapping. Can I get a converter?

    Alastair McKinstry: Measuring Power Consumption

    Following a previous thread on Planet Debian (allowing for kids delaying projects, as usual), I borrowed a power meter to see what the consumption of various computers and electronics around the house was. An interesting and worthwhile exercise. Computers My main gateway system (hosting this blog, mail, etc. on a static IP) is a Pegasos PowerPC; it is on 24 x 7, and pulls approx. 60W. Other computers around the house include a Dell 2.5 GHz P4, which is my main development machine (with multiple disks, etc. onboard) pulling 72W. Downstairs, for family use we have an Intel MacMini pulling approx. 30W. Peripherals add up: on the Pegasos there is an ADSL router and a Linksys Wifi router, pulling approx. 5 W each continuously, and a UPS which consumes around 10W (I'm not sure if this is continuous, or high because its recharging a battery which was drained by pulling power plugs to measure the power usage ...). The LCD monitor upstairs (used by Pegasos and Dell) draws 20W. If I was purchasing again, I'd get a MacMini for the gateway. The current setup costs, I estimate, 7.50 Euro /month, which is probably worth it to have a 24x7 server (I'm not sure if moving to a hosting facility would be worth it, as it has advantages for running bittorrent, etc. that a remote server wouldn't, as well as being able to host content without the legal threat that a hosted server would have: with the current setup, if anyone challenges the content of stuff on my server, my ISP is not legally involved (as I host it), and hence won't (or shouldn't) pull the plug. This is worth something to me, even if I don't spend my days in court defending libel actions). One surprise was the CRT monitor used with the MacMini draws 10W when powered off, not on standby. Turn it off at the mains switch rather than the monitor button. Wall warts (chargers, etc.) draw around 1-2W due to eddies when nothing is connected. Conclusions: Swapping the Pegasos and MacMini are not an option as the family prefer the convenience of the fast start-up OS X. (This has made me think fast booting and suspend-to-disk are good priority goals for Debian.) I might however replace the Pegasos with an old pentium-class laptop, which would, at 25W, drop 40-50W as I would no longer need the UPS for 24x7 use. Put all peripherals, wall warts, etc. on a separate power strip that can be easily turned off together when not in use. TV We have a TV with the growing set of set-top-boxes: a DVD Player, Satellite unit and VCR, along with a SCART switch to connect them all together. Between them, they pull 86W. With the TV turned off, the boxes draw 20W. (TV pulls 10W on standby). I've been looking at getting an "Intelligent" mains lead, which cuts the power to the peripherals when the main item (e.g. the TV) is powered down, either totally or on standby. At nearly 40 Euro, however, it will take over a year to pay for itself. The alternative is just turning them off by hand, but of course as in most houses, the main switch is buried behind the TV cabinet out of reach. I'll swap the power strip with one with a single main switch that can be reached easily at the end of the evening instead. Other Big Users The house was designed with energy-efficiency in mind, and theres not much scope for savings elsewhere. The main users are underfloor electric heating, water heating, washing machine and dryer (condensor type). The water heating we hope to replace / augment with Solar over the summer; ditto the drier, with an outdoor shed /gazebo for drying clothes in the rainy Galway days. While the drier consumes a lot of electricity, at least the hot air is recycled via a heat-exchanger to heat the house in winter when its most used. Its worth keeping an eye on the drier and washing machine, though. We mostly use these at night, using cheaper Night-rate electricity, so while our usage patterns may not change, keep an eye on the energy consumption of these devices: as they grow old the bearings, motor, etc. begin to wear and energy consumption goes up. Look out for when to replace them. The other big niggle I have is a light fitting in the main living room. This is expensive, with 3 x 60 W spotlight bulbs in it. The kitchen, which is approx. half the size of the living room, gets lit by a single 20 W CFL. Swapping the spotlights with CFLs is not an option, and replacing it means replacing a ceiling mounted fitting: as the wires are embedded in the ceiling, moving it is not trivial. Any recommendations ?

    15 April 2007

    Russell Coker: failure probability and clusters

    When running a high-availability cluster of two nodes it will generally be configured such that if one node fails then the other runs. Some common operation (such as accessing a shared storage device or pinging a router) will be used by the surviving node to determine that the other node is dead and that it's not merely a networking problem. Therefore if you lose one node then the system keeps operating until you lose another.

    When you run a three-node cluster the general configuration is that a majority of nodes is required. So if the cluster is partitioned then one node on it's own will shut down all services while two nodes that can talk to each other will continue operating as normal. This means that to lose the cluster you need to lose all inter-node communication or have two nodes fail.

    If the probability of a node surviving for the time interval required to repair a node that's already died is N (where N is a number between 0 and 1 - 1 means 100% chance of success and 0 means it is certain to fail) then for a two node cluster the probability of the second node surviving long enough for a dead node to be fixed is N. For a three node cluster the probability that both the surviving two nodes will survive is N^2. This is significantly less, therefore a three node cluster is more likely to experience a critical second failure than a two node cluster.

    For a four node cluster you need three active nodes to have quorum. Therefore the probability that a second node won't fail is N^3 - even worse again!

    For a five node cluster you can lose two nodes without losing the cluster. If you have already lost a node the probability that you won't lose another two is N^4+(1-N)*N^3*4. As long as N is greater than 0.8 the probability of keeping three nodes out of four is greater than the probability of a single node not failing.

    To see the probabilities of four and five node clusters experiencing a catastrophic failure after one node has died run the following shell script for different values of N (0.9 and 0.99 are reasonable values to try). You might hope that the probability of a second node remaining online while the first node is being repaired is significantly higher than 0.9, however when you consider that the first node's failure might have been partially caused by the ambient temperature, power supply problems, vibration, or other factors that affect multiple nodes I don't think it's impossible for the probability to be as low as 0.9.
    echo $N^4+\(1-$N\)*$N^3*4 bc -l ; echo $N^3   bc -l
    So it seems that if reliability is your aim in having a cluster then your options are two nodes (if you can be certain of avoiding split-brain) or five nodes. Six nodes is not a good option as the probability of losing three nodes out of six is greater than the probability of losing three nodes out of five. Seven and nine node clusters would also be reasonable options.

    But it's not surprising that a google search for "five node" cluster high-availability gives about 1/10 the number of results as a search for "four node" cluster high-availability. Most people in the computer industry like powers of two more than they like maths.

    Christian Perrier: Back on shadow

    Today, Nicolas "nekral" Fran ois and I spent some time on the remaining issues of the shadow package. As the package is part of the base system, it was frozen for a while now. Thankfully for us, our upstream was nearly inactive in the meantime (no new version) and the issues reported in the BTS in the meantime were pretty minor (indeed, several of them are unreproducible, often errors in users' PAM settings). So, now we're back on duty to make the bug count for that package down to 0 (there are 17 opened bugs as of now). Our upstream seem to come back to life so we will probably do our best to lower the size of the Debian diff.gz file which raised again in the last months of the sarge->etch release cycle.

    Daniel Burrows: How *not* to impress your customers.

    So, today I tried to sign up for a service online (unidentified for reasons that will become obvious briefly). This is a service that, had I successfully signed up, would be withdrawing monthly subscription fees from my bank account and handling some data that's fairly important to me. But when I hit the button to start the registration process, I got back...


    [TCX][MyODBC]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''7GDiSp=E8-Mgvgo\', Now() )' at line 9

    SQL = "INSERT INTO [REDACTED] ([REDACTED], FieldName, FieldValue, update_dt ) VALUES ( 10724, 'PASSWORD', '7GDiSp=E8-Mgvgo\', Now() )"


    The password I tried to enter, for the record, was 7GDiSp=E8-Mgvgo\#dEwb8m7Ec_e~z0myAAj. This is at best inexcusable sloppiness and at worst a security hole, and I don't want a company that does either anywhere near my money and data. (sadly, there probably are already many such companies near my money and data, but I try to avoid the ones I know about)

    Kai Hendry: Opensource Web applications

    olpc web browser pointing to Webconverger Whilst downloading, installing and running Debian packages is easy, fun and “free”, most Web applications aren’t. I can’t be the only one that thinks there is a problem somewhere as for example, where are the all the Web applications listed on Freshmeat? I have an idea for a Web application though I thought it would be cool to make it as Free software though it can be a pain. I think there is a few more “barriers to entry” problems running a Web application as a free software project. Web hosting is generally quite poor and a lot of the Web centric deployment/packaging tools aren’t up to scratch. Though there are a couple of amazing examples of “open source” Web sites, like the stuff My Society do. Nonetheless I would like to see Debian as an even better Web application platform.

    Kai Hendry: Opensource Web services

    olpc web browser pointing to Webconverger Whilst downloading, installing and running Debian packages is easy, fun and “free”, most Web application services aren’t. I can’t be the only one that thinks there is a problem somewhere as for example, where are the all the free software Web services listed on Freshmeat? I have an idea for a Web application though I thought it would be cool to make it as Free software though it can be a pain.
    1. Getting a reliable host
    2. Host has to be Debian and probably unstable to get the bleeding edge stuff :)
    3. You probably want to have root, hence dedicated
    4. It is probably expensive and you might have to watch bandwidth
    5. You have to create accounts, where your colleagues also want root.
    6. You could use sudo though you’ll probably get frustrated with it and end up with “ALL = NOPASSWD: ALL” and no one checks the logs ;)
    7. You’re probably want Xen and a few IPs
    8. Since Web application packaging with current tools is near impossible with all the different httpds and DBMSes, you’ll probably have to use some odd hand crafted setup.
    9. You will probably want a DBA sooner or later, to figure WTF is going on with your DBMS ;)
    10. You’ll probably end up with a several step build&deployment process (that’s bad)
    11. Testing (if you ever get that far) will probably be a kludge
    12. To lower the barrier of entry, you will probably go for PHP which is great to deploy. Scary to secure.
    13. Though non-PHP avenues will probably require FastCGI. And FastCGI on Apache last time I checked is PAIN.
    14. Your developers probably can’t run the Web application locally as it such a pain to setup (esp. forget offline)
    15. You might have some “privacy policy” that makes sharing log or database data difficult amongst developers.
    16. Your Web application will probably need mail server access and all the pain that comes with that.
    17. Your application will have to deal with difficult abuse problems like spam that ordinary applications don’t usually deal with.
    18. If your project’s site becomes popular you’ll have a ton of maintenance and scalability head aches that will probably require money to be thrown at the problem.
    19. Someone will think your Web design stinks. Then if you use some “designer”, he creates some awful XHTML template and some fixed px style sheet with images replacing text. ;)
    I think there is a few more “barriers to entry” problems running a Web application service as a free software project. Web hosting is generally quite poor and a lot of the Web centric deployment/packaging tools aren’t up to scratch. Though there are a couple of amazing examples of “open source” Web services, like the stuff My Society do. Any other good examples? Nonetheless I would like to see Debian serve as an even better Web application platform. Update: I think “services” makes more sense than “application” in this context… I hope you’ll agree.

    Next.

    Previous.