[HN Gopher] Show HN: My website, hosted on a 386 25 MHz, 4 MiB o...
___________________________________________________________________
Show HN: My website, hosted on a 386 25 MHz, 4 MiB of RAM, 38400
baud internet
Author : serentty
Score : 135 points
Date : 2022-04-16 19:06 UTC (3 hours ago)
(HTM) web link (serentty.com)
(TXT) w3m dump (serentty.com)
| the__alchemist wrote:
| Makes me wonder if you could do it on a Cortex-M!
| tomrod wrote:
| I guess we could host sites on phones now too. That'd be really
| cool.
| lucb1e wrote:
| That was my first thought when I got unlimited mobile data back
| in ~2006. I could be always on IRC, seed torrents infinitely...
| and that's when the teenage lucb1e realized that there is no
| port forwarding on mobile networks and why that is a problem.
|
| To this day I wonder why nobody seems to care at all about
| that. It's like being on the real internet except you can't
| reach each other, you have to always go through some third
| party that is on the internet proper.
|
| At least we got "net neutrality" now, which doesn't apply to
| SYN packets for some reason but at least it applies in the
| other direction, so no more 'blocked site' page on
| buienradar.mobi because KPN wanted to sell its expensive SMS
| weather service instead of this newly popular weather radar
| site.
|
| For what it's worth, I did compile and run a bitcoin miner on
| my phone ten years ago. Running services on it isn't exactly a
| new idea, but now that they're so powerful, it also means we
| can't supply enough power from the battery or dissipate enough
| heat while in a pocket.
| MrYellowP wrote:
| Poor 386. 25MHz ... an SX, I'd guess?
|
| Man, you should get that upgrade to 8 megs of RAM.
|
| Windows 3.1 benefitted greatly and even OS/2 Warp,
|
| which already worked fine with 4 megs, saw some improvements in
| performance.
| serentty wrote:
| It is indeed an SX! I am upgrading it to 16 MiB soon, as well
| as putting an Ethernet card in it. At that point I think it
| might end up a much more capable host. I am not sure if I want
| to find some way to keep this page up long-term yet. If there
| ends up being a reason to, then I will look around for some
| suitably retro way to host it, while still allowing me to use
| the 386 for other things.
| sgt wrote:
| The SX makes it practically a 286, right?
| smackeyacky wrote:
| Sort of. 32 bit internally, 16 bit externally. Not as fast
| as the DX but had all the processor modes so could run
| protected mode unlike the 286.
|
| One place I worked we sold a 286 upgrade board that had a
| 386sx and a few support chips. Undearneath was a 286 style
| socket. You removed your 286 and put this thing in its
| place. They worked OK and provided a decent speed boost.
| unfocussed_mike wrote:
| Amstrad's last great PC series (the 3x86 series made with
| very standard components, unlike the unusual 2x86 series)
| used this strategy for the 3386, I think.
| guidedlight wrote:
| The 286 is a 16-bit CPU, whereas the 386 is 32-bit CPU.
|
| This alone made the 386 far more capable and compatible
| with modern software (Linux requires 32-bit).
| christophilus wrote:
| Pets; not cattle. That's the way I like it.
| vmception wrote:
| Its a good reminder that you can!
|
| My issue with these projects is how much energy they use for
| whatever task they can do.
|
| I have a 10 year old machine that was a high end machine in its
| day, being lapped by a high end laptop on all tasks, except for
| gpu tasks I slammed into the PCIe slot. The power consumption is
| honestly sad. Its not like its an energy cost thing, as it would
| take decades to break even in lower electricity bills after
| buying a high end machine specifically for lower energy use, its
| more of a self conscious thing.
|
| OPs machine should just be a compute instance virtualized in some
| gigantic memory cluster somewhere that was already running.
| aaaaaaaaaaab wrote:
| >OPs machine should just be a compute instance virtualized in
| some gigantic memory cluster somewhere that was already
| running.
|
| Then it would no longer be OP's.
| mechanical_bear wrote:
| Your machine is smoking right about now... might want to open a
| window.
| Simplicitas wrote:
| lol .. it's always the same story with these .. lol
| [deleted]
| throw7 wrote:
| serentty.com has address 104.21.2.145 serentty.com has address
| 172.67.129.79 serentty.com has IPv6 address
| 2606:4700:3033::ac43:814f serentty.com has IPv6 address
| 2606:4700:3031::6815:291
|
| It is not being "served" by 386SX at 25 MHz, running MS-DOS 6.22.
| And if it is, then my raspberry pi is serving all my clients
| websites across the world.
| serentty wrote:
| Please see the comments on this thread. It was directly
| internet facing when I posted it initially. Hacker News managed
| to bring it down. I had to add a cached reverse proxy. If you
| have any ideas about how to more authentically keep the site
| online, please let me know.
| sydthrowaway wrote:
| Why aren't there ASICs for hosting web sites
| mhh__ wrote:
| "Johnson, why can't we push this security update?"
|
| "Well boss, we thought it would be more webscale to use our own
| chip design, so we're kinda stuck, but the good news is that
| we've negotiated the cost of new masks down to 3 million
| dollars"
| IgorPartola wrote:
| ESP32 can do it.
| idealmedtech wrote:
| That's a general purpose microcomputer, not application
| specific!
| cperciva wrote:
| Because there's no point. A single server can push hundreds of
| Gbps of traffic already; using an ASIC would just make it less
| agile.
| ip26 wrote:
| You might be able to bake some preprocessing of e.g. HTTP
| into the NIC, doing incrementally more work using well
| defined standards before delivering packets to the host.
| Especially with an FPGA.
| cookiengineer wrote:
| > Why aren't there ASICs for hosting web sites
|
| Isn't this what ESP32 variants are trying to achieve? [1]
|
| [1] https://en.wikipedia.org/wiki/ESP8266
| azinman2 wrote:
| No, that's just a general purpose computer. ASICs are
| dedicated chips for a given task, where that task's "program"
| is built into the chip and it can only do that.
| serentty wrote:
| It has gotten pretty busy. In case you can't manage to load it
| live from the machine, here is a snapshot of it:
|
| https://archive.ph/WUdgc
| raverbashing wrote:
| Yeah, even a local cache in front of the serial link would go a
| long, long way into making this more feasible
| controlledchaos wrote:
| Link doesn't work
| notuger wrote:
| it's loading fine here
| serentty wrote:
| It could be that it is genuinely not working, but it could also
| be that it takes a while to start loading. The server can only
| serve 8 clients at once, over a bandwidth of about 4 KiB/s. So
| maybe try again and give it some time to load in another tab.
| jotm wrote:
| Big ooof, of course it's down. I'm hosting a simple static site
| on a Core 2 Duo + 4GB RAM and it's amazing just how slow the
| hardware is. It can barely handle 100 concurrent visitors (as
| tested with JMeter), and if it starts swapping on the spinning
| rust inside... that's it, forget it, come back the next day. I
| don't even know how a 386 can even start with modern software.
| LeFantome wrote:
| Why so slow? As a "this will never work" stop-gap when my
| laptop died, I put the latest Manjaro Linux on a Core Dou iMac
| ( early 2008 ) to use for work that day ( 6 GB ). I was blown
| away how well it worked and I was able to do everything I
| normally do without problems ( well, except I had to use the
| Outlook web client for email / calendar -- but that is just
| Linux and not hardware ). Months later, I still use it almost
| every day. It is my preferred spot to take Zoom / MS Teams
| meetings due to the large screen. I run Docker and Distrobox
| containers on it. I built a toy compiler in .NET on it. I play
| Diablo and StarCraft on it from time to time. I have it running
| Plex and it serves movies and TV episodes to my family ( often
| to more than one device at a time ). I toy around with
| SerenityOS on it in QEMU ( in a VM ) and it runs great.
|
| I have not tried to host a static website but it surprises me
| that 100 visitors would give that hardware trouble. I will have
| to try that now.
| anthk wrote:
| > I play Diablo
|
| Try Flare RPG, and, next, Slashem and/or Nethack.
| unilynx wrote:
| It shouldn't be a problem. Checking the classic C10K article
| at http://www.kegel.com/c10k.html ...
|
| > In 1999 one of the busiest ftp sites, cdrom.com, actually
| handled 10000 clients simultaneously through a Gigabit
| Ethernet pipe
|
| HTTP isn't that heavier (if at all) than FTP, so 100 visitors
| for static content shouldn't be a challenge for 2008 hardware
| MrYellowP wrote:
| Your machine should be able to handle way more than that?
|
| What's running on it and what's your connection?
| serentty wrote:
| It isn't running modern software. It is running MS-DOS 6.22. If
| it's not loading for you, you can try the snapshot.
| jandrese wrote:
| I assume you're doing more than just serving up static HTML if
| your machine can't handle 100 simultaneous connections with a
| C2D.
| alduin32 wrote:
| It could also be thermals.On old hardware the thermal paste
| is often completely fried. I've seen C2Ds barely able to
| handle anything once they got hot.
| ericd wrote:
| Yeah, or dust - my C2D Macbook Pro used to peg all its
| cores with kernel_task at the slightest hint of work, to
| the point where the UI thread started hitching because it
| was getting preempted, and the mouse would skip around the
| screen. Took me a bit of research to figure out that they
| use kernel_task for thermal throttling (great naming,
| guys). Opening it up, there were mats of dust that looked
| like felt pads between the fans and the heatsinks. Took out
| the felt pads, suddenly everything was smooth as butter.
| digitallyfree wrote:
| A regular static site shouldn't be a problem on a C2D with 4GB,
| and it shouldn't be swapping either (unless you're doing more
| than web hosting on that machine). I'm assuming you're
| literally serving static pages and not running much server-
| side.
|
| Many people host static sites on 1GB SBCs and 1GB/1T VMs with
| no issues, and you can make do with even less.
|
| Update: I tried some tests on my secondary server, which is
| likely slower than your C2D (AMD G-T48E). I simply ran
| ApacheBench on the Proxmox Backup Server web interface login
| page since that's the only web service I have running on it.
| The two machines were connected over Gigabit LAN and HTTPS was
| used.
|
| This is 1000 requests at a time for a total of 5000 requests.
| While it was running I was able to make a connection to the
| login page in my browser as well (it took six seconds to load,
| but it loaded). I think I did the test properly but let me know
| if I should try something else; it's been a while since I've
| done this kind of stuff. ~$ ab -n 5000 -c 1000
| https://<PBS server>:8007/ This is ApacheBench, Version
| 2.3 <$Revision: 1843412 $> ... Benchmarking <PBS
| server> (be patient) ... Finished 5000 requests
| ... Server Software: ... SSL/TLS
| Protocol: TLSv1.2,ECDHE-RSA-AES256-GCM-SHA384,2048,256
| Server Temp Key: X25519 253 bits ...
| Document Path: / Document Length: 1940
| bytes Concurrency Level: 1000 Time taken for
| tests: 34.274 seconds Complete requests: 5000
| Failed requests: 0 Total transferred:
| 10215000 bytes HTML transferred: 9700000 bytes
| Requests per second: 145.88 [#/sec] (mean) Time per
| request: 6854.761 [ms] (mean) Time per request:
| 6.855 [ms] (mean, across all concurrent requests)
| Transfer rate: 291.06 [Kbytes/sec] received
| Connection Times (ms) min mean[+/-sd]
| median max Connect: 21 2863 2225.0 2535 10907
| Processing: 98 3275 1836.3 3142 10434 Waiting:
| 1 3275 1836.4 3142 10434 Total: 118 6138
| 3078.9 5655 12545 Percentage of the requests
| served within a certain time (ms) 50% 5655
| 66% 6733 75% 6965 80% 7569 90%
| 12324 95% 12469 98% 12504 99% 12517
| 100% 12545 (longest request)
| pmlnr wrote:
| You are certainly doing something wrong - I'm serving multiple
| wordpress and static pages from a former passively heated thin
| client with a Celeron N3010. The only diff is AES-NI compared
| to core2duo.
| lucb1e wrote:
| Are those wordpress pages cached, or generated for every
| pageload? Because if you generate it once and then basically
| just serve static content, yeah that works fine on any potato
| (and that's how static hosting should be, so that's great)
|
| I tried running Wordpress with some plugins that required
| fresh page generation for every pageload for a friend on an
| Intel Atom... D525 I think it was. A single pageload was more
| than twenty seconds if I'm not mistaken. Without looking up
| that model number I'd guess this Celeron probably has similar
| performance, so your being able to host 'multiple' of those
| sounds like there's more in play
| AviationAtom wrote:
| IIRC, there was a post on here about Redbean being able to
| serve a wild amount of requests, on minimal hardware. But
| perhaps it was a different piece of software than I recall.
| SystemOut wrote:
| This is what my first PC was my freshman year of college back in
| 1990. Felt damn good I got the 65MB hard drive instead of the
| typical 40MB that most machines had back then.
| serentty wrote:
| Heh, this has an 80 MB hard drive and it is killing me with how
| small it is. I'm constantly transferring stuff back and forth.
| philjohn wrote:
| Luxury!
|
| I had a 40MB hard drive on my Cyrix 386, and double-spaced it
| to "80"MB
|
| It's crazy to think how little 40MB is now, I've edited
| PowerPoint decks larger than that.
| csdreamer7 wrote:
| What is the power consumption? Curious how it compares against a
| Raspberry Pi Zero.
| [deleted]
| [deleted]
| Keyframe wrote:
| Loaded and now I want to know more about Rust->C64 (kickass and
| acme here)
| butz wrote:
| I bet someone is trying to access this website using similar
| hardware.
| fevangelou wrote:
| Thanks to CloudFlare, it's working now...
| serentty wrote:
| Yep, I figured it was the only way to get it to keep working.
| Interesting that it seems to work for you already. It isn't yet
| going through CloudFlare for me when I try to visit it. Maybe
| DNS cache?
| fevangelou wrote:
| It could be your local DNS cache. Testing with a private
| browser window usually does the trick, otherwise, just flush
| your DNS cache ;)
| unfocussed_mike wrote:
| Enjoyably deadpan :-)
| LeoPanthera wrote:
| It took a second or two to get going but it did load, albeit
| slowly!
| quenix wrote:
| This uses CloudFlare and the page is cached (CF-Cache-Status: HIT
| header). Kinda disappointing that we're not receiving data from
| your compunet but rather the CloudFlare edge machine.
| serentty wrote:
| If you had visited a few hours earlier it would have been
| direct. Then the hug of death hit.
| taf2 wrote:
| What's amazing to me is my tiny esp32 d4 pico has attached psram
| of 8mb compared to the x386 powering this with only 4mb... I bet
| my ram is faster too...
| [deleted]
| xyst wrote:
| > I have gotten Rust to compile for 386 DOS machines before
|
| I don't know why I laughed so hard at this. Why would any sane
| person do this?
| cesarb wrote:
| > Why would any sane person do this?
|
| Perhaps the same kind of people who got GCC to compile for 386
| DOS machines (also using DPMI). Which might sound useless,
| since it's an underpowered operating system running on
| underpowered hardware, but it was used to build some very
| popular software, like the original Quake game (source:
| http://www.delorie.com/djgpp/history.html).
| mhh__ wrote:
| Why not?
|
| If you talk to the spooky GCC people with beards they'll point
| out that they support much much weirder chips than that (albeit
| with little to no library support).
| serentty wrote:
| It's fun. Lots of people like doing retro game dev and the
| like, but often you are stuck with ancient C toolchains that
| suck even if you like C itself. Getting Rust working is a great
| way to make it more enjoyable from a hobbyist perspective, I
| think.
| bbarnett wrote:
| I guess you will laugh harder, at the guy trying to get it to
| work on Psion 3a.
| cush wrote:
| Wouldn't load. Title checks out. :)
| freitasm wrote:
| Cloudflare free plan exists for a good reason.
| AviationAtom wrote:
| I just like to go to these to see if they actually are working.
| Sadly, but predictably, they never are.
| serentty wrote:
| It worked ridiculously well before I posted it to Hacker News.
| ;)
| AviationAtom wrote:
| Oh, no doubt, but I hold out hope that somehow, some way,
| somebody will find a way to handle the hug of death. Perhaps
| it's simply impractical on such modest hardware.
| serentty wrote:
| I think it would have fared much better if I had waited
| until I got my ISA Ethernet card in the mail. But serving
| this over serial at 38400 baud and watching it try to keep
| up was tempting. I'll have to see how well it fares with
| real networking hardware. At that point I might post it
| again, although I will have to add enough content to it to
| justify a repost.
| CyberRabbi wrote:
| Are you able to measure the latency of processing one
| request when there is no load?
|
| Just back of the envelope, if it takes 200,000
| instructions to handle a request and we assume 6 cycles
| per instruction, then that's about 25 requests per
| second.
|
| HN is roughly 50K requests over 6 hours, so that's
| roughly 2 requests per second on average. I would imagine
| it peaks to about 25. So in theory you should be able to
| handle the traffic.
| admax88qqq wrote:
| The 38400 baud might be the biggest bottleneck.
|
| http://bettermotherfuckingwebsite.com/ is 20k, ignoring
| http overhead.
|
| Maybe strip that to 15k after compression, and cut some
| content.
|
| Still 15000/38400 <= 3 responses per second.
|
| Add in serial parity overhead, http overhead. Might be
| able to sustain 2 rps with enough cleverness.
|
| Leaves no room for bursts
| fisherjeff wrote:
| Don't forget that 38400 baud serial is 3840 bytes/s...
| arcticbull wrote:
| 38400 baud should be 38.4kbits/sec or 4800 bytes/sec no?
|
| [edit] never mind, you're right, assuming an 8N1
| configuration - 8 bit bytes, 1 start bit, 1 stop bit, and
| no parity bits.
| admax88qqq wrote:
| Yup definitely forgot bits vs bytes lol.
|
| So 3kB/s, if your site is 15kB you're looking at 5
| seconds per request, or 0.2 rps.
|
| Plus overhead. I thought my original math sounded too
| fast.
| djbusby wrote:
| The content can be performance metrics before and after
| the Ethernet card.
| tyingq wrote:
| >Perhaps it's simply impractical on such modest hardware
|
| I imagine it's not just the hardware limitations, but the
| available software. This one, for example being MS/DOS,
| where there were never really any serious server-side
| http/tcp implementations.
|
| On the other hand, there were very busy BBS systems running
| on DOS where there had been time for years of various
| optimizations to happen.
| outside1234 wrote:
| It is probably the modem honestly. The 386 is well capable
| of saturating a 38.4k modem many times over.
| sbierwagen wrote:
| Loaded fine a couple seconds ago. Took about a minute to
| start transferring data, during which it didn't appear to be
| responding.
| dev912 wrote:
| It loaded fast just now, but it's just a wall of text with 3
| links. Just seems less impressive because of that. But it is
| cool! I enjoy older hardware.
| serentty wrote:
| The increased speed is probably because of CloudFlare. I
| know it's kind of cheating, but it was the only way to
| avoid the hug of death. The good news is that the 386 is
| still serving lots of incoming requests, just not every
| single one. If I can think of some more authentic way to
| keep the site up, I'll try that.
| NaturalPhallacy wrote:
| Well that and the page is 4KB with no javascript.
| justizin wrote:
| consider putting it behind a cdn like cloudfront or fastly, i
| think both have free plans - it's a good way to illustrate
| that you can serve a _lot_ of traffic with very little
| backend power.
| capableweb wrote:
| > it's a good way to illustrate that you can serve a lot of
| traffic with very little backend power.
|
| What? It demonstrates that Cloudfront or Fastly can handle
| a lot of traffic, since they'll cache just about everything
| if you put it in front of a static website...
| chetanbhasin wrote:
| I think the point is that an individual doesn't need a
| lot of paid resources to take a website live with their
| own hardware.
| lucb1e wrote:
| That's also true if you employ a ten year old laptop as I
| do, quite power-efficient and has a built-in UPS (todo:
| get one for the router). No CDN or anything and the
| couple of pageloads per second (at peak), as the HN
| homepage generates, barely raises the load average into
| the point-tens.
|
| The software/service you run makes most of the difference
| between whether it can run on standard at-home hardware
| or if it needs some distributed autoscaling system (when
| speaking of HN homepage types of traffic). Of course, if
| you're serving video or large images/audio, you're going
| to need more than a few megabytes per second of uplink.
| Or if your site trains neural networks custom for every
| visitor, that's a special case. But for regular
| websites...
| kfichter wrote:
| Ah yes, the very little backend power that cloudflare runs
| serentty wrote:
| I think I have CloudFlare on, and I am seeing requests with
| a CloudFlare header, but I am still getting a huge amount
| of traffic. I am not sure what the issue is. Maybe the site
| is so busy that CloudFlare can't even load it to cache it,
| haha. Anyway, I have to leave for an exam now, so let's
| hope it manages to work itself out.
| spockz wrote:
| Changing to cloud flare probably meant updating your dns
| settings. Based on the TTL of the record and clients
| respecting it, the change can take a while (up to days
| even) to spread around the world.
| [deleted]
| ulfw wrote:
| Then what exactly is the point of posting it? Not calling you
| out specifically but there's been quite a few similar ones,
| always unavailable because they don't scale beyond one user.
| So there's nothing to see and little to discuss.
| MiddleEndian wrote:
| It loaded for me just now, took a minute or so.
| system2 wrote:
| I guess it explains why it doesn't load for me, or anyone.
| huhtenberg wrote:
| Takes 80ms to load. From Europe. That's insane, if not altogether
| impossible.
|
| But the IP resolves to 188.114.96.3, which is Cloudflare.
|
| So regrettably it doesn't look like I was actually fetching
| anything off 386 per se.
| serentty wrote:
| When I first posted it a few hours ago, I didn't have
| CloudFlare. You can see lots of people unable to load the page
| at all in the earliest comments. Unfortunately it got to a
| point where pages weren't just slow to load, but the
| connections were dropped entirely. So I figured that between
| the options of enabling CloudFlare or just having it be
| completely inaccessible, the former was preferable even at the
| cost of authenticity. I would love to find a better idea for
| how to keep the site online, if you have any.
| zepearl wrote:
| But but..., going through Cloudflare makes it lose all what's
| related to the context of being hosted ony a 386SX etc... :(
| serentty wrote:
| Yeah, maybe posting it on Hacker News was a bad idea. I
| should have tried somewhere with fewer visitors first.
| [deleted]
___________________________________________________________________
(page generated 2022-04-16 23:00 UTC)