All you need to know is that RAM is all about being extremely fast.
Swap is disk space set aside to be used as virtual Ram (part of your disk become RAM ) for when you have no more real ram. It’s useless on modern computers because RAMs are at worst of worst 100 times faster than the fastest SSD. If you have no ram it’s just best to crash the OS than making it slow down to a crawl or freeze.
This person use their Google drive as swap which make it even far more useless because
even the slowest ssd is probably faster than the best commercial internet connection even with a perfect latency.
If you have no ram it’s just best to crash the OS than making it slow down to a crawl or freeze.
That very much depends on what you’re doing. Even with rather random access patterns (e.g. compiling) swapping out doesn’t crash performance terribly, mostly because my RAM isn’t exactly under-dimensioned (I used the rule of thumb “one gig per hardware thread, round up”). For more regular access patterns such as merging SDXL models (which definitely eats all my 16G) the impact is even less. For, dunno, highly complex and irregular datalog queries over a database four times as large as your RAM – yeah that won’t be nearly as fast.
What you also want to do (under linux) is enable the earlyoom daemon. Those freezes are Linux being way too nice and not killing processes until literally every cached and buffered thing has been purged, also heavily-used ones.
Then you’ll see behaviour such as switching tabs in the browser, or bringing up a minimised terminal or something actually taking a second or two because they got swapped out. But it’s nowhere close to unusable and, due to a 3G/s SSD, a way better experience than in the 90s with a couple megabytes of RAM and swapping to a glorified flywheel.
I could by more RAM, DDR4 prices have pretty much tanked after all, OTOH I swap out like a couple of minutes every other month. Not worth it.
While an interesting read, my comment isn’t directed at advanced users that know their stuff. Also, not everyone own a beast, most users have a medium or low tier PC. Funnily, 16GB of RAM for your usage seems low. Double that and you’ll never need swap unless you want to play with the biggest local LLMs via Llama.ccp. But then, you likely have a GPU beast.
Nah I’m only dabbling around with SDXL, I have a 4G RX5500. Four years ago a Ryzen 3600 was certainly respectable (and slightly more expensive than the GPU) but it’s nowhere near high end, it was slam dunk in the middle of the price/performance optimum and is generally sufficient for my workloads.
I don’t think I’ll upgrade this box (short of an SSD or such) before either GPU prices are sane again, and/or CPUs actually become noticeably faster. All the AM4 ones certainly don’t really seem to be worth it. See I’m an old fart millennial, I’m used to a “two years later get twice the performance at half the price” kind of cadence and the two years have been steadily getting longer.
Sadly, i don’t think GPU prices will ever drop. The only reason would be if a new competitor comes up with something on par or better than the current tech. For CPUs, we’ve reached the limit already. Nonetheless, their’s still some hope with a tech called optical computing.
Computer power increase became meaningless because companies juste use it as an excuse to not optimize their software anymore. The best exemple is how everyone basically uses a whole browser (chromium ) just to show some GUI. The steam client and discord are two big software that comes in mind using this but it’s spreading fast and I found a GUI for aria2c that weights more than 60mb while aria2c itself is a few megs, but even worse some manufacturers are using it for their mouse and keyboard drivers for god sake.
I’m old enough to remember that my swap drives used to be on spinning drives that were slower than my gigabit fiber. Well, I’m actually older than that but still. If I really needed to run some unoptimized task that required a lot of memory I could consider trying it and walking away.
The first PC I owned was a 486 with 8MB of RAM which no one else had. I remember I could make a RAM drive and copy the entire install of games into the RAM drive and they would be so fast. Imagine being able to cache 3 floppy disks worth of data!
I’m old enough to remember that my swap drives used to be on spinning drives that were slower than my gigabit fiber.
be me
the year is 2023
have a spinning drive and no gigabit fiber. ( gigabit fiber doesn’t exist where i live )
become sad.
Joke aside, i don’t think swap is worth it because i think nobody is willing to have their computer locked for tens of hours or even days for something to finish considering it’s literally impossible to know if the app is working or is hung ( search the halting problem for more info).
All you need to know is that RAM is all about being extremely fast.
Swap is disk space set aside to be used as virtual Ram (part of your disk become RAM ) for when you have no more real ram. It’s useless on modern computers because RAMs are at worst of worst 100 times faster than the fastest SSD. If you have no ram it’s just best to crash the OS than making it slow down to a crawl or freeze.
This person use their Google drive as swap which make it even far more useless because even the slowest ssd is probably faster than the best commercial internet connection even with a perfect latency.
In short, it’s extremely cursed.
I don’t know about useless.
I’m much happier now that my work laptop slows down when I compile something during a zoom meeting, vs when it used to run out of memory and crash.
That very much depends on what you’re doing. Even with rather random access patterns (e.g. compiling) swapping out doesn’t crash performance terribly, mostly because my RAM isn’t exactly under-dimensioned (I used the rule of thumb “one gig per hardware thread, round up”). For more regular access patterns such as merging SDXL models (which definitely eats all my 16G) the impact is even less. For, dunno, highly complex and irregular datalog queries over a database four times as large as your RAM – yeah that won’t be nearly as fast.
What you also want to do (under linux) is enable the earlyoom daemon. Those freezes are Linux being way too nice and not killing processes until literally every cached and buffered thing has been purged, also heavily-used ones.
Then you’ll see behaviour such as switching tabs in the browser, or bringing up a minimised terminal or something actually taking a second or two because they got swapped out. But it’s nowhere close to unusable and, due to a 3G/s SSD, a way better experience than in the 90s with a couple megabytes of RAM and swapping to a glorified flywheel.
I could by more RAM, DDR4 prices have pretty much tanked after all, OTOH I swap out like a couple of minutes every other month. Not worth it.
While an interesting read, my comment isn’t directed at advanced users that know their stuff. Also, not everyone own a beast, most users have a medium or low tier PC. Funnily, 16GB of RAM for your usage seems low. Double that and you’ll never need swap unless you want to play with the biggest local LLMs via Llama.ccp. But then, you likely have a GPU beast.
Nah I’m only dabbling around with SDXL, I have a 4G RX5500. Four years ago a Ryzen 3600 was certainly respectable (and slightly more expensive than the GPU) but it’s nowhere near high end, it was slam dunk in the middle of the price/performance optimum and is generally sufficient for my workloads.
I don’t think I’ll upgrade this box (short of an SSD or such) before either GPU prices are sane again, and/or CPUs actually become noticeably faster. All the AM4 ones certainly don’t really seem to be worth it. See I’m an old fart millennial, I’m used to a “two years later get twice the performance at half the price” kind of cadence and the two years have been steadily getting longer.
Sadly, i don’t think GPU prices will ever drop. The only reason would be if a new competitor comes up with something on par or better than the current tech. For CPUs, we’ve reached the limit already. Nonetheless, their’s still some hope with a tech called optical computing.
Computer power increase became meaningless because companies juste use it as an excuse to not optimize their software anymore. The best exemple is how everyone basically uses a whole browser (chromium ) just to show some GUI. The steam client and discord are two big software that comes in mind using this but it’s spreading fast and I found a GUI for aria2c that weights more than 60mb while aria2c itself is a few megs, but even worse some manufacturers are using it for their mouse and keyboard drivers for god sake.
I’m old enough to remember that my swap drives used to be on spinning drives that were slower than my gigabit fiber. Well, I’m actually older than that but still. If I really needed to run some unoptimized task that required a lot of memory I could consider trying it and walking away.
I’m old enough to remember when my first computer had a 210MB hard drive and 4MB of ram.
Fancy! My first computer had 16K RAM and saved to cassette.
Lording it over us poor Vic-20 users :( I remember wishing I could have that computer. I ended up with a commodore 64 soon after.
Nice! In case you didn’t know, you can run those classic systems on emulators now, for yours it’d be this: https://en.wikipedia.org/wiki/VICE
The first PC I owned was a 486 with 8MB of RAM which no one else had. I remember I could make a RAM drive and copy the entire install of games into the RAM drive and they would be so fast. Imagine being able to cache 3 floppy disks worth of data!
Joke aside, i don’t think swap is worth it because i think nobody is willing to have their computer locked for tens of hours or even days for something to finish considering it’s literally impossible to know if the app is working or is hung ( search the halting problem for more info).