Musings and Other Things
Random thoughts and insights on games, technology and business.
14   Apr
Filed Under (technology) by flipkin on 14-04-2009

This guy is claiming that Google is paying ( and losing ) $2 per person visiting YouTube. He is out of his motherflipping mind. Basically he doesn’t know how to calculate bandwidth expense.

There are two ways in which bandwidth charges are calculated, 95% and transfer. Transfer is more popular with small and medium size enterprise or small office home office web hosting. Basically you are charged per gigabyte transferred. It’s easy to calculate and easy to understand. People download 100 Gb of stuff in a month you pay $0.20 ( or whatever the charge is ) times the number of gigabytes downloaded.

This is all well and good, but it doesn’t accurately reflect the cost of the network provider. The concern of the carrier is peak usage. It costs the carrier the same amount whether a OC-192 5% utilized for 90%. However the second the utilization peaks above 100% all traffic on that pipe is adversely affected. Since there is such a disincentive to go to full utilization the cost structure for buying bandwidth is structured the same way. Most providers provide a specific burstable rate say 10GB/sec. However the customer doesn’t pay for the full burstable rate rather they pay for a committed information rate of say 2 Gb/sec. The carrier samples the link every five minutes, discards the top 5% of the samples. The remaining highest sample is the information rate charged. If the information rate is lower than the committed information rate the customer pays the normal monthly bill. If the information rate is over the CIR the customer pays an overage rate. For instance the going rate is $8 per 1 Meg/sec CIR with $12 per meg over provided the customer commits to 100 Meg/sec.

That being said lets do some math. It’s known that Youtube has 375 million unique visitors a year. According to Quantcast Youtube’s visitors are 25% addicts, %60 regulars and 15% passer-bys. The the sake or argument we will assume addicts visit once a day, regulars twice a week and passer-bys once a month. This number is pretty high but still its worth while. That means on a given day there are about 100 million visits. Assuming the average view is two videos, again it probably lower but still lets roll with it, there are over 200 million sessions a day. At 400 kbit/sec that is 81 petabits per sec. Wow … thats a lot. Oh wait that is if every single session happened at the same second. Let’s spread that out over the day. Since the days usage isn’t even let’s assume it behaves like normal web traffic and the peak usage is double the off peak usage. The answer is 1.8 Gbits / sec of bandwidth. Again the market rate is $8 per meg / sec CIR so we come up with a monthly cost of a little under $15K or about $175K per year.

The $175k per year is a lot less than the cool one million bucks the other estimate came up with. Additionally $175k is way more in line with the data center operations cost of $36k.



03   Mar
Filed Under (technology) by flipkin on 03-03-2009

I like to think of myself as relatively technology agnostic. I use whatever technology seems the best at any given time. My criteria consists of what meets the functional requirements, what is cheapest and what I know how to use ( in that order ). I began my career writing Perl scripts on Un*x systems, specifically Sun Solaris and HP HPUX. I readily abandoned both commercial operating systems for Linux ( with a lil BSD thrown in ) in the 90s as the economics played out ( faster, cheaper, cheaper cheaper and cheaper ). For over ten years I used Windows for productivity and entertainment and Linux on my pet projects. As I progressed into more leadership roles I used Windows and Microsoft’s productivity quite a bit culminating in the Excel/Powerpoint orgy that is business school.

Lately I have been moving almost exclusively onto Apple products. I purchased an Apple computer for myself for the first time a couple of months ago. I will readily admit MacOSX is vastly superior to Windows in many, many ways. I mentioned it before and I will mention it again, I love having a Un*x shell. I love having a scripting language. I love having ssh and all the command line utilities. The Dock is pretty brilliant. A dynamic and configurable quick launch bar is really way better than that silly start menu. Spaces is a wonderful way to improve desktop efficiency. A built-in backup with Time Machine is also incredibly useful ( albeit fucking slow ).

After first buying a 32Mb ( thats megabyte not gigabyte ) Rio MP3 player for the gym way back in the day I graduated to iPods. I current use an iPod Nano for working out. As a personal media device it’s wonderful. It’s small and light weight. It stores music and plays it back, nuf said. Subscribing to podcasts is a great way to always have fresh content for that boring cardio without a lot of forethought or planning. I fanatically use the Nike+ iPod dingus. It is quite possibly the best $39 I have ever spent in my entire life. It makes me exercise more. It got me into running. I run longer, further and faster. I run more often. It is just plain wonderful.

