Nicole Valentine asked me about turning an 8 megabyte PowerMac 7100 into a non-dedicated web server. Fortunately, she has ISDN, so she doesn’t have to deal with all the vagaries of a serial modem connection, and can work with the reliability and robustness of the built-in Mac Ethernet software.
I’ve had other questions about this as well, so I decided to tell her more than she wanted to know and put the whole thing up for the world to see.
“Non-dedicated” means that, not only is the Mac serving to the net, it’s also being used as a normal production Macintosh for spreadsheets, word processing, and net surfing.
You want to use your home, eight megabyte Mac as a web server?
Well, you’re going to find it a tight fit. I ran a non-dedicated 8 meg Mac IIcx when using System 7.1. I haven’t tried it with system 7.5, but in fact it worked surprisingly well. There are some people who claim that everyone, even the normal user, needs at least 24 meg. Apps are taking up more memory than they did two years ago when Cerebus the Gopher was a dinky old Mac II. However, they aren’t taking up that much more memory, and you can in fact run a Pretty Good Webserver in 8 megabytes.
Yeah, right. How?!
- Look into MacHTTP rather than WebStar; besides being cheaper, it claims to be able to run with only a little over 1150k. WebStar claims at least 1250k, and that 100k is going to make a difference when you haven’t got much to begin with. If the choice is WebStar or 16 Megabytes of memory, my personal choice is the memory—the $400 difference in price will easily pay for two 4-MB chips.
- You might also try NetPresenz. Besides allowing you to serve via FTP and gopher, it seems to generally use less memory. It actually prefers 1000k, freeing another 150k for your other apps. (Version 4, the latest, will do CGIs.)
- Don’t buy any overloaded apps to use on your computer. Unfortunately, you’re probably going to have to use Netscape, just so you can check out your pages. But you may find it easier to use MacWeb for general testing and netsurfing—it uses many a megabyte less memory. And stay away from Microsoft Word: besides being a memory hog, it also adds lots of junk to your system folder and, in my experience, drastically reduces reliability. I’ve found ClarisWorks to be an admirable word processor, database, spreadsheet, and page layout package. BBEdit Lite 3.5 is a great small text editor, with HTML extensions available. Microsoft Internet Explorer, on the other hand, maintains a relatively reasonable memory footprint.
- Whenever you buy any software, make sure you find out beforehand how much memory it uses. Then, do an “About This Macintosh” on your webserving Mac and see if enough is left to actually run the software.
- Go with PowerMac Native apps, and turn Virtual Memory on—to 1 Megabyte extra. I’d prefer to be able to turn VM on to 0 megabytes, but it isn’t an option. VM allows only the useful parts of the software to be loaded into memory, and memory requirements go down. MacHTTP, NetPresenz, Clarisworks, Netscape, are all native. The memory requirements I’ve mentioned above all assume that you have VM turned on.
- Be careful when paring down memory. Some apps, especially the memory hogs you’ll be most tempted to pare down, become unreliable if you go lower than the “recommended” setting, even if you are still higher than the “minimum” setting. Netscape, for example, claims to be able to run in 1784 kilobytes. I’ve never had any luck running it in less than 3000 kb. (And that’s with VM turned on—on a PowerMac without VM turned on, it’ll take 4000 kb.)
- Drop your disk cache (use the Control Panel, Memory) down to 64k or 128k. It can go as low as 32k, but that’s probably too low.
- Stay aware of how much memory your CGIs use! CGIs don’t take up much memory—200k is a lot for an Applescript CGI—but if you happen to be filling up memory with your other apps, and someone chooses your CGI, there may not be enough memory left to load it! So keep an eye on your remaining memory, and make sure that there’s always enough to load up one more CGI.
- If time isn’t a factor, and you’re using MacHTTP, consider saving your scripts as text only, with the “.script” extension, and then allocating another 100k or so to MacHTTP. Your scripts will now use MacHTTP’s memory allocation. If you’re using WebStar, don’t do this, because WebStar’s “.script” support is a vestigial remnant of MacHTTP’s, isn’t supported, and is slated for the axe in future releases.
I don’t believe it.
Here’s an example of what you can expect each item to use:
Software | Memory | Running Total |
---|---|---|
System 7.5.1 | 4165 | 4165 |
NetPresenz | 1000 | 5165 |
BBEdit Lite 3.5.1 | 450 | 5615 |
ClarisWorks 4.0v2 | 1400 | 7015 |
Remaining | 1181 |
Which leaves room for up to five concurrent 200k Applescripts or other CGIs. That 4165 looks like a lot. I may have to dig through my System Folder and see what’s taking up all that space. Our 7100/80 at school has less then 3000 kb once you subtract the monster cache we give it. If you can drop your system folder down to, say, 3200 kb, that’s an entire other application you can have running at the same time as everything else!
Other application memory requirements include the following. Note that, with only System 7.5 and NetPresenz running, you have 8196 minus 5165, or 3031 kb left over.
Software | Memory | Free Memory |
---|---|---|
GraphicConverter | 3000 | 31 kb Careful! |
Netscape | 3072 | Pare it to 3000 and pray! |
MacWeb | 2048 | 917 kb |
Examples
Scott Koziki is going even further out than I am: a five megabyte (albeit dedicated, I assume) web server:
I’m using a IIsi with 5Mb (!) of ram (16 using VM) to serve a site. It’s running NetCloak, MapServe, sometimes the admin.acgi, and a custom AppleScript that changes logs out on the fly. It gets beaten to death (30 connections at a time, constantly, 24x7) and has never crashed (except with the NetCloak problem, but that was an easy fix). According to my logs, this tiny server has served over 2Gb in about 2 months. We nicknamed it Rocky. =)
- Case matters on the web
- When you use a Macintosh, you’re used to things being relatively straightforward and simple. The web, unfortunately, is based on a strange set of standards where Occam’s razor is a bloody and dull weapon.
More Information
- Eudora Internet Mail Server
- Eudora Internet Mail Server is a simple mail solution if you don’t want to fiddle with postfix or sendmail, and don’t want to get the full-fledged Mac OS X Server. EIMS has a long history of serving mail from Macintosh computers, and, as MailShare was one of the first, if not the first, easy to use mail servers.
- Eudora Lite
- Eudora was a free e-mail program for both Macintosh and Windows. It is easy to use, contains powerful filter capabilities, identity authentication, and is generally the best choice other than paying for Eudora Pro.
- MacPerl
- Matthias Neeracher has ported Perl to the Macintosh, and it is extremely useful—MacPerl is much better than Applescript at munching through text files and folder structures. If you want your programming activities on the Mac to be able to carry over to the Unix world, this is the scripting language to use. Best of all, MacPerl is free. It is also blindingly fast.
- NetPresenz 4.1
- If you need a server for an old Mac, you can hardly go wrong with this web, gopher, and FTP server. It makes use of your “Users and Groups” so that you don’t have to make up different usernames and passwords for NetPresenz. Just use the same ones as you already have. (Somebody please tell FileMaker Inc about this “innovation”.) Netpresenz also supports CGIs, Server-Side Includes, and automatic binhexing.
- Sound Effects
- SoundEffects is a great, inexpensive sound editor. It allows you to write your own “plug-ins” to modify the sounds and comes with a wide variety of sound effects (hence the name). Sound Effects is a mere $15.00 shareware and makes some cool stuff.
- SoundApp
- SoundApp is a free sound converter and player for the Macintosh that converts between a wide variety of sounds. Useful for converting sounds from Mac format to web format.