Archive

Posts Tagged ‘flash’

My MySQL keynote slides and video

April 15, 2010 4 comments

Been asked a few times in the last few days about where my slides are from my MySQL keynote from *last* year.

Ooops.

Um, yeah.  Sorry about that.  Here’s a link to ‘The SmugMug Tale’ slides, and you can watch the video below:

Sorry for the extreme lag.  I suck.

The important highlights go something like this:

  • Use transactional replication.  Without it, you’re dead in the water. You have no idea where a crashed slave was.
  • Use a filesystem that lets you do snapshots.  Easily the best way to do backups, spin up new slaves, etc. I love ZFS.  You’ll need transactional replication to really make this painless.
  • Use SSDs if you can. We can’t afford to be fully deployed on SSDs (terabytes are expensive), but putting them in the write path to lower latency is awesome.  The read path might help, too, depending on how much caching you’re already doing.  Love hybrid storage pools.
  • Use Fishworks (aka Open Storage) if you can.  The analytics are unbeatable, plus you get SSDs, snapshots, ZFS, and tons of other goodies.
  • Use transactional replication. This is so important I’m repeating it.  Patch it into MySQL (Google, Facebook, and Percona have patches) or use XtraDB if you use replication.  We use the Percona patch.

Holler in the comments if something in the presentation isn’t clear, I’ll answer.  Apologies again.

Shameless plug – we’re hiring. And it’s a blast.

Apple’s new policy is good for you, me, and the web

April 14, 2010 57 comments

I like both Adobe (Lightroom rocks!) and Apple (iPad rocks!), but I’ve been asked over and over again what I think about Apple’s new 3.3.1 policy. You know, the one that basically bans cross-platform development frameworks. And, in particular, basically nails the Flash coffin shut on iPhone/iPod/iPad. So, what do I think?

I love it.

And I’m surprised more developers, end users, business leaders, and general web standards lovers everywhere aren’t posting about how great this is.

It’s good for end users.

The App Store already has a signal-to-noise problem. With hundreds of thousands of apps, finding the good stuff is tough. Bear in mind that every single one of those Apps was built by someone intentionally designing for these devices – and we’ve still got plenty of junk in amongst the gems. Now imagine a bunch of developers just cross-publishing to lots of devices – ignoring all of the strengths of each of those devices. The signal to noise ratio gets worse, fast. Ugh.

It’s good for the web.

For me, this one is the biggie. These devices are a dual-platform: iPhone SDK and HTML. Don’t like the iPhone SDK? Build for HTML. And finally, finally, someone has stepped up and done something about the de-facto Flash monopoly. Flash has helped the web and HTML standards to stagnate. It’s sorta like a drug. It’s whizzy and slick, granted. But it’s a nightmare, too. Flash crashes constantly. Its performance is terrible (when a 1Ghz mobile processor in the iPad plays video more smoothly than Flash on a 16-core Mac Pro with a hefty GPU, that’s a problem). And it smashes through web paradigms left and right. Why? Because there’s no competition.

Look at the browser world, on the other hand. With Microsoft, Mozilla, Google, and Apple duking it out, we’re seeing a breathtaking pace of innovation. Browser stability and performance is improving at an astonishing rate. There’s no reason Flash shouldn’t be super-stable and fast by now – but it isn’t. It’s like the Internet Explorer doldrums all over again – Flash is holding us back, just like IE used to. I’d rather be building for something with a scary fast pace of innovation than something stale.

The iPad is already spurring HTML5 adoption even faster than before. Witness all the video and games sites that are already scrambling to announce and ship their HTML5 interfaces. Bring it on!

I want to build for the web, not for Flash.

It’s good for developers.

And by that, I mean “good developers.”

Good developers are language agnostic. They’ll write in whatever language is worth the effort.

Good developers love great toolsets and great platforms. The iPhone SDK is amazing.

Good developers want their creations to be perfectly tuned to their purpose. The iPhone/iPod/iPad interfaces demand and deserve lots of individual attention, not to be marginalized by some middleware cross-platform publisher.

Good developers want their products found and used. The App Store signal-to-noise issue is a daunting one – more shovelware won’t help.

Good developers want a stable community, with lots of advice, sample code, libraries, etc. A fragmented development landscape prohibits that – a unified one encourages it.

I could go on – you get the point. Best of all? It weeds out poor developers. And if the iPhone SDK and HTML5 aren’t your thing – go build somewhere else. I’m sure there’ll be another computing revolution in a decade or two that you can ignore yet again. 🙂

(and if you’re a good developer – we’re hiring and we’re having more fun than you can possibly imagine)