I also have an iPhone. For well over a decade I’ve used PDAs and cell phones. A fun game I would play when I lived in LA was to scare my friends by looking up numbers on my Palm with one hand and tapping it into my Nokia cellphone with the other while speeding down La Brea in the middle of the day. Having all that functionality in one device means I at least have one hand for driving. I owned everything from the original Palm and Blackberry. Yes I used the Bberry when it was a three line two-way alphanumeric pager about the size of a fax machine. I had a Treo with Windows Mobile and most recently a Blackbeery 8830 Worldphone. Everything up to this point looks like a stick with a brightly colored piece of string in comparison to the iPhone. Windows Mobile is broken to the point of uselessness. I won’t go into how much it sucks other than I had the OS hang while receiving a phone call more than once. A ringing non-responsive device is the textbook definition of frustration. The BlackBerry OS is perfectly stable and useful, it is also ugly and dimwittedly slow. It’s email is fully funtional, but good luck trying to view a website. The iPhone multitouch interface is simply brilliant. The integration between browsing, phone, email, maps and GPS is shockingly elegant. There are a couple apps I used with increasing regularity. The iPhone is practically a mobile desktop replacement. In a word I feel as though I cannot live without it.

I would also say I almost came close to Apple fanboyism. However, the honeymoon is over motherfucker. How Steve Jobs gets away with this bullshit sleight of hand nonsense and have some of the most loyal customers in the world is really beyond me.

First, lets look at iPhone’s predatory pricing model. I wouldn’t have discovered this unless I recently had my iPhone stolen and had to replace it. The 16Gb iPhone costs $299. You can only get this price if you are ‘upgrade eligible’ and commit to a two year plan with ATT. Apple is receiving a $325 subsidy from ATT for each iPhone sold. The $299 price is only if you are out of contract with ATT or switch from another cell provider. If you lose or break the phone and want it replaced it will cost $499 and a contract extension. This is especially cute since you cannot get handset insurance on the iPhone. The $499 price is only if you have not ‘replaced’ the iPhone in the last six months. If you have had that sort of bad luck you get to pay a staggering $599. A safe assumption is that Apple doesn’t sell any of it’s products at a loss. The 16Gb iPod Touch costs $299. According to Apple financial documents its iPod division is throwing up 30% gross margins. While they don’t break out their product lines the analysts believe the Touch is the growth engine in the iPod business and a huge portion of new sales. The 16Gb Touch is the exact same price as the ‘upgrade eligible’ 16Gb iPhone. From a manufacturing point of view these two devices are nearly identical. A research firm tear down analysis revealed 90% component commonality. The Touch is basically missing the GSM chip and antenna and corresponding software. We can give Apple the benefit of the doubt that the iPhone costs more than the Touch, but not much more. They are essentially 90% the same. However the pricing model guarantees almost twice as much revenue for Apple from the iPhone in which the consumer will pay nearly 10 times as much over the life of the contract. The current thinking is an iPhone will cost $2000 or more over the course of two years. I repeat consumers are paying over two grand for what a device that Apple is already making 30% gross profits at $299. Interestingly because of the lack of insurance and exorbitant pricing model there is a strong secondary market for ‘used’ iPhones. Used iPhones are going above the $499 price on eBay and Craigslist. iPhones are valuable, liquid and very portable making it an ideal target for theft. Don’t believe me? Try leaving your iPhone in your car overnight in any city in America. Other companies sure get thrown under the bus for this sort of gouging, but Apple has some of the most staunchest defenders ever.

Information wants to be free … or … people want free stuff. Apple created and profits from the most successful and restrictive DRM to date. Don’t get me wrong, as someone who earns his livelihood from intellectual property I fully support digital rights management. It should be up to the creator whether they want to sell, share or give away their creations. This is definitely the dissenting opinion among the Reddit/Digg/Apple tinfoil hat crowd. However, Apple managed to create an incredibly restrictive digital rights management system. It is woven into its iTunes/iPod product line and hardly no one seems to mind. iPods can only be married to a single iTunes account. Only five computers to an iTunes account. Move the iPod and its content gets wiped. Lose the computer, hope you have a backup. iTunes is largely a one way door as far as content is concerned. Import a CD or MP3 and that’s it. Keep the original source if you ever want your content on a different player or platform. iTunes only syncs to Apple music players. How this escapes the ire of the copyleft technorati is still a mystery to me.

