A cheap caching trick with a preforking server in Python

When the load here climbs, DWiki (the software behind this blog) transmogrifies itself into an SCGI based preforking server . I'm always lookingfor cheap ways to speed DWiki up for Slashdot style load surges (however unlikely it is that I'll everneed such tuning), and it recently occurred to me that there was anobvious way to exploit a preforking server: cache rendered pages inmemory in each preforked process . Well, not even rendered pages; thesimplest way to implement this is to cache your


Mouse scroll wheels versus buttons that you actually want to use

I've written before that I don'twant a mouse where the middle button is a scroll wheel. At the time Iwas brief about why, but today I'm going to expand on that and explainwhy you can't combine the two functions in something where both work aswell as they would independently. In short: if you have a scroll wheelthat is also a mouse button, using one or the other necessarily has tokind of suck.

The core problem is one of activation pressure


Google Groups fails both anti-spam and basic mailing list management

Back in September I wrote about a spammer who wasusing Google Groups to send out their spam. Google Groups let them addone of my addresses to a very large list and then was perfectly happyto be used to broadcast their spam messages through the list.Well. Guess what. The spam is still happening; generally two messagesa day, or at least two delivery attempts a day. This is what you couldpolitely call a total failure on Google's part from two perspectives,because none of these delivery


My Liferea crashes are not Liferea's fault

Back in Fedora15VsMe I said bad things about the current version ofLiferea, especially that it was crash-prone. I have been trying to debugthese crashes ever since they started, and I now believe that this isnot Liferea's fault; instead it is a bug in the underlying GLib IOlibrary that it is using. For the benefit of anyone else hitting thiswho is doing Internet searches, I will describe the crash and the bug.

All of my crashes have been directly ing_


A classic and standard C quoting bug

I recently read Evan Martin's entry on quoting and escaping , whichbrought to mind one of those classic C and Unix programming mistakeswhich hopefully is not done very much any more.

Suppose that ustr is a string that comes from user input. The classicform of this particular quoting bug is to write printf(ustr) (orperhaps fprintf(out, ustr) ); a much obvious version of this is syslog(pri, ustr) .

(Some people might think that the printf() version is


The drawback of modern X font handling

In some ways, font handling in modern versions of X is quite nice. Wehave a decent number of good, high quality fonts in modern scalableformats like TrueType, and one can use fonts from Windows and MacOS X if one wants to. Thanks to various reforms in font handling,specifying fonts is generally easier and more flexible (handsup everyone who ever tried to generate or read an XLFD string for aparticular font), and you can install personal fonts without hugecontortions. But it does have one

Fedora 15 xterm
Continue reading...

Solaris is not an enterprise operating system

Why I say this is best explained as a two-part quiz. The firstquestion: supposing that you are developing an operating system,when do you bring iSCSI disks online during boot?

  1. before bringing up ZFS pools and mounting all non-system filesystems.
  2. after bringing up ZFS pools and so on.
  3. while bringing up ZFS pools and so on, so that the two activitiescan race with each other in case you have ZFS pools on iSCSI disks .

Supposing that your original answer to this question was #1 and


A scroll wheel experiment

On the one hand, I am firmly a fan of threebutton mice where the middle button is a real button, not a scrollwheel. On the other hand, I'm becoming increasingly convinced thathaving a scroll wheel is useful (partly because my laptop has one aspart of the trackpad). In order to reconcile these competing desires,I've decided to experiment with a hack.

(In an ideal world, the solution would be a three button mousewith a scroll wheel on the side,


A confession about our ZFS configuration

When we initially set up our ZFS based fileservers , we didn't know all of the things about diskwrite caches on our iSCSI backends that we now know. Plus, we read all of that stuff about 'ZFS deals withlife even if your disks aren't really trustworthy' and we believedit. Thus we assumed that everything was fine; our iSCSI backends weren't doing any caching, and even ifsomething had gone wrong and they were ZFS was supposed to cope withit. We were wrong


Thinking about how to test our UPSes

In light of my confession about our handling of ZFS disk sync , one of the vital things inour environment is working UPSes for the iSCSI backend disks.Without UPSes a building power failure would cause both sides of amirror to lose power simultaneously, which removes our protectionagainst losing in flight ZFS uberblock and metadata writes.

Now, one of the problems with UPSes is that their batteries eventuallywear out. Often you get no advance warning about this having happened;you only find out when you lose main power and the