Skip to content

Overlay

Q-engineering edited this page Aug 20, 2023 · 2 revisions

Overlay

An SD card endures only a limited number of write cycles. If you start recording movies on your SD card, it will wear out very quickly due to the constant writing. Don't be surprised if your app stops working after a few months due to SD corruption. See our website for a thorough explanation of this phenomenon.

👉    Best to use the overlay feature on the Raspberry Pi.

With the overlay active, all reads are still from the SD card. All writes are redirected to RAM. You still have the same directory structure, but are now in RAM.
You'll never write a byte to your SD card. (In theory - for the purists). Your SD card will now last for many years.

Use the menu option Performance in the Raspberry Pi Configuration to enable the overlay feature:

output image

To remove the overlay, reverse the procedure.

Two remarks.

  • Make sure you have enough RAM to record, especially if you have a Rpi Zero 2 with only 512 MB. Use $free -m to check the available space. As a rule of thumb, 1 minute of mp4 takes about 4 to 6 MB.
  • When you start programming, remove the overlay beforehand! Otherwise, you will generate a new code that will work fine as long as the power remains.
    After a reboot, you lose all the hard work. Speaking from experience!