Linux: Replace RAM with SDCard

With the performance set aside, is it possible to avoid RAM and use SDCard instead of it in Linux.

Linux might be using allocated address space as RAM. Can we ask linux to use SDCard as RAM?

I will use class 10 SDcard which is of the highest quality.

Thanks in advance.

Answer

Yes as long as you don’t try to eliminate all RAM.

You need some RAM as the CPU needs to access RAM. It is how it works. TLB, and a lot of other stuff have to be in primary memory.

In Gnu/Linux you can set up the SD card as swap, and use very little RAM. However this could lead to a lot of wear of the SD card. SD cards have a limited life, measured in number of writes.

You need to ask, can you get all the essentials into RAM, with enough left over for swapping. Then will it be fast enough.

I doubt 32k is enough to run a Unix like system. ls is 128k on debian, and debian is good at not wasting memory. You will have to get the whole kernel into RAM, and the kernel named Linux us huge (not as huge at NT, but huge) see https://stackoverflow.com/q/27941775/537980.

Leave a Reply

Your email address will not be published. Required fields are marked *