this post was submitted on 06 Oct 2023
761 points (100.0% liked)

196

16488 readers
1883 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] ratman150@sh.itjust.works 173 points 1 year ago (3 children)

In a nutshell (eli5) swap is sorta "very slow ram" which is actually just a section of your hard drive /SSD/some other bizarre medium. It is generally used to temporarily store information that might be needed later but would waste valuable "fast ram" which is your actual ram sticks.

What's going on here is this user mounted Google drive in a way that the operating system can interact more directly with it, and it appears to have a set amount of space. Because we've mounted Google Drive we can tell our operating system to use it as swap....very very slow silly swap, but swap nonetheless.

So that's exactly what they did, they told the operating system to set aside X amount of Google Drive for swap, and when looking at the resource monitor we can see the "swap" appears as "more ram".

Hope that helps, please ask if I confused you :)

[–] MuThyme@lemmy.world 42 points 1 year ago (2 children)

I'm pretty sure google drive just acts like a syncing tool in the same way as dropbox, so this would still act like a normal swap drive, presumably.

That said, I've only used swap partitions so I'm not sure how it works when you point it at a directory, but I guess it depends how this person set it up.

[–] hexeth@lemmy.ca 59 points 1 year ago (3 children)

They've used google-drive-ocamlfuse to mount the drive in Linux, which if I recall correctly is direct access, rather than the way it works in Windows

[–] newIdentity@sh.itjust.works 28 points 1 year ago* (last edited 1 year ago) (1 children)

No they didn't. They used rclone and mounted Google drive in vfs-cach mode which means it's firstly written to the drive before it's synced to the cloud

https://blog.horner.tj/how-to-kinda-download-more-ram/

[–] hexeth@lemmy.ca 14 points 1 year ago (1 children)

My mistake, they chose a different implementation

[–] Cort@lemmy.world 5 points 1 year ago (2 children)

So, if they did use a direct storage mode connection instead of this cache method with a Gbit+ Internet connection, do you think it would be faster than swap on an HDD?

[–] hexeth@lemmy.ca 3 points 1 year ago

I can't imagine a time when anyone would ever make a cloud swap drive. You want the swap to be as fast as possible

[–] newIdentity@sh.itjust.works 1 points 1 year ago

No. It also has to be written to GDrive's storage

[–] Infynis@midwest.social 12 points 1 year ago* (last edited 1 year ago)

It makes sense that you can do this, as it's how Chromebooks work, and they run on ~~Chrome OS~~ ~~Android~~ Linux

[–] FederatedSaint@lemmy.world 4 points 1 year ago

You're right, this wouldn't really work, but it's still a funny idea.

[–] stratoscaster@lemmy.zip 9 points 1 year ago (2 children)

Time to use my floppy as a swap space 😎

[–] FederatedSaint@lemmy.world 8 points 1 year ago (1 children)

I've used my floppy in a few swap spaces myself if ya know what I mean....

[–] nickwitha_k@lemmy.sdf.org 1 points 1 year ago

Did it play the Imperial March?

[–] tacosplease@lemmy.world 2 points 1 year ago
[–] solivine@sopuli.xyz 5 points 1 year ago