News for hackers. Stuff that matters.
Re:If you're happy with OpenBSD, probably any computer is go... by johnklos on Sunday February 05, 2023 @02:22PM (#34668047)
There are lots of people in the comments here who appear to not get it. This isn't about replacing a contemporary computer with something old. It's about the usability of a decent OS on very modest hardware.

One of the systems on which I run NetBSD is a 33 MHz m68030 Mac LC III+ (http://elsie.zia.io - it's hosting a site about an LC II, which I'm still working on). It's quite useful to see how assumptions people make about "acceptable" performance regressions bear out in the real world. Sure, not much can be done about taking six or seven minutes to ssh, but when bad coding causes a shell script to take twice as long, it's much more obvious on hardware like this than on a modern Ryzen system.

Nobody is telling others to forego your modern computer and your Windows needs. It's just interesting to some of us that we can still run modern things on very modest and, in some cases, very non-mainstream hardware in 2023.

Re:If you're happy with OpenBSD, probably any computer is go... by BizarreByte on Sunday February 05, 2023 @02:25PM (#34668084)
Thank you for getting it, this was my entire point and I’m glad it came across to someone.

Obviously I would never suggest someone replace their modern daily driver computer with one of this age.

Re:If you're happy with OpenBSD, probably any computer is go... by mro_name on Sunday February 05, 2023 @02:47PM (#34668401)
indeed, developing fast software requires slow hardware.
Re:If you're happy with OpenBSD, probably any computer is go... by flenserboy on Sunday February 05, 2023 @04:00PM (#34669317)
Excellent point. Software testing (not for stability but instead for usability, and certainly not for compiling, lol) ought to be done on minimal-spec systems (the specs of which might possibly be dialed-down further once optimization is done, which would be a bonus). Assuming that a faster system (or one with more RAM or storage) will cure the real problem has allowed all sorts of sloppiness to creep into software.
Re:If you're happy with OpenBSD, probably any computer is go... by LoganDark on Sunday February 05, 2023 @07:27PM (#34671556)
We once heard a story about how someone optimized their game engine for a crappy old netbook and ended up with some tens of thousands of frames per second on any vaguely modern system.

This works.

-Emily

Re:If you're happy with OpenBSD, probably any computer is go... by mro_name on Thursday February 09, 2023 @08:58AM (#34723927)
as you mention gaming – do you know the doom-in-lego-brick? https://kilograham.github.io/rp2040-doom/ and brick assembly https://youtube.com/watch?v=6wBrOV2FJM8

There are some video links in the (german) article https://heise.de/-7448263. Mind-blowing.

Re:If you're happy with OpenBSD, probably any computer is go... by rahen on Sunday February 05, 2023 @07:41PM (#34671683)
NetBSD is still routinely tested on 486s and old Vaxen, and developed on ARM SBCs or Pinebooks. It helps keep the code base light and efficient.

The latest minimal kernel will still boot on 4MB of memory on 32 bits machines, although it will take more than that to be usable.

Unfortunately NetBSD can only do so much considering the sad state of the Linux ecosystem. GCC has become so big it won't self host on most platform, making cross compilation mandatory for them. Switching to PCC would be a solution, but a lot of software won't compile with PCC and obviously their maintainers couldn't care less.

Then you have the newer behemoths like Rust and Go. Once they start creeping in some majors projects like GCC or OpenSSL, a lot of machines will turn into e-waste, and the resource requirements will climb even further.

Re:If you're happy with OpenBSD, probably any computer is go... by Sesse__ on Sunday February 05, 2023 @04:26PM (#34669618)
It does not. Slow hardware _can_ give you a certain amount of _motivation_ for speeding up your software, but this is by no means a given (if software running slowly on your own computer automatically made you optimize it, there would not be software that is really slow even on fast hardware, and there clearly is).

If you care about making software fast, you invest time in the measurements-ideas-measurements loop, where having fast hardware helps a lot (it allows you get measurements faster, and try out more ideas in a given time frame). Since any sane measurement is based on benchmarking and not eyeballing, slower CPUs don't help you. And you certainly can care about fast software without having a slow computer personally.

Re:If you're happy with OpenBSD, probably any computer is go... by andai on Sunday February 05, 2023 @04:51PM (#34669886)
>if software running slowly on your own computer automatically made you optimize it

I recently changed 1 byte in Chrome.dll and decreased the lag for copying large images by a factor of 2-3. (The UI freezes for 5-10 seconds. Turns out it's re-encoding a 2MB JPG into a 20MB PNG for the clipboard, at compression level 6 no less!)

I put up with it for years thinking there was nothing I could do, but one day I decided to ask some people smarter than me, and they gave me enough info to track down the code in IDA (I had never used it before).

My point is, motivation is a powerful thing!

(Offtopic but turns out Firefox copies the original file, so you can paste it right into Windows explorer—blew my mind!)

Re:If you're happy with OpenBSD, probably any computer is go... by alexchantavy on Sunday February 05, 2023 @05:40PM (#34670496)
This sounds cool, you should write a blog on it
Re:If you're happy with OpenBSD, probably any computer is go... by charcircuit on Sunday February 05, 2023 @06:00PM (#34670711)
For those curious.

https://source.chromium.org/chromium/chromium/src/+/main:ui/...

An improvement would be to replace EncodeBGRASkBitmap with FastEncodeBGRASkBitmap so that it uses the fastest zlib level instead of the default (6). This is what the Linux X11 (ozone) implementation uses. This would be an easy fix to upstream if someone wants to do it.

Re:If you're happy with OpenBSD, probably any computer is go... by andai on Sunday February 05, 2023 @06:16PM (#34670881)
Yeah, like you said they literally already wrote the code that does that, not sure why they didn't use it. Setting compression to 0 is still 2 full seconds of lag for me (down from 8s), so there's still a lot of overhead. There are faster png implementations but I think re-encoding a 2MB JPEG into a 20MB PNG (to be re-encoded back to JPG by whatever program you paste it into) is kind of missing the mark.
Re:If you're happy with OpenBSD, probably any computer is go... by charcircuit on Monday February 06, 2023 @04:12AM (#34675114)
Funnily enough a CL moving the computation to a background thread was submitted a week ago. This would prevent the UI freeze.

https://chromium-review.googlesource.com/c/chromium/src/+/42...

Re:If you're happy with OpenBSD, probably any computer is go... by asveikau on Sunday February 05, 2023 @05:10PM (#34670135)
How about the fact that performance best practices vary on different hardware?

CPUs have changed a lot, in that caches, speculative execution, and parallelism are the way to get performance, and that was not true in the heyday of a classic Mac.

I'm still in favor of porting to old platforms for various reasons. But we need to keep in mind that performance optimization is not one size fits all.

Re:If you're happy with OpenBSD, probably any computer is go... by anarazel on Sunday February 05, 2023 @07:23PM (#34671522)
Strongly agreed.

In fact, I found an over-dimensioned workstation to be one of the best tools improving performance of non-trivial programs. There's a lot of performance issues that don't stand out sufficiently on today's common-place enduser hardware, that will be very visible on a current two socket system. And fixing the issues benefits the lower end hardware of today. More often than not, the large issue one can see in large machines today, are issues seen on lower-end hardware in a few years.

It's easy to see using too many cycles on enduser hardware. The effects of memory latency, various forms of cache contention, etc however, not so much.

> Since any sane measurement is based on benchmarking and not eyeballing, slower CPUs don't help you

I do find that somehow, to a non-rational degree, I have a considerably easier time getting a "feeling" for the performance bottlenecks when benchmarking on my workstation, than when benchmarking on a server. Which I guess kinda falls out of proper benchmarking.

Re:If you're happy with OpenBSD, probably any computer is go... by wahern on Sunday February 05, 2023 @07:48PM (#34671743)
In the case of OpenBSD itself, the popularity of the PCEngines APU2 has definitely provided motivation for improving the performance of PF.

Also, ironically, people elsewhere in this article thread keep mentioning that older hardware is too power intensive. But the reason the APU2 is still around is because neither Intel nor AMD offer modern chips with a maximum TDP as low as the AMD G series. At maximum load, with all 4 cores, DRAM, and NICs at full throttle, the APU2 only dissipates something like 10W of heat. Modern x86 chips are more power efficient, but their maximum TDPs are just too high. Some of the laptop and embedded series get close at ~15W (not sure if that includes DRAM and NICs), but that's too hot. The APU2 is designed to only require passive cooling, without finned cases, without conditioned air, and still provide years of reliable always-on service.

I see the same issue with higher-end AMD and Intel chips. Under light load their power draw is very low, but under load their chips are often more power hungry than comparable models from 10 years ago. Yes, they get more work done per watt, but there are many situations where I'd rather know that a server will never draw more than, say, 50-60W, even if that means requests end up being throttled. But I don't want to use their crippled low-end chips, either, especially when I can just continue using my 10+ year-old servers that provide better performance. (Theoretically you could manually throttle requests to maintain the power envelope, but I don't want to be burdened managing software configurations.) I prefer the "edge computing" series of chips from Intel and AMD, but over the years their max TDP has slowly crept up. Thankfully there are still a few options that work well, but it's definitely a niche that doesn't see much attention.

Re:If you're happy with OpenBSD, probably any computer is go... by johnklos on Sunday February 05, 2023 @08:27PM (#34672045)
Back when Fry's Electronics was still around, they had a sale on old AMD MSi AM1 motherboards and Athlon 5350 quad core 2 GHz CPUs (APUs) for $45 or so for a set. I bought quite a few, and now I regret not buying more. At 100% CPU load they take less than 25 watts measured at the wall, and less than 40 watts with two spinning rust 3.5" disks. They make excellent NAT routers / firewalls / DNS servers, et cetera. They can route / NAT a full gigabit and still have cycles to spare.

The closest thing we have today is getting a quad core Ryzen and running sysctl -w machdep.cpu.frequency.target=1600. Personally, I'd rather have more of those wonderful 2014 motherboards and CPUs.

Re:If you're happy with OpenBSD, probably any computer is go... by Sesse__ on Monday February 06, 2023 @08:23AM (#34676927)
> In the case of OpenBSD itself, the popularity of the PCEngines APU2 has definitely provided motivation for improving the performance of PF.

And Linux' packet processing now pushes 100Gig and beyond, which is not motivated by low-end hardware but certainly helps it. :-)

> In the case of OpenBSD itself, the popularity of the PCEngines APU2 has definitely provided motivation for improving the performance of PF.

You can get Alder Lake-N at 6 W TDP, which is the same as on AMD GX-412TC (the CPU used on the APU2).

Re:If you're happy with OpenBSD, probably any computer is go... by drewcoo on Sunday February 05, 2023 @05:26PM (#34670333)
I think any article on HN is really just a jumping off point for people to talk about themselves. Everyone's had old computers, so that's easier to talk about.
Re:If you're happy with OpenBSD, probably any computer is go... by harel on Sunday February 05, 2023 @06:24PM (#34670951)
Absolutely this. I'll add that there is a certain kind of joy (to me at least) to see an old machine spring back to life and become useful again.
Re:If you're happy with OpenBSD, probably any computer is go... by jkepler on Sunday February 05, 2023 @07:36PM (#34671638)
I heartily agree. I have an old Asus netbook (castoff from a family member who switched to computing nearly exclusively on her smartphone; the machine originally ran MeeGo Linux on a 8GB internal disk) that runs Debian stable, slowly, but I've been wondering if one of the BSDs might be slightly faster. I'm thinking of making it a kitchen computer primarily to serve as a recipe database.
Re:If you're happy with OpenBSD, probably any computer is go... by desuforever on Sunday February 05, 2023 @06:55PM (#34671248)
jerk off motion BSD tiem
Re:If you're happy with OpenBSD, probably any computer is go... by JoshMcguigan on Sunday February 05, 2023 @07:03PM (#34671340)
What part of SSH takes 6 minutes?
Re:If you're happy with OpenBSD, probably any computer is go... by Topgamer7 on Sunday February 05, 2023 @07:07PM (#34671387)
Maybe the encryption on older hardware?
Re:If you're happy with OpenBSD, probably any computer is go... by johnklos on Sunday February 05, 2023 @08:18PM (#34671988)
Running sshd on a 33 MHz m68030 (OpenSSH_9.1), and connecting to it from a modern(ish) machine (OpenSSH_8.1p1) takes about six minutes to complete when the system is otherwise idle. Right now it's busy with lots of http requests due to putting the link here, so it's taking about 9 minutes or so ;)
Re:If you're happy with OpenBSD, probably any computer is go... by snvzz on Monday February 06, 2023 @01:28AM (#34674057)
Is that Linux?

It takes too long, but much less than that, on Netbsd @ A1200 with 030, albeit 50MHz.

Re:If you're happy with OpenBSD, probably any computer is go... by johnklos on Monday February 06, 2023 @01:55AM (#34674189)
NetBSD 10.0_BETA.

I'd expect a 50 MHz '030 to be faster than a 33 MHz one ;) But running newer ssh and sshd means more expensive default ciphers. I can speed it up a bit by being more deliberate about the choice of cipher, but I want to run things by default, generally speaking.

Re:If you're happy with OpenBSD, probably any computer is go... by aidenn0 on Sunday February 05, 2023 @07:33PM (#34671606)
Not nearly as low-end, but I ran a server off of a P3 450MHz for over a decade, then sold it to someone who was going to continue using it for a similar purpose. 4 of those years were in a college dorm room with no A/C.

The CPU fan died at some point, and I didn't notice until I opened it up to change a hard-drive. If it's not still running it's probably due to an exploded capacitor, because that thing was indestructible.