13 ms·
Show HN: My 486 Server
Hello. I wrote a multitasking 16-bit real mode "operating system" that works on every IBM PC compatible computer, and a TCP/IP stack for it. Then I wrote an HTTP server for it.
- deleted 5y ago[deleted]
- glassprongs 5y agoVery cool. How many of us did it take to DDOS the server? It doesn't load for me either :)
- smoppi 5y agoThe TCP/IP stack is compiled for 64 sockets. If the socket table is full, it just drops all new SYN packets and does not answer to them.
- CodeWriter23 5y agoJust curious and totally not being critical, what was your thinking about dropping SYN vs responding with RST?
- smoppi 5y agoI think the user will most probably keep pressing the F5/Refresh button anyway if the site is not working at the first try, so responding with a RST packet would just use more bandwidth and resources.
- smoppi 5y agoiptraf on another computer, connected to the same hub: https://www.youtube.com/watch?v=0CeK1TnGhIs https://www.youtube.com/watch?v=0CeK1TnGhIs Assuming that one "TCP entry" means one socket, that's a lot of SYN packets... Video from what it looks like on the server: https://www.youtube.com/watch?v=BVKjVyM53sg https://www.youtube.com/watch?v=BVKjVyM53sg
- soupshield 5y agoCan you share how it's doing cpu/memory wise and his it's holding up in general under what I assume I heavy load from HN?
- smoppi 5y agoRight now I cannot even access it locally from my lan, but it does answer to some of my pings. The HDD led is also blinking, which means that it is in fact answering to some HTTP requests. The TCP/IP stack is compiled for 64 simultaneous sockets.
- CodeWriter23 5y agoNext iteration: Caching HTTP server
- ForOldHack 5y agoPlease paste an image up on Archive.org, so at least we can stare at the 'pre-meltdown' server. P.s. I used a 486 as a router for years, and even upgraded it when I found a Pentium Overdrive... which of course was vulnerable to the F00F bug...
- busymom0 5y agohttps://web.archive.org/web/20220116193852/http://486servu.dy.fi/ https://web.archive.org/web/20220116193852/http://486servu.d...
- tentacleuno 5y agoI can't access it either. It looks like it's just timing out. We did it, guys! :D
- loloquwowndueo 5y agoNot holding up great it seems :)
- velmu 5y ago
- xd 5y agoCan't connect but the OP put a video[1] up of the system ~4 months back. Looks like it might be serving content direct from 3.5 and 5 1/4 floppies which might explain the lag :D [1] https://www.youtube.com/watch?v=Be01GLFP-bQ https://www.youtube.com/watch?v=Be01GLFP-bQ
- smoppi 5y agoActually I upgraded the storage and the website is now served from a hard disk. I'm uploading a video to Youtube atm.
- chizhik-pyzhik 5y agoof course i go look at the finnish person's other videos and they're about building a sauna
- Mystlix 5y ago
- smoppi 5y agoFor those who are interested in retrocomputing, you can download the actual software from there: http://sininenankka.dy.fi/~sami/fdshell/ http://sininenankka.dy.fi/~sami/fdshell/ I recommend downloading the bootable floppy image, unless you want to see the source code.
- rndgermandude 5y agoYou Finns and your "(free) operating system[s] (just a hobby, won't be big and professional like gnu) for 386(486) AT clones." :D
- colejohnson66 5y agoThis "Linus" guy won't go anywhere. No one wants a half-done kernel that is just a hobby.
- coldtea 5y agoPlus the future is microkernels anyway, and there's strong competition between Minix and HURD
- vba616 5y agoIt kind of blew my mind when I learned an evolution of Minix ended up in every Intel computer anyway. You don't even get a choice. Professor Tanenbaum strikes back...
- Liquix 5y agoNot only do you not get a choice, it benefits no one but Intel & the three letter agencies they are in bed with. Tanenbaum himself has expressed regret for the way it ended up being used: "Many people (including me) don't like the idea of an all-powerful management engine in there at all (since it is a possible security hole and a dangerous idea in the first place), but that is Intel's business decision..."
- jug 5y agoThis currently looks like a poor 486 fighting for dear life. Edit: This also looks like a fairly Finnish thing to do. Thinking not only of Linux and hacking, but also their general demoscene culture and such things. See also: https://www.gamesindustry.biz/articles/2020-04-16-finland-recognises-the-demoscene-as-part-of-its-cultural-heritage https://www.gamesindustry.biz/articles/2020-04-16-finland-re...
- Hydraulix989 5y agoDidn't take long to overload it given it is a 486
- bigiain 5y agoJan 2001 was the first month I hit $1mil in revenue from our website. It was served from a Pentium P5 beige desktop box colocated in PAIX. Actually, there were 3 of them. 1 running Apache and Perl FastCGI, one running MySQL, and a third which mostly ran backups, but could be used as failover for either the web server or database if required. I used to fly from Sydney to San Francisco 3 or 4 times a year with half a dozen hard drives in my carryon, because that was the most reliable way to do major upgrades - we had three identical boxes in the office in Sydney, and would install/configure/test major software and dependancy upgrades in house, then go to the data centre and swap in the new drives one machine at a time with zero downtime - usually. I was rarely the only one in my datacenter aisle with a screwdriver and a PAIX guy looking over my shoulder, but most other people were swapping out whole rack mount servers, not opening them up to replace or upgrade components.
- sillysaurusx 5y ago1 mil from what?
- ungamed 5y agoI believe its "Turn down for what"
- 5y ago
- flatiron 5y agoUnrelated 486 story: I used a 486 66 dx2 as my computer until 2001 when I went to college and used my grad money for an actual computer. Get to school and they limit the internet to 1 gig per day. Discovered it’s by MAC address. Not by LAN port. So thanksgiving break grab that bad boy and drag it to school. It ran FreeBSD and I made a SOCKS proxy that just changes it’s MAC after about 1 gig of usage. Have it out to everyone on our floor and we destroyed Kazaa and Limewire. Good times.
- mobilio 5y agoAlso unrelated 486 story - around this time i have similar machine (486 Overdrive) with two LANs that works as router. OS - FloppyFW: https://www.zelow.no/floppyfw/ https://www.zelow.no/floppyfw/ Because ISP used PPTP as way to providing internet and i need to share internet on few machines.
- ForOldHack 5y agoI did too, but that pesky F00F bug, knocked out our router once a week, until we traced who was owning us.
- anthk 5y agoI miss floppy distros such as Basic Linux or NeHaBoDi, nethack 3.4.3 under a floppy.
- deleted 5y ago[deleted]
- anthk 5y agoDid you use Links and Pine too? Because reading web pages over Links/Lynx was still possible in 2001. FVWM, Urxvt, Lynx and ImageMagick for images would fly as a daily machine.
- flatiron 5y agoI did when I was home on that box. Even though Netscape ran fairly well with FreeBSD’s Linux compat layer. I applied for my university using lynx on that 486. Worked ok(ish).
- vkoskiv 5y agoI (fairly) recently installed modern Gentoo onto my 486DX2-66 box. I think it has 32MB of RAM in there. Boots and works fine for the most part. Compiled tools and utilities work fine for the most part, but trying to run any interpreted code takes ages. I should put up a webserver on there and see if it can serve something! Here is me using it to log onto my webserver, it loads the SSH key from a 5.25" floppy: https://twitter.com/vkoskiv/status/1370116376166273025?s=20 https://twitter.com/vkoskiv/status/1370116376166273025?s=20
- anthk 5y agoOpenWRT for 486 would be a faster choice. Just crosscompile pkgs from another machine. You'll have http and gopher support granted. If libressl compile and run, place it under /opt, and maybe you'll be able to compile a gemini client.
- bee_rider 5y agoAlways funny to compare the amount of RAM in these machines to modern L3 cache sizes. You can get an AMD chip with 8X as much!
- detaro 5y agoSame with storage. This laptop has a few times more RAM than my first PC had disk space. And in turn, I've used servers that had more RAM than my laptop today has SSD space.
- gokhan 5y agoLooks like the server is asleep since no one requested for a page recently. I'm constantly refreshing the page until I receive a response, just to prime it for my fellow HNers in case this reaches top of HN.
- smoppi 5y agoMy OOM handler killed the HTTP server process. Now I restarted it - the HTTPD process, not the computer.
- throwthere 5y agoAre you still working on this? I fired up my spider on ultra aggressive retry mode because that will help the DNS get cached for people in my isp. (They have funky cache settings). This should help thee Ed time to first byte for fellow HN neighbors.
- deleted 5y ago[deleted]
- diveanon 5y ago
- chizhik-pyzhik 5y agohttps://web.archive.org/web/20220116193852/http://486servu.dy.fi/ https://web.archive.org/web/20220116193852/http://486servu.d...
- ForOldHack 5y agoThank you, thank you, thank you.
- aftergibson 5y agoAwww. I think the little guy might be struggling.
- every 5y agoI had a 486 server once. It was Novell NetWare 3.x running a LAN for a small nonprofit. Word Perfect, email, listserv, accounting and web access. Pretty sure I would never have exposed it to HN though (had it existed)...
- Moru 5y agoHah, I was running my webserver on a 286 (I think, a bit fuzzy memory there, was a while ago). Now get off my lawn. :-)
- Delk 5y agoI remember seeing a website years ago that supposedly ran on Minix on a 286. Someone had fired that up because... well, because. I don't think it was fast, nor did it probably serve any purpose apart from existing and possibly serving some information about the software it was running.
- every 5y agoNovell was actually quite efficient and responsive. Everything ran in ring 0, right next to the hardware. Which is also why you never applied any patch other than one from Novell...
- sabujp 5y agoshe's dead jim
- FpUser 5y agoSomething close. In the end of 80's I had preemptive multithreading and scheduling right inside my old DOS program. Had to switch timer interrupt frequency to 4kHz for that.
- lottin 5y agoIt's slashdotted.
- viltie 5y ago
- IntelMiner 5y ago
- akkartik 5y agoI'm very interested in the network stack, having explored it for a while for https://github.com/akkartik/mu https://github.com/akkartik/mu before giving up. What sort of network card do you support?
- smoppi 5y agoEverything in my "operating system" is 16-bit x86 code. It uses regular DOS packet drivers. I have also started writing my own DOS kernel, but it is not ready yet. The server uses FreeDOS kernel. That's why I write the "operating system" in quotation marks. And because my TCP/IP stack is 16-bit code, it probably won't work for your system. It's just a DOS program that has an interrupt service routine that the other programs can call.
- hsbauauvhabzb 5y agoOut of interest, how many requests does the hn-effect generate? Have any ‘show-hn’ participants ever provided this?
- smoppi 5y agoThis video answers to your question: https://www.youtube.com/watch?v=0CeK1TnGhIs https://www.youtube.com/watch?v=0CeK1TnGhIs
- hsbauauvhabzb 5y agoNot a whole lot of context or detail in that, it could be at the peak of the effect or at some other point in time (even just bau, or an unrelated dos)
- smoppi 5y agoI recorded that video from a computer that is connected to the same ethernet hub as the 486 server.
- nielsole 5y agoFrom memory as a rough estimate: When I had traffic influx from Reddit and HN it peaked at around 10 page views / second. Maybe 50k views in total including long tail?
- fouc 5y agoWhat is the lowest specs required to handle the HN effect anyways? What is the most retro computer that ever served traffic from HN's top page without going down?
- smoppi 5y agoConsidering that it has to be able to handle about 100 new sockets per second, one socket requires about 1 kB ... 2048 kB (?) of memory depending of the size of the buffers and how the congestion window is implemented[1], I'd say that it would need at least dozens of megabytes of memory and fast I/O. Maybe more depending of the size of the content in the server. Also not all TCP/IP stacks close the socket properly, so the socket cannot just be removed from the memory immediately after sending the page. There will always be sockets that are just waiting for a timeout. [1]my 486 server does not have any TCP congestion control at all - it just sends one TCP frame and waits for ACK before sending the next frame.
- joebob42 5y agoSomeone did a TI something and it seemed to basically work fine as far as I remember.
- fouc 5y agoOh yes I remember now, 6 months ago there was a Casio graphing calculator Fx-9750GII hosting a website https://news.ycombinator.com/item?id=27814080 https://news.ycombinator.com/item?id=27814080 CPU SH3/SH4a, Frequency of CPU 29MHz, RAM 64 Kilobytes Unfortunately it didn't survive HN effect
- tyingq 5y agoMy guess is that memory is probably the big thing. Serving a static file from a buffer cache shouldn't be that taxing on a cpu.
- CyberRabbi 5y agoIt doesn’t really take a powerful server to sustain HN traffic (tens of thousands of requests over a few hours). The problem is that most web server software is really inefficient. A 486 theoretically is capable of handling HN request load, it’s just not being used well.
- kingcharles 5y agoThis sounds like something a madman would do, and certainly 16-bit real mode is insane, but back in the mid-late 90s I would think a large number of Internet servers were 486s. I know I ran a major "topsite" for most of the core warez groups in around 1996 from a 486 and it handled a ridiculous number of connections. It was probably running BSD rather than Linux in those days though as I remember BSD being more stable/better performing at the time.
- slim109ya 5y agoYou sir, are my hero. I keep telling myself when I retire I'll have time for such things. I think I'm kidding myself...
- sedatk 5y agoI set up a DNS server on a 486DX2/66 w/4MB RAM running Linux 1.2.x for a university back in 1995. It had run without problems for years.
- indigodaddy 5y agoI used to run freenas on an old IBM/Cyrix chip desktop maybe as late as 2008 or 2009.. Believe it was something like 133mhz but it might have been 3 or 400mhz I just can’t remember. Also forget how much ram it had.. Amazingly freenas performed admirably for basic smb and nfs for all the time I used it..
- aidenn0 5y agoI had a P3 450MHz that ran as a server for almost a decade. Opened it up to swap a drive and noticed the CPU fan had stopped spinning. Running in a room with no A/C. That was a hardy machine. Finally sold it to someone else who intended it as a server as well. No clue how long it ran for in total...
- theyeenzbeanz 5y agoThere’s a web server out there that runs (or ran on at this point) a 68k Macintosh. I visited it years ago but sadly cannot find it.
- IntelMiner 5y agoI believe you're thinking of one of the NetBSD mirrors
- jaclaz 5y agoOnce upon a time there was the matchbox server at Stanford University Wearable Computing Laboratory: https://news.stanford.edu/news/1999/february10/webserver210.html https://news.stanford.edu/news/1999/february10/webserver210.... https://web.archive.org/web/19991128033948/http://wearables.stanford.edu:80/hardware.html https://web.archive.org/web/19991128033948/http://wearables.... >The Matchbox Webserver, which is serving this and the other web pages to you, is a single-board AMD 486-SX computer with a 66 MHz CPU, 16 MB RAM, and 16 MB flash ROM, big enough to hold a useful amount of RedHat 5.2 Linux including the HTTP daemon that runs the web server.
- huachimingo 5y agoRelated: Low Tech Magazine https://solar.lowtechmagazine.com/ https://solar.lowtechmagazine.com/ -Bisqwit's channel: https://www.youtube.com/c/Bisqwit https://www.youtube.com/c/Bisqwit
- Fnoord 5y agoHow is the power bill for this device going to be? Because my SGI Octane which I used back early 00s was drawing a lot (as did the AlphaServer DS10L), and also was a nice heater in the winter (not in the summer...). Which is why I avoid old hardware these days. Especially worth considering given current EU gas and electricity prices.
- smoppi 5y agoIt consumes about 30 watts.
- squarefoot 5y agoCheap Atom boards seem probably the best solution that doesn't cost a fortune to set up small servers without resorting to very old hardware. My home (Xigma) NAS employs a D410 CPU on a used Supermicro X7SPA-L board and does its job nicely with two RAID 1 sets. The CPU TDP is 10 Watts, plus chipset and disks; being single core doesn't seem to be an hindrance to its functionality. Hopefully ARM boards will bring even lower power figures, but they're still a bit expensive if one needs many SATA ports. The Helios64 platform looked very promising, but sadly it tanked.
- benjojo12 5y agoHow did the Helios64 Tank? I own one and it's fine?
- squarefoot 5y agoThe manufacturer stopped production and support last summer. https://blog.kobol.io/2021/08/25/we-are-pulling-the-plug/ https://blog.kobol.io/2021/08/25/we-are-pulling-the-plug/ Very sad as it was a really interesting device. https://kobol.io/ https://kobol.io/
- tentacleuno 5y agoFrom what I understand, you also wrote a mouse driver for it[0][1], OP? [0]: https://www.youtube.com/watch?v=RlDi2Ncfb9Q https://www.youtube.com/watch?v=RlDi2Ncfb9Q [1]: http://sininenankka.dy.fi/~sami/keymouse.zip http://sininenankka.dy.fi/~sami/keymouse.zip
- smoppi 5y agoYes. I wrote a special mouse driver that hooks to the keyboard interrupt and makes it possible to use the numpad keys as a "mouse". Sadly most DOS programs seem to replace the BIOS's keyboard interrupt handler with their own, so my driver does not work with them.
- rep_lodsb 5y agoI have an idea of how to keep control of interrupts without needing all the complexity of V86 mode: relocate the IVT! On 286 and above, the interrupt vectors always start at the address in the IDTR (interrupt descriptor table register), even in real mode. Intel did of course not document that :) If you do this, you can handle any interrupts you want directly, or "reflect" them to the handler installed by the DOS program. A fast technique for doing this takes advantage of segment:offset alias addresses to use the CS register as a pointer to the old interrupt vector: reflect_int: ; come from our IVT with CS bits 10..2 = interrupt number ; flags, CS and IP on stack and will remain there sub sp,2 ;reserve space for return segment push bx ;will become return offset mov bx,cs and bh,3 ;clear high bits, BX now offset into IVT push bp push ds xor bp,bp mov ds,bp ;DS:BX => vector lds bx,[bx] ;fetch vector mov bp,sp mov [bp+6],ds ;store segment xchg [bp+4],bx ;store offset / load old BX pop ds pop bp retf ;return to actual handler
- unixhero 5y agoMake sure to build a dos emulator so that you can play Prince Of Persia on it.
- smoppi 5y agoAfter the OOM handler had halted everything the 10:th time, I finally decided to do something (at least the kernel and the TCP/IP stack seem to be very stable, because it still did not crash!) I set the maximum amount of sockets to 32, the maximum amount of file handles of the DOS kernel to 40, and the maximum amount of file descriptors per one VPU process to 40. Now it should (maybe) be able to do its work without randomly running out of memory.