Beware of trying to compare the size of subtrees with du

One of the things I like to do to understand space usage is to use du to look at both the aggregate usage of a directory tree and abreakdown of where the space is going (often with the handy -h optionsto GNU du and sort ). This is also somethingyou may wind up doing if you want to compare the disk space usage oftwo versions of a directory tree and its subtrees (for example, thedisk space usage in / for two systems). However, there is a somewhat


Go generics: the question of types made from generic types and type sets

In yesterday's entry on the 'any' confusion in Go generics , I brought up the fact that youcan't create types (or variables of types) using generic typesthat are instantiated with type sets. That sounds abstract, solet's make it concrete:

type Result[T any] []T
type Toable[T any] interface {  Fred(s string) T  Bar(i int) T}type Addable interface {  ~uint32 | ~float64}/

The 'any' confusion in Go generics between type constraints and interfaces

Any system of generic types, such as Go will have in Go 1.18, needssome way to specify constraints on the specific types that genericcode can take. Go uses what it calls "type sets" ,which reuse Go's existing interface types with some extensions.However, this reuse creates a potential for confusion, one thatI've already seen come up in some articles about Go generics suchas this one ( via ).

Suppose that you have some generic types and code (and


Some things on strict and relaxed DKIM alignment in DMARC

To simplify, DMARC primarily works by verifyingthat messages have a DKIM signaturethat matches their From: domain. There are two modes for thismatching .In 'strict DKIM identifier alignment', the From: domain and theDKIM domain must match exactly; if you send with a From: ofnews.example.com, only a DKIM signature from news.example.com willmatch (other DKIM signatures may be present but will be ignored byDMARC). In 'relaxed DKIM identifier alignment', which is


Notes on using DKIM in a DMARC world

By itself, DKIM simplycreates an attestation that some domain (or host) has touched anemail message, in the form of a DKIM signature that names thatdomain (really a DNS name) in its ' d= ' parameter. If you have anemail server that handles (outgoing) email for a bunch of host anddomain names, and you think of yourself as primarily one of them,say, 'cs.toronto.edu' , then youcan have your email server generate DKIM signatures using this


ZFS performance and modern solid state disk systems

In a ZFS discussion on lobste.rs I said ( in part ):

A certain amount of ZFS’s nominal performance issues are because ZFSdoes more random IOs (and from more drives) than other filesystemsdo. A lot of the stories about these performance issues date fromthe days when hard drives were dominant, with their very low IOPSfigures. I don’t think anyone has done real performance studies inthese days of SSDs and especially NVMe drives, but naively I wouldexpect the relative ZFS performance to


Some SSD write volumes from my machines

A while back I read Russell Coker's SSD Endurance (via PlanetDebian ), which got me curious abouthow much data I had written to my own SSDs (and then led to thediscovery of things like odd values for the SMART 'power on hours'attribute ). So here is some datadrawn from an assortment of machines.

My home desktop has a pair of Crucial MX 750sthat have been powered on for 43,550 hours or almost five years,which is


What does it mean for a filesystem to perform well on modern hardware?

Once upon a time, back in the days of spinning rust, whether or not youwere getting good filesystem performance was sort of a straightforwardquestion. Disks were slow and couldn't do very many seeks per second, soyou could assess the performance of a filesystem by how close it got youto the raw disk read and write speed for sequential IO, or the raw diskseek limits for random IO. These days 'SSDs' (which is to say SATA andSAS SSDs) and especially NVMe drives have


Checking out a Git branch further back than the head

Famously, if you want to check out a repository at some arbitrary commitback from the head of your current branch, you normally do this withjust ' git checkout '. I do this periodically when making bugreports in order to verify that one specific commit is definitely theproblem. Equally famously, this puts you into what Git calls a 'detachedHEAD' state, where Git doesn't know what branch you're on even if thecommit is part of a branch, or even part


Go 1.18 won't have a 'constraints' package of generics helpers

If you read a number of writeups of the Go's new support for generics,which is expected to be in Go 1.18, you'll find them mentioning a constraints package in the standard library (for example, Genericsin Go ). The constraints packageis there to give people a pre-defined set of names for various typeconstraints, like 'only integer types'. Go itself defines two builtin constraints, ' any ' (which allows anything) and ' comparable '(which