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:
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.
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.
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.
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