It’s good for Apple.

They get better apps. Happier end users. More productive good developers. Fewer bad developers. And, of course, they make more money. They did invent the software, devices, and App Store, afterall. Why should they marginalize themselves out of their own business?

It’s even good for Adobe

Granted, not quite as good for Adobe as having Flash on these devices. 🙂 But lets not forget that Adobe has a stable of great applications, like Illustrator and Photoshop, which aid iPhone development. Their sales will still boom.

Finally, Adobe is incentivized, finally, to actually improve Flash. I’ll bet if Adobe actually made Flash stable, fast, and power efficient, it could get added to the iPhone for use in-browser. It’s not like Apple enjoys seeing half rendered web pages in their browser – they just enjoy customer complaints about crashing and poor performance less. Believe me – I know all about customer complaints due to poor Flash behavior.

But that window of opportunity is closing – the owners of those web pages don’t enjoy their stuff being half-rendered either. They’ll rush to fix that problem – without Flash – if Adobe doesn’t fix it for them.

So there you have it. Thanks, Apple, for doing what’s best for the web, your customers, and developers like me. The future is bright. Long live web standards!

(this post written on an iPad in WordPress’ excellent app)

UPDATE #1:

I understand many disagree, and have their own reasons. Go write for Android, another great platform that’s more open.  Maybe if you do, Android will ‘win’.  I think you’re confusing platform choice and development choice here.  Personally, I’d love to have more platform choice.  Who wouldn’t?  But Apple did invent this thing.  They certainly deserve to make whatever decisions they want about it.  If you’re right, and I’m wrong, those decisions will kill the platform.    I happen to think I’m right, and I happen to think Flash needs to seriously improve – and the Apple’s the only way that’s gonna happen.

Note that I don’t have an opinion on things like MonoTouch, which I know nothing about.  It could very well be that Apple painted with too wide of a brush here and excluded some things that should really be included.  I just don’t know.  I do know, though, that history has shown that cross-platform languages and frameworks have an abysmal success rate.  The last thing we need is watered down apps built for the lowest common denominator.

Finally, yes, SmugMug uses Flash.  I’m sure we’ll continue to use it.  Like I said, it’s slick and whizzy and like a drug.  We used it because it was the only tool for the job.  Adobe did a great thing with their h.264 support, and we love our Flash apps – when they work.  But it’s been awfully frustrating to watch Flash continue to crash and perform poorly for our customers, especially because Adobe doesn’t seem to care.  They certainly don’t respond to us when we ask for help, and they certainly haven’t fixed their issues with multiple releases.  I’m hopeful that this sudden pressure and increased competition will cause them to bring Flash up to the level of their other superb products like Lightroom.  If not, you’ll certainly see us move away from Flash as HTML5 support and performance continues to improve, just like everyone else on the web.  We can play Quake II in HTML5, for heaven’s sake!

UPDATE #2:

Steve Jobs on Adobe.  Amen, brother.

Categories: apple, iphone Tags: , , , , , ,

Great things afoot in the MySQL community

December 23, 2008 37 comments

tl;dr: The MySQL community rocks. Percona, XtraDB, Drizzle, SSD storage, InnoDB IO scalability challenges.

For anyone who lives and dies by MySQL and InnoDB, things are finally starting to heat up and get interesting. I’ve been banging the “MySQL/InnoDB scales poorly” drums for years now, and despite having paid Enterprise licenses, I haven’t been able to get anywhere. I was pretty excited when Sun bought MySQL since their future is intrinsically tied to concurrency, but things have been pretty slow going over there this year.

But the community has finally taken up arms and is fighting the good fight. It’s (finally!) a great time to be a MySQL user because there’s been lots of recent progress. Here’re some of my favorites (and highlights of work left to do):

PERCONA

