WAFL Performance: Making writes go faster with fewer IOPS

cross posting from my corporate blog

Like every storage array, Data ONTAP attempts to make the latency of the average read and write operation be lower than the actual latency of the underlying disk drive.

Unlike Real FiberChannel systems, how Data ONTAP does achieves this is quite unique.

The Latency Challenge

If you’re a storage array life looks like a set of random read and write operations that you have to immediately respond to. The temptation is to take a request and immediately go to do disk to get it as fast as you possibly can.

But that’s kind-a-stupid.

When you look at read operations you realize that they tend to be clustered around the same piece of data. So although an application may be asking for one 4k block of data, the reality is that the next piece of data it will ask for is probably sequentially next to the first 4k block of data, or is in fact the same 4k block of data!  Given that, it makes sense to do two things:

  1. Keep the 4k around in memory
  2. Get more than 4k when you go to disk so that the next request is serviced from memory and not disk.

In effect by using memory you can reduce what would have been three IOPS into one actual disk IO.

Write operations are a little bit more complicated. Obviously when you acknowledge a write you’re making a promise to the application that the data is committed to stable storage. Superficially this would imply that every write operation has to go to disk since that’s the only available non-volatile storage.

image

In this picture each box represents a distinct write operations. The letters designate the order in which they were received. If the storage array were to write to the data to disk as they arrived, then the storage array would perform 8 IOs. Furthermore, the latency of each IO would be the latency of the disk drive itself.

Enter battery backed memory…

Except it turns out that we can turn DRAM into non-volatile memory if we’re willing to keep it powered!

What that means is that once the data is in memory, and the storage array is sure that data will eventually make to disk, the write can be acknowledged. Now that the write operations are in memory it’s possible to schedule the write operations so that they are done sequentially.

image

In this picture the order in which the write operations are committed to disk is a->b->h->i->e->f->c->d->g even though the order that the application thinks they were committed to disk is a->b->c->d->e->f->g->h->i. Because the array re-orders the write operations, they can be written in one single IO, effectively a single sequential write operation.

The challenge is that you need to buffer enough write operations to make this efficient.

But WAFL, of course, is different

What I just described is how Real FiberChannel works. Effectively the location of the blocks (a,b,c, etc) are fixed on disk. All the storage array can do is re-order when you write them to their fixed locations.

What WAFL does is determine where the data has to go when the data is ready to be written. So using the same picture:

image

Rather than trying to put each block (a, b, c, d etc) in some pre-arranged location, WAFL finds the first bit of available space and writes the data sequentially. Like Real FiberChannel, Better than Real Fiber Channel will transform the random write operations into sequential operations reducing the total number of IOPS required.

Now what’s interesting is that WAFL doesn’t require that much memory to buffer the writes. And what’s even more interesting is because the fixed overhead to flush data to disk is negligible, there is no real value in holding onto the data in memory for very long.

Read and Write and IOPS

If you’ve been following this story, you’ll have figured out something very interesting: a write operation can be deferred but a read operation must go to disk. In other words, the array can choose when it goes to disk to commit a write, but if the data is not in memory, the array must go right then and there to get the data from disk!

So what makes a disk behave in a random fashion? Why the read operations, because the writes are always done sequentially!

So why do you need a lot of IOPS? Not to service the writes, because those are being written sequentially, but to service the read operations. The more read operations the more IOPS. In fact if you are doing truly sequential write operations, then you don’t need that many IOPS ….

But it’s read operations to DISK not read operations in general!

Aha! Now I get it…

The reason the PAM card is only a read cache is that adding more memory for writes doesn’t improve WAFL write performance… We’re writing as fast as we can write data sequentially to disk.

But adding the PAM card absorbs more read operations which reduces the number of IOPS that the storage system requires. And the best way to express reduced number of IOPS is requiring both fewer and slower disks!

If you can’t comment because of  an inability to get past the CAPTCHA, try a different browser. I’ve had success with IE. We’re having some problems right now and hopefully they will get fixed soon.

Twitter Blog

Finally learned some python and set up my own sourceforge repository.

I have a tool, I am calling twitterblog, which will take a set of tweets, format them into an html table and post them to a blog.

You can check out the tool at twitterblog.sourceforge.net

I am still in very early stages of the tool. Some short term goals are to create a windows installer.

The Eidos Rescue Plan: Naked Lara Croft?

 

The Eidos Rescue Plan: Naked Lara Croft?

No more? Over on tombraiderforums.com, a poster believed to be (but not confirmed as) "Tomb Raider: Underworld" creative director Eric Lindstrom says future Lara Croft games may go for a "Mature" rating.

The Teen rating meant we couldn’t do things we wanted to or were done in the past, but it was a publisher mandate at the tmie [sic]. It won’t always necessarily be so, though, the future can always be different.

Shares in Eidos rose 8% in morning trading.

Sex sells, and finally Lara Croft will be sexy. Well okay, she’s always been sexy.

Stargate: Atlantis Ends

Stargate :Atlantis ends much like Stargate: SG-1 ended, with a titanic battle right in front of Earth involving Zero Point Modules, Atlantis, and weapons platforms.

And now we have the launch of Stargate: Universe which is, apparently, a remake of StarTrek: Voyager and Space: 1999.

Like Voyager a terrible science experiment brings the crew to the outer edge of the universe. Like Space: 1999 the ship can not be controlled.

I am worried that this will be a fiasco much like Voyager was a fiasco. 

But I long to be proven wrong.

Wii Sports is best-selling game ever – Video Game Feature – Yahoo! Video Games

