Skip to content

SWAP memory with an SD Card

Hello all,

The memory for the 2152 was a little bit lacking for the program i was trying to create (Not just an engineer program, there was a third party software running too). With everything going at once, it was terribly slow.  So i did some reading online and came across a forum about creating SWAP memory out of flash memory (SD Card).  I figured if i could try and use 512MB of the SD as swap memory to see if that would help speed up the controller.  Following the instruction, i managed to convert the whole SD Card to SWAP.  I assume that the SD card is junk now since when I insert it into the controller, all the LEDs flash red. Without the SD card, it boots fine.  

My question would be then, is it even a possibility to use a portion of the SD as SWAP memory to accomplish this?

 

Thanks for the feedback.  

 

Link to forum i used -> https://superuser.com/questions/1305720/how-to-increase-ram-using-a-usb-as-ram-memory

 

MY CONFIGURATION:

AXC 2152 of 2020.0 LTS

2GB SD Card

 

Comments

  • Hi Noah,

    As you found, it seems like the process of creating swap memory on the SD card damages the part of the SD card that is needed for it to be recognised as a Phoenix Contact SD card.

    I don't know if it is possible to do something similar without damaging the SD card, but it is not something that we can currently recommend or support.

    If some resources on the AXC F 2152 (with no, 2GB, or 8GB SD card) are not enough for an application, then the recommendation is to run the application on a PLCnext Control device that has more of the required resource(s).

    From April you will have the option of using an AXC F 3152, which will hopefully solve your problem.

    ~ Martin.

  • Hello!

    As I find out jast ago, in case of axc f 2152 firmware, linux kernel does not support swap memory usage for now.

    Best regards.

  • edited June 2023

    Hi,

    you could try using a Docker container with the balenaEngine on the PLC and make use of the "memory" and "memory-swap" options, e.g. --memory=100MB --memory-swap=512MB


    balenaEngine-DockerForIOT-ARM: https://www.plcnextstore.com/eu/app/963

    https://docs.docker.com/config/containers/resource_constraints/

Sign In or Register to comment.