I can’t sing Percona’s praises enough. They’re probably the most knowledgeable MySQL experts out there (possibly even including Sun). Absolutely the best bang for the buck in terms of MySQL service and support – better than MySQL’s own offering. (If I had to guess why that is, I’d bet that MySQL/Sun don’t want to step on Oracle’s toes by fixing InnoDB – but >99% of what we need is related to InnoDB. Percona has no such tip-toeing limitations.) Let me quickly count the ways they’ve helped me in the last few months:

  • They knew of a super obscure configuration setting “back_log“. Have you ever heard of it? I hadn’t. But we started seeing latency on MySQL connections (up to *3 seconds*!) on systems that hadn’t changed recently (exactly 3 seconds sounded awfully suspicious, and sure enough, it was TCP retries). After going through every single kernel, network, and MySQL tuning parameter I know (and I know a lot), I finally called Percona. They dug in, investigated the system, and unearthed ‘back_log’ within an hour or two. Popped that into my configuration and boom, everything was fine again. Whew!
  • We have servers that easily exceed InnoDB’s transaction limits. Did you know InnoDB has a concurrent transaction limit of 1024? (Technically, 1024 INSERTs and 1024 UPDATEs. But INSERT … ON DUPLICATE KEY UPDATE manages to chew up one of each). I know all about it – I’ve had bugs open with MySQL Enterprise for more than 2 years on the issue. What’s more, these are low-end systems – 4 cores, 16GB of RAM – and they’re no-where near CPU or IO bound. It took MySQL months to figure out what the problem was (years, really, to figure out all the final details like the different undo logs for INSERT vs UPDATE). Their final answer? It’ll be fixed in MySQL 6. 😦 Note that 5.1 *just* went GA after years and years. On the other hand, it took Percona one weekend to diagnose the problem, and 13 days to have a preliminary patch ready to extend it to 4072 undo slots. Talk about progress! (And yes, we want Percona to release the patch to the world)
  • Solving the CPU scaling problems. These have been plaguing us for years (we have had some older four-socket systems for awhile … now with quad-core, it’s even worse), and thanks to Google and Percona, this problem is well on its way to being solved. We’re sponsoring this work and can’t wait to see what happens next.
  • XtraDB. This is the biggy. So big it deserves its own heading….

XTRADB

Oracle’s done a terrible job of supporting the community with InnoDB. The conspiracy theorists can all say “I told you so! Oracle bought them to halt MySQL progress” now – history supports them. Which is a shame – Heikki is a great guy and has done amazing work with InnoDB, but the fact remains that it wasn’t moving forward. The InnoDB plugin release was disappointing, to say the least. It addressed none of the CPU or IO scalability issues the community has been crying about for years.

Luckily, Percona finally did what everyone else has been too afraid to do – they forked InnoDB. XtraDB is their storage engine, forked from InnoDB (and then turbocharged!). We’re not running it in production yet, but we are running all of the patches that went into XtraDB and I can tell you they’re great. We’re sponsoring more XtraDB development (and yes, we made sure Percona will be contributing anything they build for us back to the community) with Percona, and I’m sure that’ll continue.

DRIZZLE

I’ve already blogged a bit about Drizzle, but it sure looks like Drizzle + XtraDB might be a match made in heaven. Drizzle can be though of as a MySQL engine re-write with an eye towards web workloads and performance, rather than features. MySQL 4.1, 5.0, and 5.1 added a lot of features that bloated the code without offering anything really useful to web-oriented workloads like ours, so the Drizzle team is ripping all that stuff back out and rethinking the approaches to the things that are being left in. Very exciting.

SSD STORAGE

The advent of “cheap enough” super-fast SSD storage is finally upon us. I’ve got Sun S7410 storage appliances in production and they’re blazingly fast. I have a very thorough review coming, but the short version is that even with NFS latencies, we’re able to do obscene write workloads to these boxes (let alone reads). 10000+ write IOPS to 10TB of mirrored, crazy durable (thanks ZFS!) storage is a dream come true. Once you mix in snapshots, clones, replication, and Analytics – well, it just doesn’t get much better than this.

(Don’t get sticker shock looking at the web pricing – no-one pays anything even remotely like that. Sign up for Startup Essentials if you can, or talk to your Sun sales rep if you can’t, and you can get them much cheaper. I nearly had a heart attack myself until I got “real” pricing. Tell them I sent you – enough Sun people read this blog, it might just help 🙂 ).

STILL NEEDED…

So, all in all, there’s been an awful lot of progress this year, which is great. CPUs are finally scaling under InnoDB, and we finally have storage that isn’t bounded by physical rotation and mechanical arms. Unfortunately, great CPU scaling plus amazing IO capabilities isn’t something InnoDB digests very well. As is common in complicated systems, once you fix one bottleneck, another one elsewhere in the system crops up. This time, it’s IOPS. It was eerie reading Mark Callaghan’s post about this last night – I’d come to the exact same conclusions (from an Operations point of view rather than code-level) just yesterday.

Bottom line: Despite having ample CPU and ample IO, InnoDB isn’t capable of using the IO provided. You can bet we’ll be working with Percona, Google and Sun (read: sitting back and admiring their brilliant work while writing the occasional check and providing production workload information) to look into fixing this.

In the meantime, we’re back to the old standbys: replication and data partitioning. Yes, we’re stacking lots of MySQL instances on each S7410 to maximize both our IOPS and our budget. Fun stuff – more on that later. 🙂