I like my Macbook. It’s a great laptop. However you really do pay a premium for Apple computers. There is about a 20-30% premium paid for Apple notebooks compared to Wintel lappys. In my mind the superior OS, sleek aluminum case and lack of crapware makes this all worthwhile. There is some indication that Apple is wandering off into crapware land. TimeMachine and MobileMe come pre-installed and if you don’t want to buy TimeCapsule or subscribe to MobileMe you get to look at those shitty icons mocking until you look up how to remove them. My laptop has only a MiniDisplay Port. What’s MDP? Oh, some proprietary Apple dingus for hooking up a monitor. Does anyone sell a MDP to DVI cable? Yups. Only Apple, at the Apple Store. See where this is going?

Office on Mac is wonky. This really isn’t Apple’s fault. I am not sure if it is 2008 or what. Whoever thought changing Excels interface was a good idea should be shot. They single handedly ruined the productivity of millions of people. OK so it may be millions of MBA and MBA wannabes ( which may be a good thing ), but it also possibly contributed to this massive economic down turn. Some crucial analyst somewhere was unable to accurately measure risk due to his inability to navigate Excel’s new menus and thus froze the entire equity market. I know there are tons of people loathe to upgrade because it means relearning a tool one had already mastered for no good god damn reason. In old Excel it would take me a second to do a pivot table, scatter plot or goal seek. Now I hunt and peck for 15 minutes trying to do the exact same function. Office on Mac has some fundamental problems for Windows power users. Where are the function keys? They exist on my lappy and on the 101 keyboard I plug into it. I mean I can actually hit the function button. Why don’t they do the same thing? F4 anchors a cell in Excel under Windows. For some reason ⌘t anchors a cell in Excel under MacOSX. The F4 changes my screens brightness on the laptop. There are shit tons of these small, but powerful differences and I hate having to relearn them. As far as I can tell the functionality of Office hasn’t improved. I still can’t do predictive modeling in Excel. I still can’t do scenario analysis. Solver still has problems with certain nonlinear functions. The only reason to upgrade would be some irrational desire to play Hunt the Wumpus.

Apple isn’t some wonderful technology artist commune that wants to set us free. It’s a money hungry corporation that wants to wring every last penny from us folks. It’s just had to do and be better in the face of such overwhelming competition from Microsoft and others. I understand now why the analysts are so freaked out over Job’s health. The guy has a certain magick picking the pockets of Apple consumers and leaving us wanting more.



17   Feb
Filed Under (running) by flipkin on 17-02-2009

As promised pics of the half marathon.

Half Marathon
——————–
The start

My sweating ass

————————————————————
Puling away from the pack



06   Feb
Filed Under (technology) by flipkin on 06-02-2009

Quick post before I head out to Europe for some much need R&R ( at least for the missus ). PC World posted a list of the top 10 spam friendly registrars. Register.com made the list at number four, just after NetSol. While I was at RCom we struggled with spammers like everyone else. It’s a tough problem along with plain ‘ol fraud. Interestingly enough GoDaddy, a price and market leader with a zero tolerance spam policy, is not on the list. Worth a little more investigation.



03   Feb
Filed Under (running) by flipkin on 03-02-2009

Did the Kaiser Permanente Half Marathon this Sunday. My official time was 2:20 which gives me a 10 minute 40 second mile. This is about a minute slower than I usually run, but the field was packed early on and I was intentionally husbanding my energy. Hydration and glucose weren’t a problem at any time. I carried with me a couple pints of Gatorade which I sipped at each mile marker. I also brought along little Milkyway Minis. The runner goo shit is fucking horrible. If brownie ate a big burrito and washed it down with a couple cups of coffee then shit it in a gold foil tube. That’s the taste that the goo evokes.

After the run we went to the Lind’s for a pretty fun SuperBowl party. Dips, chili, beer and good company is a great way to recoup.

Today I am learning all about foot care. My right foot has a couple of really sweet blisters. Other than a little stiffness and muscle soreness I am good. I may even hit the gym for a light workout.


