cancel
Showing results for 
Search instead for 
Did you mean: 

Swap partition creation

NPal.2
Senior

Hi all,

How can I create swap partition in STM32MP1?

Previously I did get an answer to how to increase the rootfs size. Any guidance on this will be highly appreciated.

TIA

1 ACCEPTED SOLUTION

Accepted Solutions
AntonioST
ST Employee

A swap partition is a good idea when you have a real hard-disk or a fast SSD that includes an internal cache.

With SD card or simple flash devices (NAND, SPI, ...) I expect that the write speed will not give you the performance you would expect.

Plus the limited write/erase cycles of flash devices could impact its life-time, when used too often as swap.

Nevertheless if your need is to just use the cache in some "special" and "limited" case, it could still be interesting to turn swap on.

But I don't have clear what is your need?

Some command to create a swap partition from command-line? Or change the flash partition to include a swap when you re-flash the board?

And which storage you plan to use? Hard-disk, SD card, ...?

View solution in original post

4 REPLIES 4
Olivier GALLIEN
ST Employee

Hi @NPal.2​ ,

Could you further elaborate what you mean by swap partition ?

Thanks

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Hi @Oliver

In case of Linux we have : ext4 , boot and swap partition. When system runs low on RAM it takes up memory from swap memory to satisfy those need. I want to create a similar partition.

I hope I was able to provide you some clarity around this.

AntonioST
ST Employee

A swap partition is a good idea when you have a real hard-disk or a fast SSD that includes an internal cache.

With SD card or simple flash devices (NAND, SPI, ...) I expect that the write speed will not give you the performance you would expect.

Plus the limited write/erase cycles of flash devices could impact its life-time, when used too often as swap.

Nevertheless if your need is to just use the cache in some "special" and "limited" case, it could still be interesting to turn swap on.

But I don't have clear what is your need?

Some command to create a swap partition from command-line? Or change the flash partition to include a swap when you re-flash the board?

And which storage you plan to use? Hard-disk, SD card, ...?

Hi @AntonioST​ . Thanks for your response. I feel the comments provided by you give me a better insight. I wanted to make a swap partition in case my system runs out of memory, it can pick up some from swap.I plan to use SD-Card.