I know memory is fairly cheap but e.g. there are millions of new videos on youtube everyday, each probably few hundred MBs to few GBs. It all has to take enormous amount of space. Not to mention backups.
Google just has a lot of storage space. They have dozens of data centers, each of which is an entire building dedicated to nothing but storing servers, and they’re constantly adding more servers to previous data centers and building new data centers to fit even more servers into once the ones they have are full.
IIRC, estimates tend to put Google’s current storage capacity somewhere around 10-15 exabytes. Each exabyte is a million terabytes. Each terabyte is a thousand gigabytes. That’s 10-15 billion gigabytes. And they can add storage faster than storage is used up, because they turn massive profits that they can use to pay employees to do nothing but add servers to their data centers.
Google is just a massive force in terms of storage. They probably have more storage than any other organization on the planet. And so, they can share a lot of it for free, because they’re still always turning a profit.
There are also techniques where data centers do offline storage by writing out to a high volume storage medium (I heard blueray as an example, especially because it’s cheap) and storing it in racks. All automated of course. This let’s them store huge quantities of infrequently accessed data (most of it) in a more efficient way. Not everything has to be online and ready to go, as long as it’s capable of being made available on demand.
You can feel it on YouTube when you try to access an old video that no one has watched in a long time.
every time it lags, it’s because youtube has to send someone down to the basement to retrieve the correct blu-ray disc from a storage room
That’s the difference between getting a video served off a disk off in some random DC in some random state vs. the videos being served off a cache that lives at your ISP.
It’s not offline storage vs. disk, it’s a special edge-of-network cache vs. a video that doesn’t live in that cache, but is still on a hard drive.
It’s far more likely that Google, AWS, and Microsoft are using tape for high-volume, long-term storage.
According to diskprices.com, these are the approximate cost of a few different storage media (assuming one is attempting to optimize for cost):
- Tape $0.004 - $0.006 / GB
- HDD $0.009 - $0.012 / GB
- BluRay $0.02 - $0.04 / GB
- SSD $0.035 - $0.04 / GB
- microSD $0.065 - $0.075 / GB
Doesn’t BR only have like 100 gigs capacity? That would take a shitton of space.
They use tapes for backups, but indeed there ought to be something inbetween.
https://engineering.fb.com/2015/05/04/core-data/under-the-hood-facebook-s-cold-storage-system/
This is an article from 2015 where Facebook/Meta was exploring Blu-ray for their DCs. You’re definitely right though. Tape is key as the longest term storage.
They’re really using optical storage as a backup that can then be near-instantaneously accessed? That’s awesome.
Let’s be honest, it isn’t “free”. The user is giving their own data to Google in order to use there services; and data is a commodity.
Kinda starting to seem like “data” is becoming less and less valuable, or am I wrong?
It’s the same story with AWS as well. They use vast amounts of storage and leverage different tiers of storage to get the service they want. It’s funny but they have insane amounts of SD cards ( cheapest storage available at the size) and use that for some storage and just replicate things everywhere for durability. Imagine how small 256GB SD cards are and they you have hardware to plug-in 200 of them practically stacked on top of each other. The storage doesn’t need to be the best, it just needs to be managed appropriately and actively to ensure that data is always replicated as devices fail. That’s just the cooler tier stuff. It gets complex as the data warms.
Yeah this seems false. SD cards are unreliable, hard to keep track of, and don’t actually store that much data for the price. I do think they use tapes though to store long term, low traffic data.
We use LTO tapes in Hollywood to back up raw footage; it wouldn’t surprise me if AWS uses tapes for glacier.
I got a tour of Iron Mountain once (where we sent tapes for long term archival). They had a giant room with racks and racks of LTOs, and a robot on rails that would make copies of each tape at regular intervals to keep the data from corrupting. It looked kinda like the archive room in Rogue One. Wouldn’t surprise me if Iron Mountain was an inspiration for the design. Super interesting.
Absolutely huge data centers.
A full third of my towns real estate is currently covered with a sprawling Google data center. Just enormous.
I love driving through it when I go up to Winchester. Data center galore.
Not only that but for each video on YouTube there are different versions for each resolution. So if you upload a 1080p video, it gets converted to 1080p AVC/VP9, 720p AVC/VP9, 480p… also for the audio.
If you run youtube-dl -F <youtube url>
you will see different formats.
Does youtube actually store copies of each one? Or does it store 1 master copy and downsaple as required in real time. Probably stores it since storage is cheaper than cpu time
If it converts every video in realtime it will require a lot of CPU per server, it’s cheaper to store multiple copies. Also the average video isn’t more than some 300MB, less if it’s lower quality.
Anyone with Plex or Jellyfin knows that it’s better to have the same movie in both qualities (1080,720) the transconding to avoid CPU usage.
It’s possible to have fast transconding with GPUs, but with high so many users on youtube that will require a lots of power and high energy prices, store is cheaper.
I believe they store and that’s why it processes lowest res first and works up
It’s transposed on the fly, this is a fairly simple lambda function in AWS so whatever the GCP equivalent is. You can’t up sample potato spec, the reason it looks like shit is due to bandwidth and the service determining a lower speed than is available.
It probably depends on how popular the video is anticipated to be.
I remember hearing that something like 80% of uploads to YouTube are never watched. 80% of the remaining 20% are watched only a handful of times. It’s only a tiny fraction that are popular, and the most popular are watched millions of times.
I’d guess that they don’t transcode the 80% that nobody ever watches. They definitely transcode and cache the popular 4%, but who knows what they do with the 16% in the middle that are watched a few times, but not more than 10x.
I’m keen to know about how large these source files are for YouTube compared to the 720/1080 quality ones were see on the front-end. I remember them using really impressive compression but that the bitrate was super low to keep the since small.
If they’re reducing a 10m 1080p file from 400MB down to 40MB then that’s a good gain
Enormous servers all around the world and over the years storage is getting smaller and smaller proportionally to how much you can store on it