Sunday, March 23, 2008

Twisted on Solaris: Fail

No, this isn't the fail blog, but right now it ain't the supper happy dev blog, either. Let's do the Good first:


To mis^H^Habuse Wind In His Hair's quote from Dances with Wolves, here's what I say to Sun: Do you see that I am your fanboy? Can you see that I will always be your fanboy?

As I said to Glyph last night while Solaris was installing on my iMac, I have the fondest memories of Sun, SunOS and Solaris. It ranks right up there with the time I spent on the Kaypro II CP/M machine as a kid in the early 80s, and far more special than the considerable time I spent on VAX/VMS machines at APSU and UMASS in the mid 90s. I remember doing physics projects in Mathematica and creating the first site for my web design business in '96 on SunOS 5 machines at UMCP. It felt real and solid... and it was exciting. After using SunOS, I rarely touched a PC. Even my early Linux experiments were just that: hacking ethernet drivers so that Slackware was usable for me (it was a couple years before I was running Mathematica on Linux :-)); it was the Sun machines I used for the real work.

So yesterday, once the install finished and I started up a CDE session, you can imagine my nostalgia :-) In case you can't, I took some pictures to remember it by... I'm gonna miss the CDE when it goes :-( It was great being back in these Motif stomping grounds, iconizing windows to the desktop, tweaking the environment in the same old ways. I look forward to the possibility of more of this in the near future.

As for add-on software, those Sunfreeware guys are both still at it and still insanely awesome. What would I ever do without them? I"ve been using the packages at this site almost as long as I've been using Solaris. This may be a question for the Lazy Web, but can we get an apt-get for Post-OS-install installs are so slow, due to the manual pick-and-choose-and-download-and-unzip-and-pkgadd... honestly. Oh, wow -- after some digging, I just discovered that this already exists. (doesn't seem to work with Sunfreeware; does work with the old SunSite/ibiblio hosts, though).

Thanks to Sunfreeware, I had Python 2.5 and Subversion up and running in no time, co'ed Twisted and the Divmod code base, got Combinator installed, and started running Twisted test suites. Quick Combinator plug: with just four commands (2 per repository), I was on branch-management easy street. If you're using svn, Combinator should be your best friend...


You already know the big-bad, since you can see the title of this post :-) Twisted unit tests had 3 failures and 66 errors. Given that this represents about 0.07% and 1.59% of the tests, respectively, that's not too bad. The errors were higher at first, but my pyOpenSSL build was pointing at the wrong libs; there were obvious improvements once I pointed to the right libs.

Solaris x86 doesn't seem to perform as well. This matches the stories I heard a couple years ago, so I'm not that surprised. Solaris has a proven track record on Sparc; high performance on x86 may be a ways off. I ran the Twisted test suite on a VM install of Solaris and Ubuntu in Parallels (and thus both using identical hardware). During each test run, I left my machine alone, so there were no resource drains (or differences in utilization) either from the VM or Mac OS X.

Ubuntu 7.10
real 3m25.151s
user 0m54.655s
sys 1m22.189s

Solaris 10
real 5m32.329s
user 1m17.935s
sys 0m37.875s

As you can see, Solaris x86 runs a little more slowly. Once the test errors are addressed, it will be interesting to see if there is any change.


It seems that one or more of the partitions started filling up towards the end of the tests, so several of the errors were exceptions.OSError: [Errno 12] Not enough space. During the install, I just accepted the default partitioning that Solaris offered for the 32GB Parallels virtual drive, so this is going to need some tweaking. For starters, /tmp is way too tiny, especially since that is what is used for package installs (unzipped temp files). Likewise / is way over-used; I should probably put /usr on its own partition.

However, the point is not to blow the dust off my old sysadmin skills, but rather that a default install isn't actually a proper environment for developers. If Sun wants devs to be able to jump right in and get going, then they need to either provide a better default or, if there is one, make it more obvious how to get to that default.

What's more (less?), when attempting to run the unit tests on Solaris, I kept getting GUI popup error messages saying that there were too many processes open and I should close some applications. I didn't dig at all to see which resources were limited; the purpose was to just get a complete test suite run, not do log file forensics and discover the source of the issues (which I hope to do in the future). I had to close all windows, save the terminal where I was running the tests.


So, what have I taken away from all this? Possibly the following:

  1. Sun needs to put some resources into integrating the work that has been done with pkg-get; user communities thrive on easily available software, and developers count on it.
  2. If I'm going to seriously consider using Solaris as a development platform, I need to start hanging out on the forums, get back up to speed; I'm sure there's lots of good stuff out there that simply hasn't gotten any exposure.
  3. Similarly, I'm going to have to do some Solaris brush-up and then uncover some best practices -- using/adapting those that are extant, or creating new ones where there is a need.
