Sun Ultra 20

Every few years, it seems, Sun makes a noise about their new cheap workstation for developers. Until the Ultra 20, their idea of cheap and mine have been rather different. The Ultra 20, though, was interesting for a variety of reasons, in no particular order:

  • I've liked Sun's hardware for as long as I can remember. From before I went to university, Suns represented real computers. Even if I'd seen an equal amount of SGI hardware in the flesh, and SGI's hardware of the time was more impressive, I think it counted for a lot that I'd seen Sun hardware first.

  • I've always liked Solaris. I haven't used it for years now, but until GNU/Linux, Solaris was the only Unix I'd used that felt right. This can't be accounted for by primacy: I'd used AIX, IRIX, and SunOS 4 quite extensively before I came to Solaris.

  • Sun's making weekly builds of Java 6 available, and Apple still hasn't finished porting Java 5. This is a constant source of aggravation to me, and it's entirely elective.

  • dtrace(1) looks interesting and useful.

  • I may have thought I'd seen the last of the Z80, but now even Apple is giving in to the Intel hegemony, I'm going to have to learn x86 one of these days. A spiteful streak suggests that it may as well be on amd64.

  • Mac OS 10.4 just isn't as good as 10.3 was. I don't know if this is just a temporary slip-up, or if this is pre-NeXT Apple starting to outweigh the infusion of sense and taste that NeXT represented. So I'm starting to consider my exit strategy. Firefox is as good as Safari.app, Mail.app's getting worse rather than better, Terminator is as good as Terminal.app except on Mac OS, and most of the other applications I use are Java applications. The only things I know won't be easy to replace are Dictionary's New Oxford American Dictionary and Preview's handling of PDF (and even there, GNOME's evince is a significant improvement on other non-Apple PDF viewers).

So after much milling about, moving of house, and increasing of incredibly low US credit card limit, I bought an Ultra 20.

There were a few aspects of the buying process I didn't like. For one thing, the "reviews" link didn't actually have any reviews of the Ultra 20. Why draw attention to the fact that pretty much no-one cares about your latest machine? I also didn't think the technical specifications were as good as you get on Apple's site. On Apple's site it's pretty easy to see, for example, what difference the various graphics cards make. After much surfing of the web, at the time I ordered I had no idea whether my Ultra 20 would be able to make good use of a 23" Apple display. (On the other hand, Apple's specifications are full of irrelevancies such as "Simultaneous issue of up to 10 out-of-order operations" and "Advanced three-stage branch-prediction logic".)

The worst thing about Sun's store, though, was that there was no indication of availability. Just a link saying "Call Sun". So why would I choose anything but 3-5 day shipping, if for all I know it's going to be 8 weeks before the thing's even ready to ship? (If, on the other hand, it will be ready to ship in 24 hours, I'd prefer next-day delivery. So I guess I set myself up to be annoyed one way or the other) There didn't even seem to be any way to see how much the various options cost, so I just left it on the default 3-5 day and clicked "Continue".