——————————-
The Nike dingus is off about 6-7%. Doesn’t make much of a difference on my short runs … but saying I am done 3/4 of a mile before the finish is irritating.



21   Jan
Filed Under (technology) by flipkin on 21-01-2009

I am turning into a Mac guy. I love the user interface. I love having a ‘real’ Un*x shell. I rarely plow into it, but it sure is nice to have when I need it. Native ssh, perl and the like make things that are difficult in Windows trivial. I love time machine. Such a great … and … FREE backup solution. I am also falling inlove with Vmware. Many of the tools we wrote for Hellgate are Windows only .Net apps. Worse still they are SOAP, but use the WSE Windows Security Extension bullshit making interoperability useless. Also the Mac OSX client for OpenVPN isn’t quite all there. However all that stuff works under Vmware. Unfortunately I somehow corrupted my VM instance. It’s all good right? I’ll just pop into Time Machine and only restore VM image. Ha ha ha.
The answer is fucking slow. I was able to resinstall Vmware, install windows, install 33 updates, install virus protection, update the virus dictionary, install firefox, install Winrar, install .Net 2.0, install WSE 3.0, install OpenVPN, install ops console faster than doing an 11GB restore of the VM image. WTF?!?



22   Dec
Filed Under (technology) by flipkin on 22-12-2008

… and lazy. Jeff Atwood suggests that in this age of expensive programmers and cheap hardware it is almost always appropriate to throw hardware at the problem. A programmer is roughly $90k per year and actually a lot more when you figure the fully weighted cost which would tack on an additional 30-50% depending on the kind of organization you worked in. A modest five person programming team is a massive pile of hardware. Unfortunately his conclusion is way off the mark and I will explain why.

Programing is exponential. Hardware is Linear.

Adding additional hardware is an absolutely linear function. Go from three to six servers your capacity roughly doubles. This isn’t actually the case since there will be some performance lost to the increased overhead. Performance issues are often inefficiencies that multiply with large numbers, be it users, records what have you. When n is small everything is fast. When n is large … well … in the words of of Atwood, “things start to go sideways”.

n^2 vs. n log n

Above is a simple graph representing the number of servers required for a given n, say millions of sessions, with two dominate algorithms n^2 and n log n. Obviously this is a pretty extreme example. The n^2 algorithm quickly requires hundreds of servers more than the more efficient n log n algotrithm. Programming optimization are almost always exponential in nature and are rarely linear. The old optimizing paradigm of reducing resources through profiling or “algorithmic optimization” does not apply. That assumes the computer is the CPU. The computer is a stack of systems and rarely is the CPU the one that is bogged down. Even the old trade off of memory vs. disk vs. CPU is irrelevant when you are discussing hundreds of servers. Being able to throw hardware at the problem often means many stacks of systems interconnected. Performant code has a cumulative effect that is exponential in nature. Since inefficiencies cascade and grow through the system. The problem is we often bench mark performance at a given n and measure the improvement linearly. Thus we think of our improvement in linear terms. For some given user base this optimization has a 4x improvement. The calculus of doing all this optimization work or throwing a few more servers at it seems obvious. Should the user base double, this relative improvement could easily be 16x or more. If you are in a fast growing business you could easily see usage double in a very short period of time and your server requirements spiral out of control.

Capacity is more than CPU Cycles.

Yes. Every year and a half Intel or AMD manages on jamming twice as many transistors on a die. However applications often bog down at disk IO, memory utilization, network throughput or latency and the CPU is relatively idle. Idle that is except for managing its buffer right before crashing. Disk and memory are not benefiting from same law of performance economies as processors. Compare the server cost of a 16GB server at roughly $85 per GB ( Dec 2008 Newegg prices with Supermicro barebones 1U server ) with a 48GB server at $165 per GB ( Dec 2008 Newegg prices with Supermicro barebones 1U server ). So to 3x the capacity you need to 6x the cost. The same is true with online transaction processing. As you move up the performance spectrum the cost per unit increases. To add linear capacity improvements the organization starts to pay exponential costs. Compare this with exponential capacity improvements with linear programming optimization costs. This become especially insidious if your application does not lend itself to parallelism. Writing distributed code does not come without a cost in both programming hours ( expensive remember ) and performance. Thankfully there has been a lot of work in things like memcached which make the costs much less significant. Of course if your application is highly specialized and more than just a website … good luck.

