Some small/low cost linux boards having small RAM size. For example olinux single chip computer boards having 64MB ram only.
for some instalations it will show the error like " Cannot allocate memory" so we need to increase the RAM size virtually.
GNU/Linux supports swapping to a file, with performance depends on your SD card writing and reading speed. This might be useful whenever needing a temporary increase in available memory,
Create a file (following example would create a 1024x1M=1G swap size) will zero fill
dd if=/dev/zero of=/.swapfile bs=1024 count=1M
it will take minutes depends on flsah/memory card speed
command to Setup a swap area in it:
mkswap /.swapfile
To activate swap to this file (would not survive a reboot):
swapon /.swapfile
To check it did it:
swapon -s
Disable swap to this file:
swapoff /.swapfile
for some instalations it will show the error like " Cannot allocate memory" so we need to increase the RAM size virtually.
GNU/Linux supports swapping to a file, with performance depends on your SD card writing and reading speed. This might be useful whenever needing a temporary increase in available memory,
Create a file (following example would create a 1024x1M=1G swap size) will zero fill
dd if=/dev/zero of=/.swapfile bs=1024 count=1M
it will take minutes depends on flsah/memory card speed
command to Setup a swap area in it:
mkswap /.swapfile
To activate swap to this file (would not survive a reboot):
swapon /.swapfile
To check it did it:
swapon -s
Disable swap to this file:
swapoff /.swapfile
No comments:
Post a Comment