(Sun's web site has these stupid questions at the bottom of each page trying to get some feedback on their site, but not seeming to realize that you don't want to interrupt what you're doing to answer. I would have answered a quick questionnaire at the end, but instead I started writing this.)

Anyway, without Sun ever mailing me to tell me anything had changed, a big box appeared two weeks later with a tiny little box parasitically attached to its side. The little box contained a US power cord. The big box contained an Ultra 20. One demonstration that I'm not as strong as I'd like to be later, as I carried the 20 kg box from work to the nearest light rail station and from a downtown light rail station to home, and I had my first reason to use the very sharp cleaver a friend gave me when I moved in. The same person was scared of a blunt martial arts demonstration weapon I have, but thought nothing of handing me an evil little device that would kill you as soon as look at you.

Hardware set-up
My original plan was to use my 23" Apple Cinema Display, and then either switch to using the Ultra 20 headless, or get another display so that the PowerMac and Ultra have one each. It wasn't going to be that easy. It doesn't appear that the NVS280 card in my Ultra can drive the 23" display. And when you boot, it's in some weird DOS-like text mode. I know this because I borrowed a CRT from a friend in the next block. Damn near dropped the thing, too. Not only could I usefully be stronger, I could usefully dry my hands after tae kwon do class to make them less slippery. The first thing I tried was connecting to the on-board graphics' VGA connector, on the assumption that we'd be in some kind of text-mode installation process that wouldn't be able to drive the NVS280. No output. I vaguely remembered something from what little I know of PC hardware about graphics cards having boot ROMs, and wondered if the NVS280 was announcing its presence and disabling the on-board graphics. The trouble being that the NVS280 only has dual DVI outputs. Luckily, I had a DVI-to-VGA converter lying around from my unused Mac mini, so the Ultra's currently connected to the CRT like that. So beware if you don't have these bits of kit lying around.

Mouse and keyboard, both USB, were trivial. The Ultra's X11 server seems happy with keyboards and mice being disconnected and reconnected, though the console got upset when I booted without a keyboard and later attached one. With an Apple keyboard, the kernel always complains "WARNING: No usable keyboard alias!" on boot. No idea why.

The mouse that comes with the Ultra is nice enough. It feels cheap, but it works much better than Apple's latest effort, and it's not too ugly, and it doesn't have any writing on it (something which really puts me off most mice; I always resent advertising after purchase).

The Ultra 20 is actually more attractive in the flesh than the pictures on Sun's web site would have you believe. The joins between the various panels are poor, especially when seen next to a PowerMac G5 with its near-perfect joins. And I think the front of the case should be larger than, not slightly smaller than, the rest of the case. That and the bevel leave a vague impression of prepuce. And the green power LED is way too bright. It lights up the whole room at night, projecting on to the facing wall. First time I have the case open, I may take the opportunity to disconnect that.

Solaris installation
There's no Solaris CD, but it's already installed and just wants to run through its text-mode configuration program. It's okay. Not as good as Mac OS, but better than Debian. It didn't ask me any questions I didn't even understand (as Debian often does), and it worked most things out for itself. I stupidly misinterpreted its question about DNS as asking whether I wanted to use a DNS server rather than whether this machine would have an entry in DNS. Fixing this was a bit awkward because I had to fill in bogus information until I got to a stage that let me confirm or go back.

You're not asked to create a user. Presumably they assume that people don't use Solaris at home and will be using NIS or LDAP. So I was left logging in as root and subjected to the extreme slowness (and non-obvious usefulness) of smc(1). I'm not sure how that was supposed to be any better than using the command line. I ended up manually editing /etc/passwd anyway so I could have bash(1) rather than sh(1) and because there seemed on next reboot to have been some confusion between /export/home/elliotth and /home/elliotth.

I also wasn't asked for a machine name. I assumed that hostname(1) was what I wanted, but it isn't. As explained here, I needed to echo the name to /etc/nodename to change my machine's name from "unknown". Again, I guess they don't expect many home users.

I might have to give in and learn about setting up DNS. Turns out I can't reserve IP addresses for MAC addresses on my NETGEAR's wireless interface, just on its wired ports. So while I can get by with /etc/hosts entries for the Ultra (which is wired), it's no good for my other machines (all of which are wireless).

Solaris 10
The first command I run on new hardware tends to be ping(1). Solaris' traditionally terse "www.google.com is alive" made me laugh. "Ah, Solaris. We meet again." They should fix that, though.

They should also use up-to-date GNU versions of find(1), tar(1), and make(1) [GNU make is called gmake on Solaris, and is even more hidden than make itself], and include Firefox, Ruby, and Subversion.

Sun's make(1) still lives in /usr/ccs/bin, but since the last time I used Solaris (Solaris 2.6, I believe), /usr/sfw/bin has appeared. So although the default path makes it look like you've got no C++ compiler, fear not: GCC 3.4 is hiding away somewhere. There's Mozilla in there, but no Firefox. Python, but no Ruby. gnome-stones but no Subversion. This is, after all, a developer workstation.

Luckily, it's a pretty fast build machine. And one thing that really stands out is the I/O performance. Maybe not so much if you're used to Linux/IA-32, but if you're used to Mac OS/PowerPC, it's almost shocking. (I'm not just talking about the PowerBooks with their pathetic buses, either; my dual G5 sucks at I/O too.) I bought the middle of the three models, and it's currently my fastest build machine at home or work when it comes to building my various Java projects.

Despite Jobs' claim that Apple would have the best Java anywhere, this is a cheaper machine than my PowerMac, and it builds faster, runs faster, has a much more recent version of Java, and can run the weekly builds of the not-yet-released version. Apple's Java's performance and correctness is very mixed, and there's no sign of a proper release of 1.5.0 even now. (And Mac OS 10.4 is rather ropey. I've been reading my mail via a webmail system all day because Mail.app keeps crashing when I'm replying, without even bringing up crash reporter. Fuck that. Apple may have got a lot of things right that no-one else has, but that's not a license to go round fucking up other things.)

Rumors of the Ultra 20's extreme noisiness were unfounded. I can't hear it over the American refrigerator even when it's building. It makes quite a racket as it powers up, before the software can get the fans under control, but no worse than my PowerMac.

The Java Desktop System, while it still offends me that it contains so little Java, is better than anything Debian's ever managed to offer me on Linux. This is probably what GNOME is supposed to look like. The window manager is perhaps the ugliest I've seen since twm(1), but it's nice to have menus that aren't full of crappy old Athena programs that no-one uses and six different web browsers, three of which are the GUI equivalents of broken links, et cetera. I guess I now need to learn how to integrate my Java programs with GNOME.

If you chose a UTF-8 locale when installing, as any right-thinking person would, you'll be offended by an ugly "language input window" attached to the bottom of the focused window. It usually says "English/European", but actually turns into a menu if you press on it, and lets you choose a different input method. Anyway, here's how to turn it off, though not for Java applications, annoyingly enough. I don't know why I don't see this on Linux, where I also use a UTF-8 locale.

Terminator needed a bit of hackery, both to fix the make rules so that we can build JNI libraries on Solaris with GCC, and so that we get Solaris' unusual STREAMS-based terminal handling to behave like everything else. Everything else was fine, as you'd expect from Java.

My friend the Solaris sys admin suggested blastwave as a suitable replacement for Debian's apt-get. I'd found where Sun had hidden GCC, and I'd already built my own make, Ruby, and Subversion, but I balked at building my own Firefox. I followed the instructions linked to in this paragraph, and installed firefox, top, and ethereal. I wasn't tempted by their packages of GNU utilities because they prefix the binary names with 'g', as in "gtar", "gdiff", et cetera. Manually renaming them would seem to defeat some of the purpose.

I initially missed the blastwave equivalent of apt-get upgrade, the unsurprising pkg-get upgrade. Thanks to Joseph Ottinger for setting me right, and for not rubbing my nose in my inability to read documentation, guess, or try --help. Given that, I've dumped my home-made Subversion for the blastwave package. The blastwave Ruby package seems to think it's build with a libruby.so which isn't supplied, so I've gone back to my home-made copy (which doesn't have a libruby.so either, but doesn't think it needs one). I've reported that to the package maintainer. I'm also still using a home-made make(1) because I need 3.81, which is still in beta.

My friend the Solaris sys admin told me when I was having trouble backing out of the blastwave ruby package that the equivalent of apt-get remove is Sun's pkgrm(1), which means you need to have paid attention to the underlying "PKGname" rather than the package name used on the pkg-get(1) command line.

I haven't spent this much time logged in as root since 1995. Not having sudo(1) isn't quite as criminal as it would be to not have ssh(1), but it's still strange and unpleasant. blastwave offers a sudo package, but I haven't tried it yet.

Anyway, a day's work and I have a usable machine. And as far as I can tell, a pretty good machine. I think the main thing standing in the way of it becoming my main machine at home is its inability to drive a big display.