On Mon, Jul 27, 2009 at 2:46 PM, Boyd Stephen Smith Jr.
1024 x 65536 = 1Ki x 64Ki = 64Mi.
So, that would make a 64M swap file.
I'd use:
dd if=/dev/zero of=/swapfile bs=$((1 << 12)) count=$((1 << 18))
(1 << 12) x (1 << 18) = (1 << 30) = 1GiB. [1]
>And would the correct use of mkswap be:
>
># mkswap /swapfile
You can specify a label if you like. Otherwise, good.
>Then add this to /etc/fstab:
>
># /swapfile swap swap defaults
> 0 0
Looks good.
--
[1] (x << y) means x*(2^y). So, (1 << 10) = 1Ki; (1 << 20) = 1Mi; (1 << 30)
= 1Gi.