Wow. this is nothing short of amazing. I will say I played super mario twice, this game I played a lot. And was the reason I bought the Wii.

Well, that didn’t take long.

According to game-tracking website VGChartz, sales of Nintendo’s pop-culture phenom Wii Sports have surpassed those of legendary platformer Super Mario Bros., making the breakout Wii title the best-selling video game of all time. And it only took two years and two months to do it.

The data is based on cumulative worldwide sales figures ending the week of December 27, 2008, which indicate that lifetime sales of Wii Sports have exceeded Mario’s staggering 40.24 million units.

Shocked? Don’t be. Unlike most video games that can be bought at retail, Wii Sports comes bundled with the Wii hardware in every territory other than Japan and Korea. In other words, if you bought a Wii, you bought Wii Sports whether you liked it or not (chances are, you liked it). With over 45 million Wiis sold worldwide to date, it’s only logical that Wii Sports would start smashing records sooner or later.

WII SPORTS: RESORT SCREENS

And before you brand Wii Sports a false champion due to being bundled with hardware, consider that Super Mario Bros. was also sold as a bundle with the original Nintendo Entertainment System during its mid-80’s heyday. Plus, Wii Sports has been a major hit even in non-bundled form, topping Wii sales charts in Japan at over 3.2 million copies sold in 2008 alone.

A new version of the game, Wii Sports: Resort, is due out later this year.

Wii Sports is best-selling game ever – Video Game Feature – Yahoo! Video Games

Stargate Atlantis has turned into CSI

WTF? I am here watching Stargate: Atlantis and a CSI episode broke out.

But it’s a weird CSI episode. It’s set in Las Vegas, with CSI classic style. But it has a lot of elements from CSI NY and CSI Miami. The police headquarters look like the ones from CSI Miami. The music is classic CSI NY.

WTF?

Updated later

And now a soprano’s episode busted out. Fuck.

Okay so it’s a weird ass alternate dimension episode about exploring john shepherd.

It’s 1984.

cross posted from eastmeetswest.krung.net

I find it ironic that I became a Habs fan in 1984 because of a goaltender who only played 91 games in his career. After all there were better reasons.

I moved to Montreal in 1973 at the age of one.

image 

That year there was a Stanley Cup parade. And there were four more by the end of the decade..

Starting in 1974 my mom worked at the Montreal Children’s Hospital. She had a long term parking contract at a lot that was across the street from the forum.

image

My mother and I must have walked by the forum dozens of times. And not once did it register to either of us that this was the Mecca of Hockey.

My elementary school gym teacher was Bruce Blake,

photo

the son of Hector ‘Toe’ Blake. I mean, I was doing push ups, playing floor hockey, running with the son of a coaching legend, and I had no idea who he was. He was just the guy who made this slow, fat kid work out.

I started playing hockey at the age of 7. I mean sucked, but I still played. All my teammates imagined being

Guy Lafleur Larry Robinson

Guy Lafleur or Larry Robinson. All I wanted was to get off the ice and read a book.

My earliest memory related to hockey isn’t about a

Stanley Cup. It’s a front page article covering a car accident involving the great Guy Lafleur. I remember people being very anxious. I had no idea why. I thought he was a famous actor or a politician or someone important.

Neither the proximity to the forum, the Stanley Cup parades or the Great Guy Lafleur broke through my shell.

It was, of all people,

Steve Penny.

In 1984, the Habs sucked. Not sucked like they did in the late nineties or early part of the 2000’s. But they did suck relatively speaking. That was the first seasons since before my parents were born that they had had a losing season.

Late in that season, Jacques Lemaire became the head coach. It was an odd choice. Jacques had quit on Montreal to go become a coach in Switzerland. Apparently he wanted to be free of the Montreal press. While in Europe he learned of the neutral zone trap. A deadly, soul destroying defensive scheme that sucked the fun out of hockey. In 1983, no one knew what it was. And in fact, no one knew how to play the damned scheme.

But Jacques taught his team how to play this new style.

And by the time the playoffs rolled around, the team was executing the trap perfectly.

The Boston Bruins, who were at the time a great team, with players like Rick Middleton and Terry O’Reilly and

 

Pete Peeters were swept by the Habs. And after that all of Montreal had only one name on their lips: Steve Penny. And somehow that registered with me.

Before the playoffs he was a punch-line to a joke. Whose going to lead the Habs to the Stanley Cup? Steve Penny!

The improbability of a nobody playing that well was surreal. For a geeky kid, who sucked in sports, there was something almost mythic about that story line.

And then we beat the Quebec Nordiques in seven games. It’s funny now, but those were bitter rivalries. No, bitter is an understatement. Montrealers hated the Nordiques. We loathed their very existence. They had no right to claim any loyalties of any Quebecer. And yet they did. And so the series wasn’t just a series, it was a minor war.

And by then I was in love with this sport. A sport where some nobody could become mythic. It was like a fairy tale come true. The farm boy pressed into service by the king, saves the day and gets the girl. That was Steve Penny. That was hockey.

And by the time we met the Islanders I was hooked. At the age of 12 I had a 10ish pm bedtime. And now I was demanding that I be allowed to stay up until the game was over.  My parents were suddenly very worried. I, who had never shown any interest in any sport of any kind, was demanding he be allowed to stay up until the late hours of the night to watch the Montreal Canadiens play the New York Islander. They had no idea why I would care.

But we had a basement, so they allowed me this indulgence.

And we won the first two in New York. And by then, my dad was kinda curious to see what I was watching. But unfortunately midnite struck. And the magical run was over.

The Islanders figured out the lethal trap or maybe we stopped playing it, who knows.

But I was hooked.