On Solaris

Over the years that I’ve been developing on unix platforms I’ve come in contact with quite a few… Linux (from 2.2 upwards), FreeBSD (version 4 upwards), Solaris (8, 9, 10 on both SPARC and x86), OS X, AIX, HPUX and even VMS. Even though I’ve come into contact with these I’ve not really gotten to spend some real quality time with them other than Linux, FreeBSD and OS X.

Since starting at Joyent it was obvious that I was going to be spending quite some time with Open Solaris (nevada) on x86 and there’s several things I’ve come to love:

1) SMF

SMF is the Solaris service managment framework and it maps to the functionality of things like init, launchd and the like. SMF will do automatic service restarting, loading of services in dependency order, provides built-in logging and hooks in with monitoring and notifications. You can add new services easily by creating your own XML manifest and have your own user daemons managed by a fantastic tool. To find out more about SMF, visit Solaris’ Managing Services Overview.

2) ZFS

ZFS, the Zettabyte filesystem is a real treat. It combines logical volume management and a filesystem into one so that you can increase the size of your filesystem easily. This in itself would be a great task, but add on top of this the ability to create instant snapshots, the ability to rollback quickly, block level replication, raid, block level de-duplication, ability to send and receive ZFS datasets and do de-duplication over the wire and many many more things. I’ve also had the benefit of having much of the underlying design explained to me and there is so much more that it is capable of. I’m really looking forward to seeing what will be developed on these internals. A great place to start looking at ZFS is with an Introduction to ZFS Pools.

3) Jumpstart

Jumpstart is the Solaris way to do automated installs, similar to how Redhat’s kickstart works. Now there’s nothing new to this, I’ve done custom automated installers before for debian based systems, so why do I like it? Well, it’s the simplicity and flexibility of it that I really like. All it requires is 2 files (a profile and a sysidcfg), and addition of that profile to a rules file in an NFS exported filesystem. That’s it! If I require doing more work, I just add a path to a script in the rules file and on it will go. I love when these tools don’t attempt to second guess you and you end up having to go through hurdles for something that is generally painful and time consuming to test.

4) DTrace

DTrace is heavily used within Solaris 10, from the kernel, through to libc, solaris libraries and all the way up. This means that I can do crazy things like check on a currently running daemon, looks for all instances of a particular system call and then look to see all the file activity that goes with that. Once done, the running daemon just keeps on going like it was before. This means I can do debugging and performance analysis on live production systems without having to bring them down. DTrace is what powers the fantastic “Instruments” application on Apple’s OSX developer tools, so you can easily have a play with watching stuff using a GUI application. Check out this less technical introduction to DTrace.

There are many more things that I like about Solaris, but these are the main ones that I’ve been spending quality time with. This isn’t to say that there aren’t times that I’m not smacking my head off my desk, but after a week or two, I got used to the userland, and with a month or so I started to get used to how the base level OS and startup, etc. was put together. When it comes down to it Solaris is still unix, it’s just a little different than others, in the same way that FreeBSD is different than Linux.

I’m hoping some of my fellow Joyeurs will chip in with the things that they like about Solaris, so make sure to check back for more Solaris awesomeness.

Till next time,

— Scott M

6 Comments on “On Solaris

  1. Scott,
    nice summary. I’m also a fairly recent convert, but the lack of information coming out of Oracle since the acquisition is driving me nuts.

    Do you have any insights on whether OpenSolaris is dead or dying?

    • Oracle makes a huge quantity of money (some indicate most) off of running Oracle applications under Solaris.

      Any suggestion that Oracle is not going to continue advancing Solaris or OpenSolaris is a akin to someone suggesting that Oracle bought Sun in order to commit suicide to their own financials by killing Solaris.

      Clearly, any such thought process is irrational, no one in their right mind would suggest such a thing.

      Only people fearful of an invigorated Solaris/Oracle framework are suggesting such thoughts… in order to make some money before they get sorely pressed in the marketplace from a stronger company.

      A fiscally weaker Sun Microsystems is no longer the Achilles’ heel of Oracle. Solaris is one of Oracle’s finest crown jewels – if there is anything to feel secure about in the industry, it is about the future of Solaris.

      • The problem is that he was talking about OpenSolaris, not Solaris.

        Ok, Solaris is still alive and closed. But Is OpenSolaris ?

      • Solaris is not really Closed, it is based upon OpenSolaris. OpenSolaris is just the next version of Solaris.

        People making distinctions are really trying to cut hairs that are just too thin to see.

        If there are a few pieces of code in Solaris that original rights retainers refuse to open-source, then those pieces will continue to be re-written in OpenSolaris. Once production quality, they can replace (and have been replacing) the closed source code that the rights holders refuse to offer up (at any price.)

        Furthermore, since Solaris is based primarily upon Open Standards, open source code alternatives which do not advocate Open Standards are far more closed & proprietary than the alternatives… because proprietary API’s, even if they are open-sourced, cause application lock-in.

        It is healthier to have open and closed source systems both competing to meet Open Standards than it is to have only closed source systems meeting open standards while people go to open source systems for proprietary API interfaces. In the end, application lock-in will destroy the communities. (Yes, I have basic scripts which work on multiple *UX platforms that will not run under some open source operating systems because basic Open Standard API’s are not adhered to.)

        An API which may have been written in open source, which can be changed at the whim of a developer, destroying compatibility, negatively affecting million of applications is not Open – it is Closed. This is how Microsoft Office products took over the Desktop applications market and why people pushed toward Open Source to begin with. (Microsoft provided Windows betas to developers of desktop application suites, change the API’s for the release, and only Microsoft Desktop Applications worked… wiping out all of the other desktop application suites in a matter of months!)

        Open Source is not necessarily Open. Closed Source is not necessarily Closed. Open and Closed Source are both means to an end: Open API’s for application programmers.

        Open Source is not Open, in and of itself – without understanding history and how we got here, it is difficult for some people to get a grasp around this truth.

        Open Source is merely a mechanism to keep vendors honest about their publshed API’s… and Open API’s provide a standard way for people everywhere to compete and build meaningful applications at a higher level – this benefits the world community.

  2. I’ve been using ZFS for my personal datasets, but this past week I’ve really come to appreciate how ZFS helps me manage the system. So I’d add “Boot Environments”, beadm, to the list. When I updated my file server to an unstable onnv_142, it created a new snapshot of the root filesystem, and added a GRUB boot menu entry. I can choose which version of the OS I want at boot time. Since ZFS is copy-on-write, different versions of root take up a small amount of space, maybe 300MB at most. You can create a snapshot of your boot environment instantly, on a busy system. So you can always roll back. I forgot to do this once, got really wedged, but couldn’t wipe my system and start over. So I did a clean install on a virtual machine on my Mac, and used ZFS send/receive to upload that clean install to a new boot environment on my server. It worked!

    There are so many tricks, the sum greater than the parts. And we haven’t even mentioned Zones yet!

    So I don’t think OpenSolaris is dead. Clouded. Troubled. Too good to fail!

  3. I agree with a previous post with regards to lack of information from Oracle. I don’t understand Oracles motivation to alienate passionate supportors/users of solaris. Being an outsider, my view is the opensolaris community has stagnated.

%d bloggers like this: