PYNQ Image Memory settings

Hi Brian,

Sure, I can try. So the swap space is space reserved on disk (the SD Card) in case your system runs out of RAM. Once you run out of RAM the swap partition will be used instead. Allocating swap space means that your system will have a bit less disk space (the swap space cannot be used for anything else); however, it does mean that you have increased the amount of virtual memory for the system. One thing to remember, however, is that accessing the swap space will be incredibly slow, so if you run out of RAM and start swapping, your performance will fall off a cliff. Usually, on a 7020, the system is barely responsive, in my experience. Another thing to consider is that if you frequently access the SD card via the swap space, you might wear the SD Card out a bit faster, as you will be doing a lot of small reads/writes.

I’ve never tried to increase the swap space size before, but I believe there are a few ways to do it. You can either create a swap file (using dd) and then use the mkswap and swapon commands to set it up. Or I think you can setup a larger partition on your disk. This looks like a pretty decent tutorial on it: Adding Swap Space on Ubuntu 20.04: A Tutorial • CloudSigma

I hope that helps a bit,
Shane

2 Likes