Aug 14 2009

Leaving the Daemon

(Despite the title, this is a technical screed, not a religious one.  You have been warned.)

I started using FreeBSD about ten years ago.  A new client had it on his web servers, and I was impressed enough by it to start running it on my own machines, including my desktop.  In the late 1990s, the various Linux distributions were like fraternities making floats for a Homecoming parade: they turned out some impressive work, but you had to put up with a lot of drunken brawling to get there.  I bounced from one Linux distro to another, never really satisfied with any of them.  The BSD community seemed more mature (I saw a poll once that said FreeBSD developers were ten years older on average than Linux developers)  and it showed in the software.  I liked the stability of the software and the release process and the way it was all designed.  It just seemed like the free Unix operating system (OS) for grown-ups.

That was a different time for web developers, though.  Even though our end product was displayed at the client end in a web browser, most of our work was done at the server end.  Javascript and Java existed, but no one did much serious work with them.  If you needed interactivity, you did it on the server with CGI, and later perhaps PHP.  People clicked on a link, the calculations or searches or whatever were done on the server end, and a new page was sent.  To test your work, all you needed was a web browser that could show text and images.  Anything else, like video, was downloaded and played in a separate program.  So it made sense for your development machine to be more like a server than a desktop—basically a web server with a browser installed on it.

Times have changed.  Now there’s Flash all over the place, and Javascript has developed into an actually useful tool, especially since the introduction of Ajax, which allows you to update parts of pages dynamically without reloading the whole page.  There are new programs like SIFR, which combines Javascript and Flash to provide improved fonts, since web browsers feature about a half-dozen.  I think we’re just scratching the surface of how some of these tools can make web browsing better.  Even if you don’t program these things yourself, you won’t stay in the web programming game long if you can’t stick them on people’s pages and make them work.  And the new hardware that’s constantly being created for putting those things on the screen has to be supported by whatever OS you have on your development system.

During that same time, things on the server end haven’t changed much.  While web browsers went through several versions and added loads of new features, the Apache web server went from version 1 to version 2, the perl language went from 4 to 5, and so on.    Most web servers look a lot like they did ten years ago.  So it’s been a lot easier for platforms to keep up on the server end than on the client end.

All this means that over the last ten years, my workstation has had to become more like a typical client system, and less like a web server.  I need to be able to see all the stuff that might be on a modern web page—and see it like everyone else sees it.  And I need to be able to do that on new enough hardware that I’m not always waiting for it to do things.

Unfortunately, that has been getting harder to do with FreeBSD.  While hardware manufacturers like Nvidia and closed-software makers like Adobe have finally embraced Linux, they treat BSD now like they treated Linux ten years ago, releasing drivers and software for it sporadically and slowly, if at all.  So getting FreeBSD to work smoothly with your new 3D video card or onboard wireless networking has become a challenge; you almost have to pick your hardware from an approved list the way we used to have to with the commerical Unices like SCO.  Even more unfortunately, some of the things that are flaky or unavailable on BSD are exactly the things I need in a web development platform—most notably Adobe’s Flash.  Adobe Air is also growing in popularity and remains unported to BSD.

Despite all that, I was planning to stick with FreeBSD and upgrade it the other day, from 7.1 to 7.2, and do a complete clean reinstall.  I hoped that might work out some of the kinks I was having with Flash and Firefox crashing a lot.  Two things changed my mind.  The first was some conversations on a FreeBSD group, where some of the old hands whose names I’ve seen there forever were saying the ports system (the primary method for installing over 17,000 different available pieces of software) has gotten out of control.  It’s been developing dependency issues like RedHat Linux used to have back in the day, where every time you install or upgrade something you might break something else, until eventually you’re afraid to touch anything.

The other thing was the way FreeBSD people tend to react to complaints about missing features like the latest Flash plugin or support for a piece of hardware.  The reaction is usually, “So get involved and fix it.”  That’s fair enough, because FreeBSD is very much a community-supported operating system, and it needs its users to get involved in development, even if it’s only by sending good bug reports.  I’d love to do that, but I’ve already got a dozen other open-source software projects I’d like to help with if I had time, so I know it’s not going to happen, at least not right now.  Right now, to get my work done without the distraction of fixing the tools, I need a platform that just works—especially as a web client.

All in all, I decided to try something different.  I’d load it on my second drive, and if I didn’t like it, I’d swap my FreeBSD drive back into place, no harm done.

So I downloaded Ubuntu.  I’ve heard good things about it, and it looked like a solid package.  It doesn’t even have a cool mascot!  I downloaded the install disc, burned it to a CD, backed everything up twice, and shut down to start the upgrade.  That’s when my system wouldn’t start and I spent half the night finding the problem.  When I got it going the next day, I discovered that the install disc image had a bad file in it.  Since I had to download a new image anyway, and I was going to be down to 1GB of RAM, I downloaded Xubuntu instead.  It’s the same operating system, but installs the lighter-weight desktop manager XFCE instead of the heavy Gnome.  Since I’ve been using the even lighter WindowMaker for years, that sounded like a good idea anyway.

So far I’m impressed.  The installation was smooth and simple, and installing more software has been easy and fast.  Setting up services like Apache and Qmail (still gotta have my server stuff) took a little longer than it did on FreeBSD, but that was because things went in locations other than the ones I’ve memorized.  Most importantly, things like Flash and Adobe Air work, so I can test web pages properly and use new social networking apps that will help me in my work.

I’ve run into a few problems, like the network manager not saving my static IP address.  I fixed that by removing the fancy GUI network manager and putting two lines in rc.local to bring up the network.  I’ve also noticed that it doesn’t seem to multitask as well as FreeBSD did.  If one process is hammering the CPUs and filesystem, like a big compile, other things slow down and get choppy—not as bad as they do on Windows, but worse than FreeBSD.  But I won’t know how much of that is due to having half the memory until I add more RAM.  I’m using nearly 1GB of RAM for all the programs I have running, which means the other 1GB I used to have could be used to cache files.  That can make a big performance difference when you’re hitting the filesystem hard.

I still think FreeBSD is an excellent server platform, and I’d certainly be using it if I owned any web servers, but that doesn’t make much sense these days when you can rent web space for a few bucks a year.  I wish it did make sense, because I’m sad about giving it up after all these years (and now I don’t know what to do with my domain), but it was time to switch.  If Xubuntu works for ten years as well as FreeBSD does, I’ll be very happy.

If you enjoyed this article, why not rate it and share it with your friends on Twitter, Facebook, or StumbleUpon?

GD Star Rating

WordPress Themes