-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding a swapfile #5
Comments
There's a standard package that will handle all the mechanics of setting up the swap file for you: $ sudo apt-get install phys-swapfile Note that if the swap file grows unbounded, it can eat up all the free space on the disk that's mounting the root partition. This is the 16GB eMMC by default. If you bound the size of the swap file, though, you may be back in "out of memory" land. Picking the right size for the swap file is a bit fuzzy. All the settings related to the swap file can be controlled by editing $ sudoedit /etc/phys-swapfile
$ sudo service dphys-swapfile restart |
This is going to quickly exhaust write cycles of emmc device. |
Should just be a matter of doing the following:
That will use the full SD card just for swap for that session. To make it permanent:
Note that if you don't have that exact SD card inserted, it'll fail to boot. |
Note that SD cards and USB flash drives will also have a limited number of write cycles as well, depending on the grade and quality of the card/flash drive. |
Also, if you want swap on an sdcard with a filesystem (say mounted at /home like in #6), do this:
And again, to make it permanent:
|
Due to lack of device RAM (see #3 ), it's important to be able to use the non-volatile memory (ie, the "disk space") for storing RAM overruns. This is what swap space is for.
Older *nix systems tended to have an entire partition dedicated to this. Modern systems tend to use a file instead.
This tutorial describes how to add a swap file to the Coral dev board.
The text was updated successfully, but these errors were encountered: