Skip to content

So long, Open Solaris!

I’ve been running OpenSolaris Nevada on my file server for a while now. While ZFS makes administration of filesystems beautiful, I’ve been disappointed with the zpool functionality.

In addition, administering the rest of Solaris is a maze of twisty passages, all alike. Things like Perl’s CPAN, which is supposed to have a high level of “JustWorks”, fails hard in Solaris (which includes both 5.6 and 5.8). Things like libtorrent/rtorrent and FLAC with Ogg support, which compile just fine on Mac, Linux, Cygwin, and OpenBSD, fail it hard under Solaris. I’ve been frustrated with all the little quirks of the system that just don’t seem to appear under other platforms. I’m underwhelmed by the SunPRO compiler set, and the system just feels *slow* to use, as compared to Linux on the same hardware.

So, using my handy-dandy external backup drive, I backed everything up, and installed the brand-new Ubuntu 8.04 on it, and while it’s back to mdraid and lvm, the rest of the sanity more than makes up for it.

New car!

Last week, my poor Tempo decided that it no longer wished to be for this world. As this leaves me carless, I went and got myself a new car.

What type of car, you ask?

A 2001 Audi A6 Quattro. And I love it.

It’s smooth, comfortable, and a great highway cruiser. That last part tends to be useful for me, as if I’m not driving 2 miles, I’m driving 200, and I enjoy how comfortable this thing makes long car trips.

Also, it’s badass.

971978981

Life without iTunes

Apple’s walled garden works well for most people. I, unfortunately, am not most people.

This is my story.

As I’ve already discussed previously, iTunes has a certain amount of suck involved.

So, I’ve discovered Play, which sucks less in some ways, and sucks more in others. As so far, the more suckage hasn’t been so much of a concern for me yet, and after checking out the source code, it don’t look too hard to create some patches against. One of my “post-graduation to-dos”.

My CD collection sits as FLACs on my server drive, and Play handles it quite nicely, updating its sqlite database of music every time it starts up. To rip, I use sbooth.org’s Max, which includes the very excellent cdparanoia ripper and pretty good support for tagging, album art, and all the formats I’ve grown to love, such as FLAC.

Currently, there are a couple of weak links. Play doesn’t export playlists to plain text files (otherwise known as .m3u), and the built-in “Convert with Max” option only lets you select 10 tracks at a time. How am I supposed to convert 200-250 FLAC files into Ogg or MP3 to put on a portable player to bring around? Solution: the music library database is simply a sqlite database, which means I can hook up a Perl script to it and extract playlists like that, and run it through conv. For use with my iPod, I can simply make a small library in iTunes, and simply import into iTunes to copy to the little machine. No biggie. If I felt like it, I could most likely write an AppleScript to automate it for me.

CD burning? Same as with the iPod; just use iTunes to make it easy.

So far, I really haven’t missed it. Huzzah!

Arthur C. Clarke, RIP

One of humanity’s greatest authors, Arthur C. Clarke, passed away this morning.

Rest in peace.

Ben Franklin was an internet junkie.

Proof right here.

That is all.

iTunes headaches

As you may guess, I run a mac. On the Macintosh, there really is only one music player in town: iTunes. Granted, there’s plenty others that will play music, but none that will manage it. I have enough music to make this a real issue. On Windows, there’s WMP, WinAmp, Foobar2000, and others I’m sure I’m missing. On Mac, there’s… iTunes.

iTunes follows the traditional 90/10 rule of most things Apple: do 90% of everything perfectly, and utterly fail at the last 10%. In this case, it fails at complex library management. Perhaps I’m setting the bar too high here, but Apple’s software is unable to intelligently re-build its library, based on changes to the library directory. For instance: Chip finds some music licensed under Creative Commons, and uploads it to me, directly into my music directory. On just about all the other players I’ve seen, I’m able to either re-index the music directory automagically, or even cooler, the player detects a delta between the current library index and what it sees in the directory, and rebuilds (Hello, Amarok!). As far as I can tell, iTunes does not do this. To add to the mess, on trying to import my library into iTunes fresh, it actually makes iTunes seize up about halfway through. This is rather unacceptable.

Also, it appears that it doesn’t include music that it can play but lacks metadata on. The very excellent band Everybody Else’s CD is one that I ripped to FLAC. Now, when I want to listen to them, I have to load up VLC. It’s not that I mind VLC so much, but it leaves something to be desired when working through my media collection.

My solution: once I’ve the time, hopefully I can whip up something resembling a media player for MacOS. I might, if persuaded, make it work cross-platform, but I don’t care too much about Windows, and the perfect media player already exists under Linux.

Beautiful Fortran

