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 portsreview.info 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
loading...

4 Comments

  • Michael S says:

    A few years back when Win 98 reached EOL the drive in my wife’s PC crashed. The system was an HP eVectra mini-desktop that had limited RAM and CPU.

    After replacing the drive the next decision was what OS to reinstall. Win98 didn’t make sense, and I wasn’t too keen on the price of an XP license. So a linux distro made sense.

    I had been using Fedora on the server side for a while and was fairly comfortable with their desktop installs — but only because I knew what was under the GUI. My wife did not.

    I’d read some reviews about Ubuntu in Linux Journal and decided to give it a try. The 6.06 release (Dapper Drake) was the version available at the time.

    Install was smooth and other than a few minor issues with getting multimedia setups working to my liking there have been few complaints — a few websites that insisted in IE instead of Firefox and a favorite Win32 Bridge game were the primary ones. The IE issue went away eventually and I was able to get the game to run pretty well under Wine (with one small audio caveat).
    My wife’s needs are minimal, so Firefox, Pidgen and Thunderbird handle her online chores and Rhythmbox handles the iPod management just fine.

    As releases come and go each upgrade adds more polish, and save one brief video issue with the Hardy Heron release there’s been little to complain about.

    My work laptop is set to dual boot and Ubuntu is the linux distro I run on it. Except for the very early releases (where the wireless drivers were an issue) Ubuntu has worked extremely well on the Dell Latitude D620. When I’m doing field work and need quick network connectivity I’ll boot into Ubuntu frequently rather than suffer through the laborious XP startup routine.

    There’s a good reason why Ubuntu (and derivitives) are the non-MS distro of choice on most of the new netbook devices. As these become more prevalent I’d not be suprised to see a marked increase in Ubuntu’s OS market share on the desktop as people become more comfortable with it

    GD Star Rating
    loading...
  • Gerard L says:

    (Preliminary sidenote: interesting blog – I too love the Latin Mass and the BSD operating systems.)
    At the moment I am happily running FreeBSD 7.2 on a Debian 64-bit host, using the exceptionally brilliant KVM virtualization technology. I can’t recommend it highly enough. The speed of clients running on the host is near native. It gives you the best of all possible worlds. Together with FreeBSD I have Windows XP Pro and Slackware Linux guests running. CPU is an Intel Dual Core Quad 6600 and memory is 4GB. I intend to put a how-to up on the web but feel free to mail me for help in setting this up. You would probably get away with 2GB of RAM but one thing you won’t get away with is not having a processor with virtualization extensions. ALl the best, and keep up the good work defending and explaining our beautiful faith.

    GD Star Rating
    loading...
    • Aaron says:

      Thanks, I’m planning to try that when I get my new RAM. I could use a Windows client for checking web pages in IE, and it’d be nice to have access to some FreeBSD tools I miss.

      GD Star Rating
      loading...
      • Gerard L says:

        The secret is to install the bare minimum on the physical host. With Debian I installed nothing when prompted during initial setup – not even standard system, and certainly not desktop environment. When you first log in then do an aptitude update and install the software you need to run a KVM host – xorg, kvm, bridge-utils, uml-utilities, samba, openssh, fluxbox, rdesktop, sudo, vim, and a few other things I don’t remember off the top of my head. The important thing with Debian is to install everything from the repositories – no need for the latest KVM source. KVM-72 which comes with Debian Lenny is ultra stable and fast. I use my physical host as a Samba server as well and create a virtual bridge for the guests – that way all OSes have access to my data. I didn’t want to put my data on a guest because it’s easier to recover on a physical host if something goes wrong.
        Replace eth0 configuration with br0 configuration in /etc/network/interfaces to create a virtual bridge.
        Create a guest “hard disk” in /home/aaron with the following command as standard user:
        kvm-img create -f qcow2 freebsd.img 22G
        Then install your FreeBSD OS – I haven’t worked out how to do this as a standard user yet so you need to su or sudo:
        sudo kvm -hda /home/aaron/freebsd.img -cdrom /dev/cdrom -boot d -m 1024 -std-vga -net nic,model=e1000,macaddr=00:0e:0f:47:e0:34
        This will boot your FreeBSD cdrom and start the installation on the disk you created earlier; it will give the OS 1024 megs of RAM, a network card with a unique (made-up) MAC address, and a standard VGA card. Once installed just change -boot d to -boot c to boot from virtual hard disk.
        Once installed you can add -nographic to the command and SSH into the guest OS instead, so you don’t have a slow console hanging around. For Windows OSes I use rdesktop which gives native speed.
        Hope this helps.
        Gerard.

        GD Star Rating
        loading...

RSS feed for comments on this post. TrackBack URI

Leave a Comment

*

WordPress Themes