How much userspace does one need for a Linux machine anyway?

A joking comment on my post about Emacs being pretty small these days said something like “130MB just to show a PNG”… which made me wonder what the userland on this Raspberry Pi Zero was like, anyway.

Above you see a list sorted by the resident size of the processes.

The biggest thing, at 29MB, is systemd-journal — which isn’t really necessary on a device like this, but nice to have.

Next up is exim4 at 17MB, which is totally unnecessary — this system is not going to be receiving mail (or even sending it).

NetworkManager (at 10MB) sounds necessary, but isn’t — one can just plop some stuff down in /etc/network/interfaces instead.

Then we have three instances of sshd (at 10MB and down), which is because I’m ssh‘d in — there’s normally just two otherwise? But necessary.

Then there’s stuff that sounds necessary, but ModemManager (!) at 4MB certainly isn’t, and I don’t think polkitd is either (4MB).

bluetoothd (3MB) is not necessary, and neither is avahid (two processes, 4MB altogether).

And then the rest (like d are the processes that update the screen and stuff) look necessary.

But that’s (+ 29 17 10 4 4 3 4) => 71MB of stuff that does not need to be running, I guess.

Which is more than the size of the Emacs process, anyway.

(There are obviously super duper optimised Linux images that run on actually constrained devices, but I was just curious as to how much a normal Debian image could be shaved down.)

Not that I’m going to be pruning processes — there’s plenty of space to go around, but it just shows how far off my initial supposition that the device was too limited to run Emacs locally was.

Herp derp I eat paste

A year and a half ago I made a kitchen clock, which has worked well (except that I had to swap out the screen which broke mysteriously).

But yesterday I was having some work done here, so I had to remove one of the wifi access points here, and… the clock stopped working. *gasp* Yes, because I had in my infinite wisdom decided that I would generate the clock face on a different machine, because the clock is a Raspberry Pi Zero 2 W, and I just assumed that it didn’t have enough memory to run Emacs (which I am, being a totally rational person, using to generate the SVG that’s being displayed).

So it’s a Rube Goldberguesque setup of having the image being generated on the main server, and then scp‘d over once a minute, and then being displayed on the console here in the kitchen.

But the wifi outage made me wonder — is it true that the machine doesn’t have enough memory to do it all on device?

So it’s got 416MB of useful memory, and while just running and doing nothing special, it’s using 129MB of that.

What happens if I load an Emacs with all the SVG libraries and stuff and generate the image?

It’s using 186MB — so the Emacs occupies about 50MB max.

*sigh*

It’s so easy to think of Emacs as this “big thing”, but everything has gotten so much bigger around it that it doesn’t matter at all any more.

So now I’ve changed the code to run on-device, so the only thing that goes AWOL if the wifi goes missing is updated temperatures.

Winter Painting Accomplished

This summer, I had this balcony spruced up a bit. The wooden slats on the floor there had started to disintegrate, and the painting on the railing needed to be redone, but most important of all, that er, handrail? cap rail? THE PLANK ON THE TOP OF THE BALCONY RAILING looked all gross and stuff.

So I had some people in to fix all that, but the new cap rail (if that’s what it’s called) was unpainted because of a miscommunication — so it looked like the wooden slats there.

They asked “do you want us to come back to paint it, then?” and I said “nah, I’ll do it myself”.

Reader, it took four months.

Because the wood is pressure-treated, it had to “air out” for a month before it could be painted — otherwise the paint will apparently just slip off? And then, before painting, it has to be washed down with Heavy Chemicals, and then dry for a week, and then there’s primer, and then there’s two coats of paint.

That’s all fine and good, but have you ever seen a Norwegian autumn? It rains all the time! Especially this one.

So I needed a dry week between the washing and the priming, and then it needed to dry for a few days…

And before I could find a dry window, winter’s here — and I couldn’t use the paint I’d bought because it’s too cold, and I had to use Oldey Tymey Real Oil Real Paint, which can be applied in temperatures down to -5C.

(Is this a place I can moan about how difficult it is to determine what paints are made of these days? You’d think “NORDIC EXTREME / our best” would be an oil paint, but nope — it’s a “hybrid” paint, apparently, but you can’t really tell from anything that’s on the box. If I understood the guy in the paint shop, there’s now one single paint that’s actually oil paint on the Norwegian market now:

Which, of course, doesn’t say anything about it being an oil paint on the front either — it just says “Windows and doors”. But on the back you can see that it’s made from “alkydolja”, which sounds a lot like “acrylic oil”, but isn’t. I’m guessing all the oil paints have been phased out because they’re really bad for your health, but C”MON. C”MOOOON.

THERE. PARENTHETICAL RANT OVER.)

But I’m done now! The first coat of paint was very satisfying to apply — Real Actual Oil Paint is more fun than acrylics (covers better), and of course, the blackness of the paint is very black.

And then it took an entire week to dry (because of the temperature) before I could do the second coat, which I did yesterday. I was a bit worried that the second coat wouldn’t get dry enough before it started raining again (visions of black paint running down the face of the building), but it feels OK, so now the heavens can open up again.

The moral is: Do all this kind of thing during the summer.

Block or Not

Yesterday I mused idly about whether I should be doing something to block AI mass downloaders after looking at the statistics.

I still don’t know, but in any case, I got Claude to write a script for me, and:

So… I really haven’t made up my mind — the excessive downloading doesn’t affect the server, but it’s just annoying? And… I guess the people on the mailing lists didn’t really sign up to having their mails being used to train AIs?

But… you know… How did that song go again?

It’s like when you used an AI
To write a script to block
AIs
Don’t you think?

I may or may not keep the script running. Let me know if I, I mean Claude, broke something.