The last two would be an investment on my part, but if Sun is serious about the Python community and supporting Python on Solaris, I'm willing to give it a shot.

So what's next? If that mythical entity "free time" truly does exist, I'm going to take a deeper look at Twisted on Solaris and start identifying the problems. I'll probably explore some system setup best practices too, and see what it would take to get pkg-get to support

Technorati Tags: , , , , , ,


Unknown said...

We are indeed working on a better out of the box environment for developers and others who might be more used to what Linux has now been providing for years. The project is OpenSolaris, and while it has a ways to go before it's "enterprise-ready" (IMHO), we're making a lot of progress.

The installer is brand new, and installs to ZFS, eliminating any need for partitioning. We're also scrapping the existing packaging system and replacing it with a new design. It's not pkg-get and it's not apt-get, so it is another thing to learn, but we're pretty sure that it'll be intuitive to do the things you need to do on a regular basis. And it will interoperate with the old packaging system in the most important ways -- in particular, sunfreeware and blastwave packages should continue to install and work.

And yes, we're getting quite serious about Python. The new packaging system is being written almost completely in python (need some C to interface with some deeper system-level things), quite a few other folks in the OS group are catching on. I don't know that any of us has actually dorked with Twisted yet, but obviously it's pretty important, and we may end up using it. We're also stuck with Python 2.4 at the moment, but once we have some free time, we'll need to test everything we have with 2.5 and make the switch.

You might also take a look to see if any of the OpenSolaris-derived distros are of any interest. Nexenta is probably the most popular (it's essentially a Debian userland on top of the core Solaris bits), but Belenix and Schillix are also available.


Thomas Hervé said...

You may want to have a look at Nexenta:

I won't discuss the legal issues with it, but it brings apt-get to solaris, which makes it a much more comfortable environment for developers.

I had the same look at Solaris few months ago. For me, the main differences were with process management. I'm curious to see the other problems you had.

Anonymous said...

Yeah, Blastwave is much better than SunFreeware in pretty much every respect.

Project Indiana is Sun's "break it and make it better" project that includes a real packaging system with network repositories, ZFS root and so on. If you don't want to try that (it's a bit bleeding edge still), you should definitely use SXDE over Solaris 10, as it's much more up to date and targeted at developers.

The latest Solaris partitioning standard is to put everything into a single /. /tmp is backed by RAM and swap, not a normal partition.

Duncan McGreggor said...


This information is invaluable -- thanks!

I was aware of OpenSolaris (in fact, I was the only one at work, in 2002, who thought it would ever happen) and was delighted when it came out. I had assumed incorrectly that there was a tighter coupling with Solaris 10... if I had taken the time to poke around, I would have realized my error :-)

Also, that link you gave to the installer had this link on it's page: a document by Dave Miner that outlines the Solaris Installation Strategy, including an excellent overview of the problem space. This is exactly the kind of thing I wanted to see. Sun has a an exceptional history of producing these documents, and I'm delighted to see that the OpenSolaris project is benefitting from this :-)

And that packaging systems looks most interesting. I will definitely be giving that a try -- thanks for the heads up! And in Python, no less! Sweet!

Duncan McGreggor said...

Um, John? Don't you think it's a bit tabloid to refer to this post as "How Not To Benchmark" or "benchmark OS performance by running it as a VM"?

This is a post about running Twisted unit tests on Solaris and exploring Solaris as a development platform. I specifically didn't refer to the toy timings I did as benchmarks, 'cause that would just be outright silly...

Their real purpose was to reveal any horrible oddities that may have cropped up for the two systems relative to each other, no to systems running on dedicated hardware. If the Ubuntu VM ran in 5 minutes and the Solaris one ran in 55 minutes, I'd know something was fishy.

Due to the completely unscientific methodology used (one run, Solaris resource issues, and no references) I would have thought that the toyness of the comparison was quite clear ;-)

John Levon said...

Only just spotted the reply here. I've never been called "tabloid" before!

I do apologise if I offended - believe it or not, I was attempting to be semi-humourous. Given you didn't state that the performance tests were essentially meaningless, I'm not sure how I was supposed to know that you thought so too. It also doesn't seem to reflect your "Solaris doesn't seem to perform as well" comment. But anyway, I stand corrected.

Duncan McGreggor said...


No worries :-) And thanks for clarifying! My bad for not giving a caveat about using "time" ... and perhaps I should have chosen "moderately sensationalist" instead of "tabloid"? ;-)

Take care!

Anonymous said...


Just a note that OpenSolaris 2008.05 was released last week. You can find it here

Please give it a whirl!

Duncan McGreggor said...


Thanks! Downloading it now...

Cris Harrison said...

Duncan, As a Solaris hack whats up with those stupid partition tags in Nexenta? Like how the heck can I chage them to something more reasonable like /export/home or /usr/local ?????
Thanks Cris Harrison