a word of thanks for those who work instead of rant (or, do as ESR says, not as ESR does)

[T]o get attention from us, it is necessary to demonstrate the kind of attitude that leads to competence — alert, thoughtful, observant, willing to be an active partner in developing a solution.–Eric S. Raymond, How To Ask Questions The Smart Way

Like a lot of what ESR used to write, this is remarkably good advice- clearly written, straightforward, and demonstrating a lot of insight into how functional software communities work. Thankfully, lots of people still do as ESR says, not as ESR does. Here is a brief story about one such exchange.

In his recent infamous letter, ESR complained about yum’s performance. Not unreasonable; yum is slow. But we know that ESR is supposedly an expert hacker, and an expert in asking questions. So surely if he’d really meant to get the problem fixed and followed his own advice, his post could have looked something like this:

A bit more on yum performance.

“yum -C search foo” makes 1,536,713 system calls. Even though they’re almost all under a millisecond, that really adds up. You could rewrite it in straight assembler, and it would still be slow. Don’t blame Python, and don’t waste your time rewriting it in C until you figure out what the real cause is.

“apt-cache search foo” makes 1,254 system calls. The only one that takes over a millisecond is the call that reads all 7MB of srcpkgcache.bin. 8ms for that.

yum makes 372,776 reads, 372,115 lseeks, and 474,956 futex calls. apt-cache makes 912 reads and 23 seeks. And remember, apt-cache is dealing with 10x as many packages!

All praise strace.

It turns out that when you follow ESR’s advice write something useful and data-laden like this, instead of a publicity-seeking rant, then you get responses that look something like this:

So, after this dialogue Patrick contacted me offlist with some extremely helpful debug information and some code samples to help optimize a number of things.

Not the least of which is the above search method.

For a search of the word ‘foo’ the search went from taking 30s to taking 2s.

It’s a pretty massive improvement and I appreciate the guidance.

It is obviously sort of sad that it took ESR whining so loudly and publicly to encourage someone to do decent profiling work on a key piece of infrastructure; but all it took to get it fixed was one person who stopped whining and instead did the nitty-gritty work of profiling with a widely available tool. The outcome: a faster yum, and a great example of providing useful information and constructive guidance instead of whining.

So here is a great big thanks to all those people who quietly and often without reward do the real work of putting together our software, one email thread at a time. Those are the people who should be getting publicity and our attention, not the losers. Thanks, Patrick, Seth, and everyone else like you guys. May you too someday end up on lwn and /. ;)

(mild tangent, from looking at the jargon file for the first time in ages: how did things from little green footballs make their way into the jargon file? Stole my cultural heritage indeed.)

19 thoughts on “a word of thanks for those who work instead of rant (or, do as ESR says, not as ESR does)”

  1. […] Luis Villa in un post pieno di frecciate indirizzate ad ESR, segnala che questo messaggio sarebbe stato la maniera corretta di porre il problema, seguendo proprio le linee guida scritte da ESR su come scrivere “domande intelligenti” e che con premesse più propositive si ottengono risultati come questo: For a search of the word ‘foo’ the search went from taking 30s to taking 2s. […]

  2. I think you are giving Seth Vidal (yum maintainer) too much credit.

    Yum has been slow and bad pretty much forever and Seth has been defensive to the point of being quite aggressive about it also pretty much forever.

    He is also not a very good programmer — why didn’t he run strace himself? Why did he snub off Patrick so? Why didn’t he apologize loudly afterwards?

    That a critical component such as yum has /stayed/ in the hands of some one like Seth Vidal and that improvements pretty much have to be forced upon him shows that Red Hat/Fedora *does* have a problem it doesn’t want to fix.

  3. Peter land,

    If you are such a better programmer, where are your patches to make yum performance better? It is easy to be a arm chair critic and bash the people doing the work.

    Try doing a better job yourself and we shall then speak

  4. It’s Lund, John. Lund.

    What you are asking is a bit like asking me to cast better votes for the US presidency just because I say there are reasons to be less than pleased with the current holder of the job.

    Even if I became a naturalized citizen, I would still only have one vote. If I stay out of Florida and Ohio, that is.

    Much easier to stay in my current country.

    If you had followed along you would have seen that yum has been a performance disaster for years and that Seth Vidal has not exactly had a history of welcoming help.

    A similar situation in the open source world is the suspend/resume problems with Linux, a lot of which stems from the fact that Linus Torvalds appointed as lieutenant for that area a Czech who almost couldn’t code (yes, really!) when he got the job. A handful of competent people have tried over the years to fix the situation but as long as the Czech’s bad code goes in unhindered and he is the gatekeeper for the good code, things tend to improve rather slowly. Linus himself and Ingo Molnar seems to have given it about a week’s time each in the last year which did improve things but I’m afraid we shall have to wait until Ingo has the time to fix the problem properly.

    Yum would likely have improved faster if Seth Vidal had just orphaned it. Or Red Hat would have switched completely to apt (wrapped around rpm instead of dpkg), which would probably have been an even better outcome.

  5. Besides, I have actually contributed to a package manager/installer (autopackage).

    Try programming in the large in the Posix shell some day :)

  6. lund alias w.e

    “What you are asking is a bit like asking me to cast better votes for the US presidency just because I say there are reasons to be less than pleased with the current holder of the job.”

    No. I am asking you to put up or shut up. Fedora didnt use apt for well documented reasons.


  7. […] Apr�s toutes ces critiques sur les performances de yum (que je seconde vivement), je suis �tonn� que personne n’aie r�pliqu� qu’on pouvait s’attendre � de grandes am�liorations prochainement. Suite au lancer de troll d’ESR, un bonhomme a fait une analyse des performances de yum et en a corrig� plusieurs d�fauts. Il dit qu’une recherche sur un paquet est pass� de 30 secondes �… 2 secondes. Plus d’infos sur le blog de Luis Villa : http://tieguy.org/blog/2007/02/25/a-word-of-thanks-for-those(…) […]

Comments are closed.