5 ms·
This might be kind of a naive question, but wouldn't it be more cost-effective to use an NVME SSD? (Unless you happen to have a graphics card with plenty of RAM
by krylon 8y ago
This might be kind of a naive question, but wouldn't it be more cost-effective to use an NVME SSD? (Unless you happen to have a graphics card with plenty of RAM sitting in your machine that you not going to utilize otherwise.)
- lolc 8y agoVideo RAM is not cheap. But often it sits unused. It's also one to two orders of magnitude faster than an SSD.
- krylon 8y agoBut but but... if I do something so timing-sensitive that the improved swap-performance is going to matter, maybe I should just stuff my machine with enough RAM so it does not swap in the first place? Don't get me wrong, it's cool that it's possible to use Video RAM as a swap device. But I don't see the practical value.
- mort96 8y agoMaybe you just happen to want to do something which requires a lot of memory, and don't want to spend the money to upgrade RAM right now, or you're on a system where upgrading RAM is impossible, or your want to complete the task now without delaying it until you have installed more RAM. My laptop has 8GB of RAM, enough for most use, but it proved way too small when trying to compile Chromium (where the linker would get OOM killed even with 8GB RAM + 8GB swap). If I was instead doing that on a system with <24GB of RAM but with a beefy GPU, using some of the graphics memory as swap instead of a relatively slow SATA 3 SSD would've been attractive.
- kbob 8y agoThink about low-budget computing. Maybe all you have is a dumpster-computer, and a new set of DIMMs costs more than your monthly income.
- homero 8y agoMight as well use regular ram which is better than ssd and you're back to square one
- krylon 8y agoIBM's mainframes were in a weird place in the 1990s, because they had a 31-bit virtual address space, i.e. 2 GiB, but the physical machines could be equipped with a lot more RAM. One way to utilize this surplus memory was to use it as a RAM-disk and turn it into a swap device. It was stop gap measure before their CPUs went 64-bit, but at the time it was kind of a clever solution.
- pantalaimon 8y agoThere are people who use a dedicated GPU they pass through to a Windows VM to play games - so that's a way to still make use of the card when the VM is not running.
- pjc50 8y agoIt's kind of an old hack (the page dates from 2007); it's not really the sort of thing you'd build a PC for but if you happen to be re-purposing one it might offer an advantage.
- jwilk 8y agoThis hack can be backdated to 2002: https://web.archive.org/web/20021016193907/http://hedera.linuxnews.pl/_news/2002/09/03/_long/1445.html https://web.archive.org/web/20021016193907/http://hedera.lin...
- zzzcpan 8y agoI have a rule of thumb on swap cost effectiveness: use compressed ram first, if it's not enough, buy more ram. Because swapping is too slow to be generally usable. There might be a special case where being so slow is ok, but then cheap sata ssd in combination with compressed ram could be cost effective.