Maybe we should explicitly schedule rebooting our fleet every so often
We just got through a downtimewhere we rebooted basically everything in our fleet, includingthings like firewalls. Doing such a reboot around this time of yearis somewhat of a tradition for us, since we have the university'swinter break coming up and in the past some of our machines havehad problems that seem to have been related to being up for 'toolong'.
Generally we don't like to reboot our machines, because it'sdisruptive to our users. We're in an unusual
Unix's buffered IO in assembly and in C
Recently on the Fediverse, I said something related to Unix'spre-V7 situation with buffered IO :
(I think the V1 approach is right for an assembly based minimal OS,while the stdio approach kind of wants malloc() and friends.)
The V1 approach, as documented in its putc.3 and getw.3 manual pages, is that the caller to the buffered IO routines suppliesthe data area used for buffering, and the library functions merelyinitialize it
PCIe cards we use and have used in our servers
In a comment on my entry on how common (desktop) motherboards aresupporting more M.2 NVMe slots but fewer PCIe cards , jmassey was curious aboutwhat PCIe cards we needed and used. This is a good and interestingquestion, especially since some number of our 'servers' are actuallybuilt using desktop motherboards for various reasons (for example,a certain number of the GPU nodes in our SLURM cluster , and some of our older compute servers, which weput together ourselves using early generation AMD Threadrippers anddesktop
Common motherboards are supporting more and more M.2 NVMe drive slots
Back at the start of 2020, I wondered if common (x86 desktop)motherboards would ever have very many M.2 NVMe drive slots , where by 'very many' I meant four orso, which even back then was a common number of SATA ports fordesktop motherboards to provide. At the time I thought the answerwas probably no. As I recently discovered from investigating arelated issue , I was wrong, and it's nowfairly straightforward to find x86 desktop
Buffered IO in Unix before V7 introduced stdio
I recently read Julia Evans' Why pipes sometimes get "stuck":buffering .Part of the reason is that almost every Unix program does someamount of buffering for what it prints (or writes) to standardoutput and standard error. For C programs, this buffering is builtinto the standard library, specifically into stdio , which includesfamiliar functions like printf() . Stdio is one of the many thingsthat appeared first in Research Unix V7 .This might leave you wondering if this sort of IO was buffered
Sorting out 'PCIe bifurcation' and how it interacts with NVMe drives
Suppose, not hypothetically, that you're switching from one mirroredset of M.2 NVMe drives to anothermirrored set of M.2 NVMe drives, and so would like to have threeor four NVMe drives in your desktop at the same time. Sadly, you already have one of your two NVMedrives on a PCIe card , so you'd liketo get a single PCIe card that handles two or more NVMe drives. Ifyou look around today, you'll find two sorts of cards for
The modern world of server serial ports, BMCs, and IPMI Serial over LAN
Once upon a time, life was relatively simple in the x86 world. Mostx86 compatible PCs theoretically had one or two UART s,which were called COM1 and COM2 by MS-DOS and Windows, ttyS0 andttyS1 by Linux, 'ttyu0' and 'ttyu1' by FreeBSD, and so on, basedon standard x86 IO port addresses for them . Servers hada physical serial port on the back and wired the connector to COM1(some servers
Good union types in Go would probably need types without a zero value
One of the classical big reason to want union types in Go is so that one canimplement the general pattern of an option type , in order to forcepeople to deal explicitly with null values. Except this is not quitetrue on both sides. The compiler can enforce null value checksbefore use already , and union and optiontypes by themselves don't fully protect you against null values.Much like people ignore error returns (and the Go compiler allowsthis), people can skip over that they can't
Union types ('enum types') would be complicated in Go
Every so often, people wish that Go had enough features to buildsome equivalent of Rust's Result type or Option type , oftenso that Go programmers could have more ergonomic error handling.One core requirement for this is what Rust calls an Enum andwhat is broadly known as a Union type . Unfortunately, doing areal enum or union type in Go is not particularly simple, and itdefinitely requires significant support by the Go compiler and theruntime.
At one level we easily do something that looks like a Result
Using systemd-run to limit something's memory usage in cgroups v2
Once upon a time I wrote an entry about using systemd-run to limitsomething's RAM consumption . This wasback in the days of cgroups v1 (also known as 'non-unified cgroups'),and we're now in the era of cgroups v2 ('unified cgroups') and also ZRAM based swap . This means we want to makesome adjustments, especially if you're dealing with programs withobnoxiously large RAM usage .
As before , the basic thing you wantto do