Video
Đăng bởi Quản trị viên OpenER ·
Tác giả giữ toàn bộ bản quyền (All Rights Reserved) — không phải giấy phép mở. Bạn vẫn xem và học miễn phí trên OpenER; muốn tái sử dụng cần xin phép tác giả.
DAN GARCIA
And welcome back. Now let's finally see it, a warehouse-scale computer. How does it even work? So why cloud computing now?
Let's talk about why this didn't happen 10 years ago or 20 years ago. These extremely large data centers, 10,000 commodity PCs, more users built out of the demand.
In the early days — let's go back 20 years. Every company used to have their own IT department. They probably had some servers in their basement, and they basically rolled their own.
Every kind of reasonable-sized company was rolling their own.
And then as you had big companies — the Googles, the Amazons of the world — I guess Apple is somewhere in there, Facebook is in there as well — they realized they needed a much larger scale than just a basement set of computers that they'd have.
And that large scale allowed them to think about, well, as we're growing, if we're paying this much money, how should we build these? Well, they started to build them out of commodity PCs.
I mentioned before, they realized that not having the highest-end gaming machine and putting multiples of those in there, but having the cheapest — best value per dollar. Really, it's about commodity PCs.
And they just decided, there's a higher failure rate for those machines, but we'll live with that. We'll work with that. It's definitely bad.
So the economy of scale was it's actually five or seven times cheaper than provisioning a medium-size facility per machine, per instance. They also had more pervasive broadband internet.
So they could actually access these things efficiently. And again, commoditization of hardware or software is to help help with that. It was certainly standardization of software stacks.
So I looked up recently what the instance prices were. If you did the reading, then you'll see that they talked about a particular example in the reading, the warehouse-scale computing you read.
And this is Amazon Web Services, AWS.
And this is — right here, this guy, this particular one here — is the example that's closest to the example they talked about in that reading, which is about $0.33 an hour, or three hours per dollar.
In terms of the ratio of the smallest, you can buy a very minimally-provisioned machine, a very minimally-provisioned machine, the 2 gibibytes of RAM, two cores, very small, very small.
Cheap, $0.02 an hour. Remarkable. But if you want a little more power, you've got eight virtual cores, 32 gibibytes of RAM. I appreciate that.
But again, three hours per dollar. So it starts to it starts to add up.
If you leave it on and forget it's running — I can probably leave this on — this price is 16 times more expensive.
I could leave this guy on for a while and not worry about it too much. But the one below it, you really want to watch out for that.
And what's incredible is — and so there's tons of knobs you can choose. I want to have more memory, I want to have high CPU. And so you can decide what you want.
They do give you what called EC2, or a compute integer unit. This is a number, a kind of a spec. A specification tells you what you're buying.
And so you can really say, well, I need to have this much power, but at a high-memory system. Well, no, no, actually, this power, because there's a CPU.
If it's really a CPU — you'd look at your data and you'd say, what is this computation really needing? Is it needing a lot of memory?
Is there not a lot of compute — I don't need a lot of CPU cycles, but I need a lot of memory. Load the whole matrix in to do a couple of searches.
But I don't want to have to go to disk. So I want a high-memory machine. Or maybe it's not a lot of memory needed, but a lot of CPU.
But I'm going to be crunching on a couple small data sets. So you're playing with what you want, high CPU, high memory, or just a standard system that's a little bigger than that.
So you decide what you want in terms of that. But there's a whole scale there.
What's amazing to me is that at these low rates — it feels like low rates to me to have this machine — somebody's going to keep the machine up.
And they'll keep all the worry about making machine up, failures, all those things, they'll take care of it. I just have to rent the machine. That's a pretty good deal.
I appreciate that, just for compute or storage, too. They also have Elastic Block storage and have a $0.10 per gigabit — this is gigabit — per month.
Or for a hard drive or a spinning drive, it's $0.04 gigabyte per month. Gigabyte month, I said gigabyte month. So if you want more gigabytes or more months, it's a gigabyte month.
Remember that. It's not gigabyte per month, it's gigabyte month, also important.
You can also get any of the machines with an attached SSD if you need to have some local stuff that you play with. And you can choose and explore your space with that.
So again, here's the idea. You have this massive data center, 100,000 to 10,000 servers all in one building, emphasizing cost efficiency, but you really need to pay attention to power.
So keeping these guys cool is really where a lot of your engineering goes and a lot of your thought goes, a lot of your square footage goes, is to thinking about keeping those things cool.
It's relatively homogeneous. So, yes, okay, that was version 1 of the commodity version. You upgrade them, and so now has an upgrade.
Maybe some of them are still version 1, some of them are version 2. But mostly, they're homogeneous in terms of hardware and software.
You offer incredible amounts of software as a virtual platform, social networking, video sharing. You can allow companies to buy time on your rack, and this is very exciting for many companies.
Very availability. We call it five 9's of availability. So less than an hour of downtime per year, which is incredible.
And, in fact, sometimes, you can look up on some of the news articles where you see, whoa, if Amazon goes down, some particular Amazon warehouse goes down, what will happen is many companies will go down with them.
Why was this site offline? Well, because it's served on that particular thing.
You remember that there was a flood on the Eastern seaboard that took away a lot of services and the services go down with it. So it's not just Amazon who's going to suffer that.
They've got a ton of redundancy across that you probably won't notice on the Amazon side.
But you'll notice on the smaller compute side, they might not have been paying for that redundancy in their systems.
So sometimes services will go down because they're running on the AWS local system, which itself went offline. Who knows?
Anyway, two researchers said warehouse-scale computers are no less worthy of the expertise for computer system architects than any other class of machines.
You can deal with the really small micro-level, kind of the smart dust level, all the way up to a particular CHI CPU.
We spent a lot of time talking about building faster chips to building a faster computer with a lot of chips in it, to building now a warehouse of lots of those computers.
So it's a fun space. It's at the macro scale that we're dealing with here. Now, I give you a really fat check, $10 million or more.
And I say, build one of these warehouses for you. What are your design goals? What are you thinking of when you're building this warehouse-scale system?
A ton of parallelism, just incredible number of parallelism, largely number-independent data sets, independent processing. We call this again, data-level parallelism.
What are the issues of scale, and what are the opportunities? Well, there are not many of them.
If I say, well, go look around the world for other warehouse systems to model yours after, there aren't that many of them. There's just a handful of these very wealthy companies building these systems.
So it's not like, well, there have been four billion implementations of a particular chip, let's look at the four billion and first. Okay, I look. What did they do wrong?
What did they do right?
It's hard to — if only four or five of these has ever occurred, or four or five different models have ever occured — I mean, there's certainly many more of these that totally occurred.
But in terms of how many different models, you got Facebook's model, you got Amazon's model, you got Google's model, Apple's model. How many more?
There's not that many more of these big, big companies running these big warehouse-scale systems. You can certainly get price breaks for purchases of commodity things. I'm about to buy a million of your computers.
How low can you go? Because if you don't go there, I'm going to this company. So you can playing them against each other to get some of those numbers down.
And you're going to have a high number of component failure.
So you have to have somebody — and, by the way, if you've seen these — I'm going to show you some videos at the end of this.
There are videos of people who are replacing drives, because there's a job whose title is, you're the drive replacement person. Now, you could be worse. You could be shoveling something, shoveling poop or something.
But the point is, your job is just to skate around. And they have roller blades, and they skate around and they bring those out, hard drive swap, bop, bop, bop, done.
Hard drive swap in a RAID system. These RAID systems allow for hard drive failures without data loss.
So normally, if you don't think about a RAID, you have a single drive in your home computer, once it fails, you've lost data. Well, not if you have redundancy there.
We're going to see this in a lecture a little later. I can have enough redundancy that it can have one or maybe even two fails, depending on what level of RAID you have.
So you can lose a drive, replace a drive. As long as you don't have past a certain limit, then you won't have any failures.
So this whole system, this whole particular configuration, you can have a drive fail. And because I have redundancy, I don't lose the data. That's amazing.
So you have somebody whose job it is just to rollerblade around and replace drives. Pretty incredible, good job, fun.
Here's another key piece of this is, the cost of equipment purchase, the check you write is not a one-time check to build this system.
I've built the system, but now the cost of ownership is far greater than the cost of purchasing it initially. You've got power, you've got cooling, you've got manpower, all those things replacing hard drives.
All those ownership, the cost of ownership is far greater than the cost of the initial purchase.
So it's not just, well, thank you for the check, but I'm going to be needing a check every month to pay for all the overhead I have to put into the system.
Here's the first picture. Here's Google's Oregon warehouse-scale computer. And what are a couple of things you notice? It's in the middle of nowhere, first thing I'm seeing.
[LAUGHS] It's beautiful. It's a beautiful picture. It's the middle of nowhere. And the reason for that?
Privacy. You've got corporate sensitive data here. Who knows what company is borrowing your system to put their stuff there? They You don't want this to have an easy location.
You want it to be very hard to get there. So that's number one. Two, land is cheap. You're in the middle of nowhere.
Land is cheap.
So go buy — if you're going to have this much land, go buy it where the cost of the land isn't very high, where no one is going to competing with you.
Don't put this in the middle of the city. That's the worst place to put it, ever, obviously. It's in Oregon. What's Oregon telling you?
It's cool in Oregon. It's not in the heart of the hottest state in the union. Oregon's a pretty cool place. So temperature is an important thing.
You could put this in a place where there's going to be snow, and you have to deal with keeping this warm, bah, bah, bah, bah.
There's a little of that as well, but you don't want to have to deal with a lot of temperature variations. And you're near a river. You might never have thought about that.
What's that mean? Well, maybe you can be very clever in terms of bringing some of that water in and helping with your cooling system and maybe warming it out there.
So there's maybe a way to work on saving costs by using water-controlled cooling, thinking about that.
In fact, here's a zoomed-in version of that. And then if you look down here, if I Zoom into that even more, you know what that is?
That whole building — in fact, you can see that from a distance, that whole building is the cooling center.
That is such a big part of this, that keeping these servers, which generates so much heat, cool requires an entire building to just refrigerate them, that system.
So we'll talk about that a little later. But that's a very big consideration, design consideration, is making sure you've handled cooling well.
Inside, what they've discovered is they build these containers, the same shipping containers you see on the big boats taking things to and from other countries on the oceans.
They decided to just — and, by the way we had one in Soda Holl. We had a trial container in the back side of Soda Hall for a while.
We used to have a sand volleyball pit. Then we had a warehouse scale when we had one of these containers with servers in them, to practice, to play with them, to explore that space.
So we had one of these at Soda Hall for a while. It was really fun. So what you've got is they stacked them two-high, which is an interesting model.
They have access — they put them at an angle. It's almost like when you park a car in a parking lot.
And then inside a container is just an incredible, incredible high density of servers.
Typically, what you're seeing, by the way, is the back — they put them all — this aisle, this aisle is all the user-facing parts.
So this is all the parts where you would maybe swap in a hard drive into that. And then the backside, where the usually exhaust is and the wiring is, that's on the far side.
So there's not a lot of wiring you're seeing here. The wiring usually is on the back side of that. So that's the nice thing.
Also, this could be — and also, by the way, sorry, this could be the wiring aisle. I'm looking at it here. I think this is the wiring aisle.
See all those wires that are coming out of that? There is another side, so there are different aisles. This is the back-side aisle, that's the front-side aisle.
It's the back-side aisle, it's the front-side aisle. You'll see that. So this is — by the way, you have to have easy flow.
You can't just have, well, I can't move it all in the wiring aisle. You have to have flow and move as you wire and you tighten them up.
You better be very organized with your wiring of it, you have a lot of cable ties that keep these things. Otherwise, it can be insane how many wires go around.
There'll be another aisle, which is where you'd be swapping the hard drives out. That'd be the front of these servers for that.
But that, I think, is the back-side with all the lights, I believe. So what do you see inside that system? You saw kind of a big picture of one of the aisles.
It starts with a server. These are often called one-use servers. They're about 1 and 3/4 — they're very heavy, by the way, and very deep. It's much deeper than you realize.
You say, oh, it's a computer, it's a gray beige box on the side of you. No, not at all, at all. It looks like a pizza box.
It's about 1 and 3/4 inch high, 19 inches wide, and then 16 to 20 inches deep. So it's really very heavy, very flat.
Inside that is a normal computer. You've got eight cores, 16 gibibytes or more of DRAM, and maybe four 1-terabytes or four 4-terabyte disks. That's the first level. So that's that little slicey guy.
Then you've got a rack. This is often 7-feet high, and you put 40 to 80 servers in that rack.
You've got a local area network of 1 to 10 gibibits per second, a switch in the middle, and that's called a rack switch. So right here is your switch.
Okay? Placed locationally right in the middle of it so it's easy to get to and also kind of equidistant from all of them, if you think about that space.
Finally, you've got an array. And that array, we often call a cluster. That's 16 to 32 server racks in that. And then this will be a larger cluster switch.
These are the racks — a larger and much more expensive cluster switch to be able to hand that, typically 10 times faster, but the cost is 100 times.
Because there's fewer of these, and the people say, well, you need it. You got to pay it through the nose for that.
So it's a function typically, n squared, in terms of the cost for that switch versus the local switch.
Here's, again, a picture of a server — SRA, Server, there's a Rack, and there's an Array. And I believe this is the front side of that. This is the user-serviceable.
So the wiring is in the back side, and this is the front side. I put an F there. It's the front side of this area. And there's a lot more room here between them.
They ought to be able to get between — you see this little air? That's loss of space. So typically, if you have the higher-end systems, they don't have those racks.
But this is kind of a smaller scale cluster. What's inside one of those machines? So that's the traditional way you build them. When Google did it, Google said, why do I need the case?
Let's build it ourselves. They literally build many of these things ourselves. So here's a Google computer. If you can see, what are you seeing here?
What am I seeing? Well, there's your power supply, there's your two CPUs, two double CPUs there, double fans on that. Here's our memory, obviously. Here's our hard drives.
And here's some connection — nothing else interesting. Here's a switch that is a slot that isn't being used. Here's that.
There's another probably something there, that's a heat sink on that, maybe some GPU, possibly.
This, you know what this is right here? This is the most important and interesting piece of it. It's a battery.
So this is — and you can tell it's a battery because it has just two leads to it, right? Batteries typically don't have more than that.
This is their version of an uninterruptible power supply. They've thought about having one big — an power supply basically says the power goes out. How do we handle this?
How do you both clean the power — sometimes the power is not a perfect 60 hertz, 120 volts peak to peak.
What you typically see, alternating current, you typically have that someone has noise in the system. That can be a problem for that.
And what happens when power goes out, you don't want to lose your system. Let's say the power goes, bloop.
Power went out for a second, for five seconds, for a minute, for an hour, for a day.
You want to be able to keep your computer up for as long as you can, for the battery. There's obviously a limit to that. And they played with an experiment with this.
At a hospital level, you put a big, uninterrupted power supply in the hospital basement that powers the whole hospital. You don't have a UPS at each floor, at each table.
You don't do that. You put a big one in the basement because it's a hospital. Google and other folks have tried that, having a big UPS.
And they realized it was more efficient to have a localized UPS for each one.
There's something about scale and cost and heat and other elements that are involved with putting a big massive UPS in the basement to handle the power for the whole system.
Their power draw is incredible. They decided it's actually more efficient to buy a localized UPS battery supply here. So that is the uninterruptible power supply in case power goes out.
They can still have that computer compute for a little while before the battery eventually dies. So now, let's take a step back and think about what performance is.
What does it mean to say something is faster than something else? So here's an example. 2009 Ferrari 599 GTB holds two passengers at 11.1 seconds for the quarter mile.
Let's call it 10 seconds to make it easy. And this is a school bus, 2009 Type D school bus, 54 passengers, quarter mile time. Say it's a minute, okay?
When you say, what's the performance of a system? We have to ask — it's almost like you tell the computer on Star Trek, you say, I want tea, Earl Gray.
It'll say, hot or cold? Two different flavors. If I say, I want to know this is the best performance, they say, well, do you mean response time or do you mean latency?
Sorry, do you mean response time or latency, which is the same thing, or do you mean throughput? I'm sorry.
So response time or latency means the time between start and completion of a single task. I just need one thing.
I just need you to take this raw metal and make it into a shape. Well, I'm not doing a million of them. I'm doing one of them.
What's my total latency between when I give you this until it's all done? In this case, what's the time between taking and moving a single person a quarter mile?
That would be the response time. Throughput says, how many of these can you do over time? So it's amount of work in a given time.
And for here, we're thinking about passenger miles in a one-hour system. So those are the two models.
So do you try to move a lot of people, or are you trying to move a single person?
So let's think about that. How long would it take you to move one person in the quarter mile in the Ferrari? Well, that's just 10 seconds for a quarter mile.
How long would it take you to move one person in the bus? A minute. So the Ferrari is much better than the bus in that model.
How long would it take you to move 54 people a quarter mile? Well, it takes a minute for the bus. Fill the bus up. Maybe there's some filling time and draining time.
Fill the pipeline, drain the pipeline. But I assume that that's a free thing. And, by the way, assume you can go back instantly, just for this week, back instantly.
Okay? So, in the case of moving one person, boy, you certainly want the response time or latency of the Ferrari.
But in terms of moving 54 people, boy, it's one minute to take a bus full of people a quarter mile. How long would it take?
It would take — it sounds like I'm counting on 27 10 seconds. That's a lot worse than one minute. So that's the throughput.
So the bus wins in terms of throughput, the Ferrari wins in terms of response time. And these are important as you're thinking of response times of our system.
Let's actually look at this when we talk about the array. Remember by server rack and array. I've got this array now, room full of computers.
I've got a local system, I've got a rack, and I've got my array. And as I look at this, it's a really interesting little chart here.
I've got one rack in a rack and 30 racks in my array. That's called a high-end here.
One server on my local computer, 80 Maxis number route, 80 in my rack, and 2,400 in my array. Eight cores, 640 cores. 19,000 cores, huh?
Pretty juicy, right? Don't you want this in your basement? That would be amazing. Look at this, though.
Look at this. I'm showing the numbers. 16 can be for DRAM, 1,280 and 38,000. Okay?
DRAM capacity. This capacity for TB, 320 and 9,600. Boy, that's a huge data file. That's very good, okay?
So pebibytes, right? Tebi and pebibytes, 9.6 pebibytes. Now, let's look at this following.
I have got DRAM latency, so that's the time for 1 byte to be written to DRAM in terms of microseconds, and disk latency, 1 byte to be written to disk.
Look at the difference. This, by the way, means local rack array.
What this says is, I'm going to not only have a distributed file system, but a distributed memory system, meaning I could write to another computer's DRAM.
If you allow for that in the OS — if you have an OS, a distributed operating system as well that allows for that, that's incredible.
It means that I can think of how much RAM my computer can run, not just what I locally have, which is 16 gibi, but I could think of my computer being able to have 38,400 kibi.
Pretty incredible.
So that's important that you understand this idea, that I'm going to be able to read and write not only to my local drive, to my local memory, but to my arrays any drive on my array or any memory in my array as well.
That's important. So now let's actually look at this. And green is better, and red is bad here.
So if I were to now look at the latency to write a single byte, well, you remember disk is going to Andromeda.
So to write a single byte here is 10,000 microseconds, basically 10 milliseconds, okay?
How about if I'm, rather than running to my own disk, what if I could write to your — when I say your, is another computer's memory — in my same array, your RAM?
What if I could write to your RAM? Here's my capacity of my disk for tebibytes.
Well, let's look at this, I've got DRAM of 38 tebibytes. So, look, I have got 4 versus 38.
If I had a thing that's like 3 tebibytes, well, it's more than my RAM has, but it's certainly not more than my array has.
So really interesting conversations when you think of using RAM as a disk, my network RAM as a disk, really interesting.
And it is faster — look at this — by a lot to write to your RAM rather than write to my disk, as long as I can fit it all in that.
Or maybe not just one person, not just one machine, but a collection of that. Really interesting if the OS can do that for you.
And now, let's look at, how about if I have to just stream? I got to just stream data. Just, brr, stream stuff. Not just one, but throughput.
Higher bandwidth — as one on the throughput here — to local disk. So this, by the way, I want smaller numbers. If I talk about latency, I want a smaller number.
And bandwidth, I want a higher number. This is megabytes per second for thinking about that. So what am I doing here?
I am writing to my own disk twice as fast as I can write to your DRAM. So remember thinking, all right, I can write to my own disk, your disk, my RAM, your RAM.
Certainly, right into my RAM is better.
But if I have a lot of data and I have to be just streaming it out there, it makes more sense to write to my disk versus your RAM.
And certainly, the worst is your disk, right? That's even worse. That takes all the penalty. So it's interesting.
This is a really interesting conversation to have.
This is the last slide on this particular lecture — to think that you might — the whole — it's like, you're mind-blown where you can think of a system, an OS handling and allowing a particular machine to not just write to its own RAM and its own disk, which is what you thought of all along, but to write to someone else's — that's a distributed file system, someone else's disk.
That's not so crazy. A disk is on the network somewhere. That's fine. But also someone else is RAM.
To think, what's the RAM that I have access to? It's all the RAM in my array. That's pretty interesting.
And that sometimes you want to write to my RAM, to RAM that is far away rather than your own RAM, or rather than — your own RAM if you can.
Your own RAM is going to be the fastest. But rather than right to your own disk or someone else's RAM, write into their RAM. Pretty incredible.
So I hope this opens your eyes a little bit about what they're doing in these systems to get that performance that they're getting. Now, you remember that Spark was done in RAM.
Look at all the RAM.
You think about array having all the RAM being able to be used, and no one's ever touching disk at all, except to initially probably read the file at the beginning of the day or beginning of the job, and write the file at the end of the job.
But all the intermediate computation was done in RAM. That's why Spark is better than MapReduce. We'll see you at the next video.
Đăng nhập để đánh giá học liệu này.
Đăng nhập để bình luận — chưa ai bình luận về học liệu này.
Không có khóa học liên quan.