UPDATE: Just occurred to me that there are plenty of *new* readers to my blog who haven’t heard me praise Google and their patches before. Mark Callaghan’s team over at Google definitely deserves a shout-out – they’ve really been a catalyst for much of this work along with Percona.

Hot technologies I care about – Sep '08

September 17, 2008 30 comments
Iron Worker by ikegami

photo by: ikegami

I’ve been too busy to blog lately, and for that I apologize.  But here’s a quicky detailing the technologies (internet related and not) I’m excited about right now:

  • Drizzle.  For years now, I’ve felt that MySQL has been doing in a direction in opposition to my use case.  Stored procedures, views, etc etc have added bloat and complexity without offering me anything useful.  Turns out I’m not alone – and thus Drizzle was born.  To say I’m *super* excited about this is a serious understatement.
  • Google & Percona’s MySQL patches.  While I wait for Drizzle, I’m stuck dealing with terrible concurrency issues in MySQL/InnoDB that force us to partition data way before we really should have to, making our system more complex.  It’s crazy having a server keel over when it shouldn’t be either CPU-bound *or* IO-bound but that’s life with MySQL and InnoDB these days – or at least, it was until Google and Percona fixed what I couldn’t get MySQL to fix with our Platinum Enterprise subscriptions.  Open source rules!
  • Flash storage.  I really wish I could talk about this some more (pesky NDAs), but there are datacenter changes coming that are more dramatic than anything I’ve seen in 14 years of working on them. I hope I’ve talked to everyone in the space (and from the companies I’ve talked to, one of them seems to be the *very* clear winner for this upcoming round), but if you’re a storage vendor working on flash appliances and I haven’t talked to you, ping me.  We’re a bleeding edge customer and we’ll put your stuff in production faster than you can deliver it to us.  🙂
  • ZFS.  Regardless of flash storage, ZFS is the filesystem of choice – head and shoulders over everything we’ve used or heard of.  The advent of flash just makes this even more compelling.  The downside?  It’s not on Linux.  😦
  • OpenSolaris.  ZFS is so incredible, my hand has been forced, and we’re about to put our first OpenSolaris system into production.  OpenSolaris is, in theory, the Solaris kernel (think ZFS, DTrace, SMF, high concurrency, etc) with the GNU-like userland (think Linux-like).  In practice, it’s still extremely painful for a Linux expert and Solaris n00b like me to use – even on a single-purpose machine like a MySQL server.  Only ZFS makes the pain worth it.  For development, it’s basically unusable for Linuxers (it’s probaby fabulous for Solaris guys – lucky ducks).
  • Nexenta.  Unlike OpenSolaris, Nexenta *is* the Solaris kernel plus GNU userland.  Unfortunately, it’s not backed by Sun or anyone else I have any relationship with.  Sun has been absolutely the very best technology vendor we’ve ever dealt with in terms of support, technical knowledge, and just plain listening to us, so that’s a big issue.  I wish Sun had taken Nexenta’s approach (or would just buy them or offer support or something).  If OpenSolaris continues to be painful, we may fall back on Nexenta instead – remember, ZFS is the driving factor here.
  • Amazon Web Services competitors.  They’ve been promising they’d be coming out for years now and I’m shocked they’ve given Amazon this much runway.  But I believe a few more are getting very close (can’t say more, again, pesky NDAs).  Now, we’re extremely happy with Amazon, so we have no plans to switch, but competition is good for everyone – and Amazon is a fierce competitor.  Plus there are still gaps in Amazon’s strategy, and if I can mix & match to plug some of those gaps, awesome – sign me up.
  • Memcached.  This one’s been on my list for years, and it’s still way up there.  Binary protocol on the verge of shipping, nice patch to resolve some networking issues we’ve seen, and talk about scabability.  If you’re building web apps and this isn’t a core part of your infrastructure, you’re doing it wrong.
  • Big RAM.  4GB DIMMs are dirt cheap, so if you’re not loading your DB and Memcached boxes to the gills, you’re missing the boat.  Cheap 2-socket 64GB (and relatively cheap 128GB at 4-sockets) are here.
  • Sun Fire X4140 and X4440.  The best 1U (2-socket) and 2U (4-socket) servers on earth.  Despite being late to the game with quad-core, Opteron RAM performance kills Xeon, so these are the servers we’re buying.  You can load them to the gills with 4GB DIMMs, enjoy the dual-power supplies (yes, in the 1U box too), and crank out some great stuff.
  • OpenSocial, Y!OS, etc.  The big boys are finally getting real about getting open and cross-pollinating data and I think we’re finally nearing an inflection point.  We’re hiring a Sorcerer to do nothing but think and build in this space.  I’m sure magic will ensue.
  • Nikon D90 and Canon 5D MkII.  Nikon’s taken the photography world by storm with amazing high-ISO performance, and Canon just announced a DSLR that shoots full 1080p video.  Both look amazing and both are game-changers.
  • Onkyo TX-SR806.  I’m an A/V junkie and this thing is amazing.  5 HDMI inputs (need more?), THX Ultra2 Plus (the low-volume enhancements are *awesome* with young kids sleeping at home), automatic room EQ, decodes every modern audio encoding, etc.  I don’t even use the amplifier section (I have separates), but it’s turning out to be the best Pre/Pro I’ve ever owned.  Sounds fabulous on my gear.
  • iPhone App Store.  That thing is a game changer, and we’re barely seeing the tip of the iceberg.  All the other players have to respond – which is great for you and I.  And talk about a platform that’s a dream to develop on!