One of my more favored software development blogs is Beautiful Code. The concept is that code that is properly elegant is going to be readable, functional, and most of all, working correctly. There’s a lot of focusing on unit testing, proper OO design techniques, and how to squeeze an elegant solution out of the nastiest conditions.

Well, I believe I have a Nasty Condition.

I hack on FORTRAN and Fortran at work, after getting out of the IT support gig. What’s the difference between the capitalizations? Easy. FORTRAN references the language pre-1990 (1950’s through to 1990), and Fortran is the more modern Fortran 90/95/2003 standards.

Fortran 90/95/2003 isn’t that bad to work on, actually. For its primary purpose (running numerical computations on hideously expensive computers), it works really well, and makes me a happy hacker.

FORTRAN helps to create ugly code. Complex looping and branching statements are much more difficult than in other languages, and many FORTRAN coders cut their teeth on it when the language was still implemented via punchcards, and “eloquent” coding meant as few cards (aka lines of code) as possible. Goto statements scare me. Gotos with literally 5-6 arguments terrify me. Did I mention that there’s limitations on line length imposed upon the language from punchcards?

The code in specific I’m working on is worse. Those working on it use no version control, so it’s full of commented-out things every which way, and it definitely dates from the punchcard era, as it lacks things like blank lines in between logical blocks of code statements. It has terrible, nonsensical indenting, and it relies heavily on subroutines acting in highly non-documented ways on literally hundreds of different, poorly named and undocumented, global variables.

Oh, and there’s a function that simply wraps ACOS(), the cosine function in FORTRAN. This is what it does:

FUNCTION ARCOS(X)
ARCOS = ACOS(X)
RETURN
END

Lovely, yes? Waste of a function to have to keep track of, yes? I’ve seen it in three different versions of the model, and it troubles me the same.

I also saw references to MS-FORTRAN 4.0 for MS-DOS in the comments. Joy of Joys. In addition, it will only compile with Intel Fortran. Portland Group’s compilers break a little bit on it, but gfortran, g95, g77, f2c, and sunf77 compilers all fail with pretty pyrotechnic displays with it.

Hopefully this stuff won’t drive me completely batty before I can understand what it does “under the hood” enough to re-write what I need out of it in something better.

Time, how it flies!

Wow, my last entry was in October. Poor November, no love at all, no love at all!

I’ve gotten myself a shiny new job with the University, doing research programming work for the big $500 million BP Biofuels research project. Hopefully I can see somewhere around half of that in my paycheck. Yeah, right, I know. Eitherway, I still get to do something Big and Fun. With this job will also come a real paycheck that I can actually sock away decent amounts of cash from.

Next semester, I’ve only one class left, and then I’m home free as far as college is concerned. It’s really odd, sitting here at the end of 17 years of schooling, to not be worried about class or homework. I know the Real World is going to bring new challenges, but they’re going to be different challenges. No busywork, no grades, no class requirements, just being given a task and getting it done. It’s a heady feeling to see this almost done, and almost as scary as it’s exciting.

Faith

Two particularly good quotes on the nature of faith, from the early to mid ’90’s sci-fi show Babylon 5:

Faith sustains us in the hour reason tells us we cannot continue, that our lives are without meaning

That’s all that faith requires; that we surrender ourselves to the possibility of hope

Have a wonderfully chilly day!

ZFS v NFS, 1-0.

On our SAN at work, we use ZFS across it from a single head node to provide storage virtualization services, which are then exported via NFS to the rest of our machines on the network. At first, performance was a dog, especially on writing many small files to disk. This was indicative of having synchronous disk I/O, where all data is written straight to disk immediately before the writing program can go on, instead of having the data written to a cache in ram (aka asynchronous disk I/O). Synch’ed disk IO can slow down disk speeds a lot, as software accessing the filesystem has to wait for the disk writes to finish before it can go on, and there’s a lot more overhead involved with small files than with big files.

Upon some study, I went and turned off two ZFS module options in /etc/system that had more than a twofold increase in speed, especially when dealing lots of small writes.

set zfs:zil_disable=1
set zfs:zfs_noforcecache=1

These two settings made untarring the Linux source code (dozens of megabytes of small files) go from over 15 minutes for just linux/Documentation, to about 25 seconds. While on the SAN head node it’s under 15 seconds for the same operation, there’s still NFS overhead to worry about.

I also know that using these settings really annoy the ZFS developers, as they rightly should, as it mucks about with internals that effectively neuter ZFS’s very ingenious and effective data protection schemes. One of them, the noforcecache option, is mitigated by our disk controller hardware having battery backups for their on-hardware disk cache. The zil_disable is only backed by the SAN running off of UPS systems, however. Hopefully the ZFS devs can make the ZIL (the ZFS Intent Log) work correctly with NFS in the future without essentially forcing sync’ed IO.