How ZFS's version of RAID-5 can be better than normal RAID-5
ZFS's 'raidz' and 'raidz2' storage methods are single and dual parity,but they are not exactly the same as normal RAID-5 and RAID-6. Thedifference is in how each handles partial stripe writes, such as whathappens when you write only a small amount to disk.
In a conventional RAID implementation, a partial write to a stripe alsohas to update the parity, which means additional disk IO (at least adisk read and a disk write). Even if this
Speed surprises in reimplementing the .find() string method
In yesterday's entry , I mentioned that Iwas surprised by the relative performances of my three reimplementationsof the .find() string method.
The src[i:].startswith(sub) version was the slowest, and why isobvious in hindsight: it's summed up clearly in the first bit, where wecreate a big new string ( src[i:] ) on every iteration of the loop. Nowonder it's slow; creating big strings is slow in general, because
An illustration of the speed advantage of Python builtins
As a followup to my entry on the two sorts of languages , I decided to actually tryimplementing the string .find() method in Python to see how muchslower it is. The Python version uses the brute force C style approach,roughly:
for i in range(0, len(src)-len(sub)+1): if src[i:i+len(sub)] == sub: return ireturn -1
I actually did three versions, each with a different
My likely Firefox 3 extensions
My current personal version of Firefox is more than a little bit behindthe times, so I've been looking at upgrading to Firefox 3 (I compilemy own version with various hacks, and it's easiest to build from thebleeding edge CVS sources). As a result, I spent part of today tryingvarious of my essential extensions to see which ofthem still work.
Here's the current state of affairs:
- NoScript has beenupdated for the current Firefox 3 beta and works fine. It'
Two sorts of languages
Here is a thesis:
There are two sorts of languages: languages where writing your own codeis (usually) almost as fast as using the builtin features, and languageswhere the builtins are an order of magnitude faster than doing the samework in your own code.
C is an example of the first sort of language; it is merely silly, notlaughably absurd, to reimplement your own version of strchr() . Pythonis an example of the second sort of language; it's utterly stupid towrite
Something that I do not understand
Here is something that I do not understand: why is it always that theoldest and most clapped-out set of displays that you have is always tobe found in the machine room, barely working at the best of time?
Yes, I can see the surface logic; machine room displays are probablyyour least used displays and they spend a great deal of time doingnothing. But every so often you have a crisis and then you really needthem to work, because in a crisis the last thing you have
The best way to shroud IP addresses
I wrote before about the limitations of hashes as privacy protectors , which leaves us with a notentirely theoretical question: suppose that you have to create atraffic accounting system, but you don't want to keep too much logs . What's the best way to protect user privacy in thissituation?
Our answer is to drop the first octet of the IP address. This givesmuch better privacy protection than dropping the last octet or eventhe last two octets, because it cuts against how IP address space isorganized
An idea: only use URL fragments as an implementation detail
There are a number of awkward things about URL fragments, including thatthey commit you to a certain implementation of your page structure ifyou are going to provide cool URLs . At the same time,I believe that they're the only way to make a reference to a part of apage, so they're pretty essential if you want to aggregate informationon a page but still be able to point to specific bits.
For example, WanderingThoughts uses URL fragments to point to thecomments on a specific entry and
Where the risk is with virtualization (and iSCSI)
Both virtualization and iSCSI are fundamentally 'sharing' technologies,where multiple things use a shared infrastructure. This means that theyhave a shared set of general security risks, pretty much common to anysharing technologies: cross-contamination and base system compromise.
Cross contamination is the ability to interfere with other things usingthe shared environment and to compromise them in turn; having a sharedinfrastructure necessarily gives you a channel to attack other thingsthat are using that infrastructure. This isn't novel, but virtualizationand iSCSI make it
Why I am not fond of Ubuntu's management of kernel updates
It's really simple: we installed the latest Ubuntu 6.06 kernel updatelast night, since it's a security fix. Today, our machines startedpanicing with 'kernel BUG at fs/nfs/inode.c:174' messages (threemachines so far, one of them three times), so we wanted to revertback to the old kernel.
Guess what: it wasn't there any more. Apparently Ubuntu feels freeto have (some) kernel updates overwrite your