So there you have it.  Those are the most important pieces of tech I’m watching these days.  I’ll *definitely* be writing up our ZFS experiments as they come along and I have interesting data to share.  Stay tuned.  
 
Oh, and if you’re curious about what I *wish* was on the list, there’s really only one thing:  iTunes syncing.  I have two desktops (one at my office, one at home) and two laptops, plus my wife has accounts on my computers.  Keeping those all in sync so that when I update a playlist at the office, the update is waiting for me at home, is a nightmare.  I’d pay lots of money if someone could solve that – seems like iTunes + AWS + a smart coder = solved, no?  Wish I had some time….

I demand video to be awesome.

April 25, 2008 66 comments

 

Sam “Shizam” Nichols, creator of the video player, donning his SmugMug Hero persona. See it in HD.

The state of video codecs online has been a mess and there’s been no clear choice, making it very difficult to do awesome video sharing. Luckily, all of that changed when Adobe finally added H.264 support to Flash.

Thanks to Adobe, we finally have a video codec that we can get behind and that’ll be great for our customers. And so back in December, we released a major new update to our video offering that’s 100% based on H.264. And it supports resolutions all the way up to 1280x720p. That’s right – SmugMug has truly awesome hi-def video sharing.

Today, I’m thrilled to announce that our Flash player is out (we used QuickTime for a few months while we polished up our player), so it’s easier than ever to embed on your blogs and share with your friends:

Here’s all the gory details:

  • Upload almost any video format you like. We’ll do our best to convert to H.264 in an extremely high quality way. (Thanks EC2!)
  • We’ll generate multiple sizes for you, so you’ll have a version that’s perfect for sharing on the web (YouTube size), perfect for using on your iPod/iPhone (DVD size), and even your Hi-Def TV in your living room.
  • We’ll automagically display just the right sized video for whichever browser and monitor you happen to be using. Ditto for your friends. Example from my friends in Dallas hard at work on Duke Nukem.
  • You can embed the videos in your blog, website, or wherever else you like online. And you can do so at DVD quality resolution – 640×480 – more than 4X the pixels and quality of YouTube.
  • You (and your friends and family, if you let them) can easily download all the different sized versions of your videos so you can do whatever else you’d like with them, like add them to YouTube or burn to a DVD.
  • H.264 means it’ll play on a huge, wide variety of computers and devices, not just SmugMug. iPods, AppleTV, Playstation 3, and the list goes on…
  • Speaking of Apple devices, we provide a complete podcast RSS feed for your account that you and your friends can subscribe to with a single click in iTunes. All your iPods, iPhones, and AppleTVs will then magically stay up-to-date. All your online videos in your pocket, and your living room, all the time. Neat, eh?
  • I’m thrilled we’re making good use of the OpenShareIcon project, too. Rather than use some trademark-encumbered, company-owned, non-open ShareIcon, we’ve chosen to use the real deal. Viva open web standards!
  • One gotcha: Flash takes 200% more CPU to play video on the Mac than QuickTime does, so in-gallery, Mac users will still see QuickTime. We can’t wait until that’s not true – but that’s up to Adobe, not us. 😦

So there you have it. I’ll probably post again soon with lots more detail about how great the integration is with Apple devices: iPod, iPhone, iTunes, and AppleTV. We love us some Apple over here at SmugMug. 🙂

Oh, and you can count on our video player to continue to rapidly evolve. This is definitely just a 1.0 product – it may have some warts and it’ll get even better over time.

So go wild – share your crystal clear video with the world!

Oh, and demand your video to be awesome (sorry about the quality – that’s the best I could find from Verizon. SmugMug *did not* make it all blocky and ugly):