Hi, this is Wayne again with a topic “We ACTUALLY downloaded more RAM”.
( laughing maniacally ) I’ve finally done it. 10 terabytes of memory, and I can download as much as I want. Why, With this power I can, I can tell you about our sponsor: Build Redux. Thanks, Build Redux for sponsoring this video.
Build Redux, creates PCs for gamers, Who wan na win and want high frame rates without breaking the bank. They’re, backed by a two-year parts and labor warranty, so you’re covered? And you can click the link down below to start creating your PC today. When we saw this tweet from TJ Horner? First, we were like “ What ?” And then we were like “ No.”, And then we were like “ Well maybe.”. Using our unlimited Google Drive storage. We followed the instructions on TJ, Horner’s blog, which you can check out down below and upgraded this computer to 10 terabytes of system memory.
Behold, But wait. Obviously you can’t actually download more dynamic, random access memory. It’S a physical thing looks a little something like this.. So what’s going on here? Well, if you look closely, you can see that, while our 10 terabytes of cloud storage does get lumped into the same pool as our DRAM, it’s actually broken out under a separate heading called system, swap. “. What is that ?”? You might ask. Well a swap space or a page file for our Windows. Friends is a small partition on your SSD or hard drive that prevents the system from crashing outright. If you fill up your real memory., That sounds great right, Free RAM, Well, not exactly., And to understand why we need to talk about memory hierarchy. Directly on your CPU.
Are your registers, that’s where the processor stores what it immediately needs to work on, as well as your caches, which contain data that the CPU is likely to need very soon or very often.? Most modern chips have multiple tiers of these caches that get progressively slower, but also larger.. Next up, we’ve got your DRAM fast, directly-attached storage that gives the CPU quick access to the data for running programs and applications.. Then, from there we go to SSDs and hard drives, which are your long-term permanent storage, your local network and finally, the Internet or the cloud.. But the thing is: while Windows gets all uppity about knowing your role, Linux actually a allows us to flip the traditional hierarchy. On its head by manually, assigning cloud storage as working memory, leaving only the question of how will that perform. So our system here has only eight gigs of RAM along with a high-performance, Threadripper CPU.
Poor thing. Tj’S configuration uses Rclone to mount a Google Drive as a local storage space, where we configure our swap space effectively turning Google Drive into memory., But then the moment we set up our swap space ( button clicking ). It tries to write to it and crashes, ( fingers snapping ) immediately Now.
How am I supposed to buy an overpriced pillow on lttstore.com? What happened here is that Google Drive straight up will not accept random reads and writes.. Seemingly this is to prevent customers from running programs off of Google Drive, which makes sense, since that would be much harder on their infrastructure than just basic storage.. So that didn’t go very well, but it doesn’t mean that we’re done.
We’ve got some ideas for how to apply this concept in a way that could work.. But first let’s explain what went wrong. Running a program out of Google Drive, even if they allowed you to do it, would’ve been a terrible experience. And we can actually prove that with math.. Let’S start by doing a quick AIDA64 memory benchmark on our Ryzen Threadripper system, where it manages 44 gigabytes per second of throughput., Even compared to a premium residential Internet connection that is 350 times faster..
So, with Google Drive RAM, you could be conceivably waiting, six hours for GTA V to load which might not feel any different, but it is.. But what if we could move our storage a little closer to home. Come with me..
This is our high-speed video editing server. And we can connect to it from just about anywhere in the office at 10. Gigabit per second., That’s still 1/35, the speed of RAM, but I mean it might be usable right Now, we’re back on our machine and we’re gon na run a different script.. Instead of mounting a Google Drive partition as our swap space, we’re gon na mount a one terabyte partition of SSD space off of that server.. There you go swap it around., Boop, one terabyte of swap And …. This is just a little script that fires up a bunch of stuff renders an image, and oh it’s supposed to launch a browser.
Whew Um. Are we using our swap? We are We’re actually using it. It’S working, It’s working, very slowly.. You can see. We’Ve run completely out of memory, 98.3 % of our memory is full and we’re writing only two mebibytes out of our one terabyte of swap.. Oh, has this crashed And we’re back.
Our best guess as to what happened there was that the processor would’ve been queuing up. A bunch of data to be shuffled over to the memory., So it would’ve done that on its limited, eight gigs of RAM., But because of how slow that dumping process was, it actually ran out of memory just trying to ready the data.. So the bottom line is: if we try to write too much at once, the system hard crashes.. We actually got as high as I think 100 megabytes of swap when we kind of trickled data into it.
So maybe there’s a way to make this configuration work., But the point stands that it’s pretty dumb, here’s why., Just like any car enthusiast, will tell you there’s more to life than raw horsepower. The performance of a storage device cannot be represented by bandwidth numbers alone.. Let’S talk about latency., The CPU expects RAM accesses to happen quickly, like ( fingers, snapping ) nanoseconds quickly, with AIDA64 pegging our system at about 62 nanoseconds. By comparison, our access latency to Whonix servers somewhere in the neighborhood of around one millisecond round trip..
That is 16,000 times longer.. So from the CPU’s perspective, that’s like your dad popping out for 15 minutes to buy cigarettes and not coming back for five months., And there are multiple factors causing this.. First is physical distance. System memory is just inches from the CPU socket, because the signal timing has to be absolutely perfect to run at those kinds of speeds. Following that up is the fact that our server’s SSDs are much much slower than DRAM.
And then finally, our Server communicates using the SMB protocol, which doesn’t handle random, reads and writes very well due to its high latency., But that doesn’t mean that swap space is completely stupid.. Why don’t we try using it the way that it is supposed to be used with a locally-attached SSD? Switching over to local swap., Almost out of real memory. Wow, that’s interesting.. It actually doesn’t hit the real memory as hard because the swap is actually working. There we go. We’Ve got about a gig in the swap now. It works. Buying more Ram is officially stupid when you can just put a big fat SSD in your system and use it as an overflow right. Well no.
I mean it doesn’t crash, which is an improvement, but it’s also much slower, especially multitasking, like this., And if we just had 128 gigabytes of actual RAM, so we don’t run out. Now. What’S interesting is with our eight gig stick and our swap space. Our game still ran pretty well, despite the fact that our RAM was filled up to the brim.. Why is that? Well, this is interesting.. The operating system, in the background, still keeps the memory hierarchy in mind when we’re running programs and it’ll actually keep the most called-on programs like say, for example, our actively running game in RAM and then it’ll.
Take other programs like our web browser and relegate them to the swap space.. So, even if we were to fill up 128 gigs, it has so much wiggle room to move what we need currently into our 128 gigs that the performance hit of overutilizing. Your memory is very slight: .