Hardware is more than the Purchase Price.

Often times programmers look at a hardware retailers website and wrongly assume this is the fully weighted cost of a server. This is definitely the fixed capitalized cost of the server, yet a much more significant cost is the ongoing recurring cost of keeping the server operational. A good rule of thumb is to start with 20% of the purchase price for vendor support. Then add rack space at $25 per month per U. That is an additional $300 a year per 1U server. Power and cooling could be significant as well. There was a movement toward denser systems at the expense of power consumption and cooling requirements, however most people quickly realized that power and cooling costs are much more dominant than space . Network costs are highly variable ( both bandwidth and port consumption ). Lastly, there is the technical operations staff, the system and network administrators. So what does a server cost? Well luckily cloud computing is increasingly popular and it makes it very easy to estimate the at scale, recurring annual cost of a server. Your mileage may vary depending on your company. A singles Amazon EC2 instance is roughly $875 per year. The performance of a single EC2 instance is basically what you would expect from a $800-900 server. One could then extrapolate that the fully weighted, at scale, annual recurring cost of a server is … well … the servers purchase price. So when you say, “Hey it’s only $3000 to add another server” it should really be, “Hey, it’s only $3000 per year to add another server.” Assuming a five year life the annual cost is the purchase price with 20% capitalized cost and 80% recurring cost.

Large Numbers of Servers has its Own Problems

Instead of scaling vertically you may be able to scale horizontally. Big iron, servers with lots of cores and tons of memory, are really expensive. It is much more economical to scale horizontally. Often lots of cheap servers will give you the same performance with a significantly lower cost than a small number of big servers. However, you cannot scale up your environment horizontally infinitely without encountering new and unforeseen problems. Potential inter server communication grows exponentially with the number of servers. A cluster of five servers has 5*(5-1) or 20 potential interconnects. A cluster of ten servers has 10*(10-1) or 90 potential interconnects. That is a 4.5x increase by just doubling the server count. An excellent write up of what Facebook did to optimize memcached illustrates this point exactly. The more servers they added the more resources each server spent managing its connections. Simple tasks become incredibly difficult in large environments. Your organizations management tools and software distribution become unwieldy at large numbers of servers and require more and more engineering and operational effort.

Optimization has Tangible, Very Real Benefits.

I used to work at a large domain name registrar. As a free service to our customers we would host their domain name service for free. We provided a web interface that allowed each customer to manage not only the registration records of the domain, but also individual records in each domain. This is pretty much industry standard now, but when we were doing it wasn’t very common. For a period of time we were most likely the largest DNS service provider in the world. Since this was a free service it was considered a cost center and had relatively low expectations and requirements. We had millions of domains under management and tens of millions of domain records. The DNS software we ran kept the entire record database in memory. Since the number of records we managed exceeded a hard limit in the software we ran multiple servers each with a segment of the total database in memory in pairs for redundancy. There were fifty something servers in total. Each pair had a subset of the entire record database. The DNS software maintained a text file for each domain. There was a master file that told each server which domain it was authoritative for. When the customer updated their DNS records the software would write a new file and hourly the DNS server would do a soft reload and pick up any changes or additions.

We eventually moved away from flat files and stored all the records in a relational database. The DNS software was modified to look up DNS records in the database. This had a number of benefits. First, we would able to reduce our server footprint from 50+ servers to four. Assuming $2000 a year per server that is almost $100k recurring. Even if it took a solid man year to complete ( which it didn’t ) the annuity nature of software optimization makes it totally economically advantageous. Second, DNS entries would be updated in near real time. This meant customers did not have to wait up to an hour for their changes to go into effect. Lastly, the previous system was fragile. It would take 15-20 minutes for the server to stat hundreds of thousands of flat files to determine if records had changed. In that time it would stop processing requests. If the server crashed and had to do a hard start and read each of those files it could take almost an hour to start up. That is an hour of not processing any requests. Of course there was the second half of the pair. If you know anything about DNS have an unresponsive nameserver isn’t an incredibly ideal situation.

