Xilinx / PYNQ

Python Productivity for ZYNQ
http://www.pynq.io/
BSD 3-Clause "New" or "Revised" License
1.95k stars 808 forks source link

SD Card durability #1427

Closed andreaskuster closed 4 months ago

andreaskuster commented 1 year ago

Environment

Problem description

By design, the Ubuntu distro tailored for the PYNQ framework boots from an external SD card. In the default configuration, some settings will significantly reduce the durability of that flash storage device (extensive write requests), which can cause early failures and higher wear than necessary. The most prominent one is swapping.

Solution

An extensive list of measures can be found in the thread on raspberrypi.stackexchange.com. At the very least, I would disable the swap functionality.

This could be done by adding the following snippet to sdbuild/scripts/setup_host.sh:

sudo swapoff -a
sudo rm /var/swap

Let me know if I should open a PR with that code change.

schelleg commented 4 months ago

Good feedback, but no plans to change swap due to some software builds on-target requiring more memory. If this is still an issue re-open it as a [discuss.pynq.io](http://discuss.pynq.io/) post.