Eric Schrock's Blog

So how much work was it?

November 11, 2008

With any product, there is always some talk from the enthusiasts about how they
could do it faster, cheaper, or simpler. Inevitably, there’s a little bit of truth to
both sides. Enthusiasts have been doing homebrew NAS for as long as free software
has been around, but it takes far more
work to put together a complete, polished solution that stands up under the stress
of an enterprise environment.

One of the amusing things I like to do is to look
back at the total amount of source code we wrote. Lines of source code by itself
is obviously not a measure of complexity – it’s possible to write complex software
with very few lines of source, or simple software that’s over engineered – but it’s
an interesting measure nonetheless. Below is the current output of a little script
I wrote to count lines of code1 in our fish-gate. This does not
include the approximately 40,000 lines of change made to
the ON (core Solaris) gate, most of which we’ll be putting back gradually over
the next few months.

C (libak)                 185386        # The core of the appliance kit
C (lib)                    12550        # Other libraries
C (fcc)                    11167        # A compiler adapted from dtrace
C (cmd)                    12856        # Miscellaneous utilities
C (uts)                     4320        # clustron driver
-----------------------   ------
Total C                   226279
JavaScript (web)           69329        # Web UI
JavaScript (shell)         24227        # CLI shell
JavaScript (common)         9354        # Shared javascript
JavaScript (crazyolait)     2714        # Web transport layer (adapted from jsolait)
JavaScript (tst)           40991        # Automated test code
-----------------------   ------
Total Javascript          146615
Shell (lib)                 4179        # Support scripts (primarily SMF methods)
Shell (cmd)                 5295        # Utilities
Shell (tools)               6112        # Build tools
Shell (tst)                 6428        # Automated test code
-----------------------   ------
Total Shell                22014
Python (tst)               34106        # Automated test code
XML (metadata)             16975        # Internal metadata
CSS                         6124        # Stylesheets

[1] This is a raw line count. It includes blank lines and comments, so
interpret it as you see fit.

6 Responses

  1. From the view of the home brew nas what you say helps our case.
    A home brew nas is simpler as it only does what we really need it to do.
    Ie do you really need the 40,000 changes to core ON? We been building NAS boxes just fine up to now.
    Home brew nas are also cheap, but not as pretty. Ok you can’t build a u4 thumper – but you can build it in a u5 case for a fraction of the price.
    Faster, well yes but only due to brute force. With all the cash we have saved we might as well put in the top end cpu and loads of memory.

  2. It has been *one day* and I’m already tired of the "I could go to Fry’s/NewEgg/Circuit City (RIP) and build this same thing with my soldering iron" crowd. There’s nothing wrong with homebrew NAS solutions. They are directly comparable to people building kit cars in their garages: they are fun (and time consuming) to assemble, they work (usually), they’re often pretty fast, and they carry one or two people around. Using that scale, the 7000 series products are 747 jumbo jets which can be safely run by a bus driver. It’s true: both the kit car and the 747 "do the same thing": they both move people around. But they’re not comparable in the manner suggested by kangcool. I’m not interesting in placing my medical records, my science experiments, my render farm, my genome sequences, my search engine backend, my sales database, etc. on homebrew NAS. The data has *value* many times greater than the cost of the storage. Protecting the data is in the best interest of all involved.
    As for the LOC count, I think it’d also be good to count the effort Sun expended in the core platform. The CIFS server, ZFS enhancements, etc.
    -IA

  3. I have a home brew NAS. It runs OpenSolaris Nevada Build 101 and the filesystem is ZFS. It works great and I built it from parts from NewEgg.

  4. Just curious if you’ve seen SLOCCount before
    http://www.dwheeler.com/sloccount/
    It’ll give actual source lines discounting comments etc.
    as well as a nice summary of each language and breakdown.

    As for the home brew NAS based on OpenSolaris and ZFS crowd,
    sure you can do it but it’ll take a lot more time and effort than this.
    Download and try the virtual machine image to see what all
    this brings to the table:
    https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_SMI-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=SunStorageSim-1.0-OTH-G-F@CDS-CDS_SMI
    cheers

  5. I am really sick of the people who think like this:
    "It has been *one day* and I’m already tired of the "I could go to Fry’s/NewEgg/Circuit City (RIP) and build this same thing with my soldering iron" crowd."
    It is absolutely true you can go 1/10 of the list price by DIY. Even without doing it yourself, can you explain the $10,000 list price difference of the SunFire X4540("Thor") to the 7210 system? The question is whether "fishworks" UI is worth 10,000 dollars worth of license per node. What is even sicker is this: can you explain the difference say if you bought the 2U SunFire X4440 and stuffed custom SSDs(Intel X25-M for the readzillas, and Intel X25-E for the logzillas) in there yourself to make yourself a 7410 equivalent system for less than 10,000 dollars from Sun itself(or half of the price of the Thumper)
    You can even do it with Dell PE2970 + 2 MD1120 cases for the same 48 bay enclosure. Yes that system is 6U compared to 4U of the thumper, but the thumper/thor takes 10Amps of power. So you can’t fit 10 Thumpers in a data center 42U rack or you will be pushing 100 Amps+ so the space premium is not an issue.
    What it comes down to is this: are you willing to pay a $10K license fee per controller node for the fishy UI on the new storage 7000 system.

  6. TS,
    Don’t compare these systems to something you can build yourself.
    Compare it to commercial Filers from the big Storage companies.
    This $10,000 you highlight and lay at the foot of the software
    covers a multitude of values: service, integration and testing
    of components. If price is your only objection, contact a Sun Sales
    Person or Channel Partner and negotiate away that objection.
    The prices you mention are List. Discounts are negotiated on most
    large commercial procurements with commitments for volume or competitive
    situations. The price of the 7000’s will be used repeatedly to obtain better
    discounts from it’s competition. It changes the $/GB for a high performance
    commercial filer… that’s what drove these guys to spend 2 years making this
    "applicance" for Sun to capture a share of that market.
    You can build a great filer from OpenSolaris code and the Fishworks
    team contributed nice chunks of code to make that possible (L2ARC for example).
    Would we like to see the Fishworks code donated to OpenSolaris… sure.
    But what has been donated will allow start-ups and others to build filers
    at the price of the components without any licensing fees or software add-ons.
    DISCLOSURE: I am an engineer for a Sun Reseller and I expect to sell a lot of
    these systems.

Recent Posts

April 21, 2013
February 28, 2013
August 14, 2012
July 28, 2012

Archives