What I am describing sounds like a really retarded system … and … it was. If we had the commonly available technology and techniques now, back then it would have been done differently. We didn’t and the system was created because, ” What is fifty servers to a $100mil business line?”. While the primary driver was to reduce cost, a very tangible benefit was a much better user experience and robust service. Eliminating artificial performance bottle necks doesn’t just provide additional capacity, it will often improve the the experience and stability of the application as a whole and thus your competitiveness improves. Software starts faster. Downtime is shorter. In our case when the product manager was no longer shackled to this hourly restart new revenue generating products were created.

Research and Development vs. Cost of Goods Sold.

This may be a bit inside baseball, but even if there was a dollar for dollar parity between optimization and hardware ( and we now know there is not ) you and your company would benefit from spending that dollar on optimization and not hardware. It all has to do with how companies are valued. Take two companies, Eastern Widgets and Western Sprockets. Western Sprockets spends a lot on research and development and has a high gross margin. Eastern Widgets spends less on R&D and has lower margins. They each bring in the same revenue and are equally profitable. Which one has the higher stock price? Western Sprockets of course. Why? Well Western Sprockets spends more of its resources on making and improving things to sell. Additionally Western Sprockets makes more profit per unit than Eastern Widgets because of the higher margin. Assuming both companies are in a growth industry ( in this economy that may be a HUGE assumption but it’ll get better someday ) Western Sprockets has greater potential to make more profit in the FUTURE because of its margins. The higher R&D budget is also beneficial. The assumption is that if both companies were to double its sales tomorrow Western Sprockets would have more profit. Since the market values what it thinks each companies performance will be in the FUTURE the stock price for Western Sprockets will be higher.

What does this have to do with servers vs. coding? The cost of operating servers falls under cost of goods sold and negatively impacts the calculation for your companies gross profit margin. The cost of purchasing servers will be capitalized, but remember roughly 80% of the total cost and thus the dominate cost driver is operations. Programmers are almost always budgeted under product development or R&D. These are usually excluded from the gross margin calculation. High gross margin, higher stock price. Who here has options?

Culture of Waste.

Throwing hardware at problems promotes a culture of waste. There is a Broken Window Theory of software development. The Broken Window Theory posits, “consider a building with a few broken windows. If the windows are not repaired, the tendency is for vandals to break a few more windows.” In software development it would imply that buggy or sloppy code promotes more bugs. Thus, this inattention to detail and software inefficiency creates an environment that fosters bugs. I have never seen anyone wake up in the morning and get excited about how big and bloated the stuff they make is. Programmers morale and dedication are as important to software quality as ability or experience.

Worse still is applications nasty habit of consuming all resources available to it. A generalization of Parkinson’s law is, “The demand upon a resource tends to expand to match the supply of the resource.” As long as there is available server, memory, disk, what have you capacity it is often consumed unnecessarily. Adding more supply by throwing servers at the problem will only increase demand irrespective of actual need. This is especially true in an organization that promote a culture of waste. Without dedicated attention to efficient, optimized code server environments quickly spiral out of control.

So What Have We Learned?

Software optimization at large numbers has a very dominate curve. Hardware does not. Hardware gets really expensive in large numbers. Most of the cost of hardware is hidden from the developers. It’s better to spend on programmers than have lower margins. Optimization means more than being fast. No one wants to be a wasteful jerk. Jeff Atwood may be a nice guy, but his point is complete douchebaggery. What manager in their right mind would spend five person years optimizing software? The initial comparison is intellectually dishonest.



05   Nov
Filed Under (birthday) by flipkin on 05-11-2008

Yes We Did.



04   Nov
Filed Under (politics) by flipkin on 04-11-2008

That’s how I am calling it. We’ll see if I am correct. Everything I’ve see out here indicates a record turn out with new voters heavily leaning Obama. I was in LA and people were waintg 4 and 5 hours to cast a ballot. Heck my polling place ran out of ballots. Luckily we got our ballot and it only took one hour forty five to vote. News sites are already having problems. I got a an error at a couple of em and its still 5 hours when when results will first be available.

————



29   Oct
Filed Under (workout) by flipkin on 29-10-2008

The Nike iPod dingus has this sort of social networking thing for runners Dave and I have been using. It makes tracking your progress against your friends pretty easy. As a result I’ve been running more and talking to Dave quite a bit on the phone. It’s mostly been me telling him how much of his ass I kicked that day, but you know. It gives us an excuse to keep in touch. I think I am going to try and get Chuck to join and truly get an interstate rivalry going. There’s nothing like beating your friends at something.

—————