3 ms·
Usually a sqr of your total ram. Zram is a another option as it a block device that does virtual ram.
by marcthe12 7y ago
Usually a sqr of your total ram. Zram is a another option as it a block device that does virtual ram.
- Filligree 7y agoSquare root of what unit? That's going to give different results if you measure in gigabytes, bytes or bits.
- Dylan16807 7y agoAlmost certainly gigabytes. Try some numbers yourself. Anything kilobyte or below gives you effectively zero swap. Megabytes gives you 90MB of swap on a machine with 8GB ram, that's an unusually small number and if it was supposed to be that small the advice would probably just be "128MB for all". Gigabytes fit the idea that if you have a smaller amount of ram, you have swap comparable to it, but once you scale up you don't add a lot more for each gig. Terabytes gives you hilariously large numbers for computers with 64GB of ram or less.