Before I explain the problem I’m facing, I would like to say that my claim is not that my swap is configured incorrectly (or maybe it is I don’t know!). It’s just that it’s not helping.
I’m working on some memory intensive tasks. I have a decent home computer but no matter how much memory you have, there will always be tasks that need more. That’s why when I was installing Manjaro, I’ve setup a swap partition. BTW, I wish we had the option to select the size of this partition then. But that’s a different story.
Anyways, my question is that, are there some type of memory alloaction request that a program can issue and it cannot be responded by swap? I’m asking this since the program that I’m running crashes and exits as soon as my physical memory exhausts. Without ever touching the swap. As if the swap is not good enough for it and it can only make use of physical memory.
Is there anything I can do to make use of swap in such cases?
Thanks, @Mirdarthos . I didn’t know about swappiness. I still need to read more. But so far, based on what I read, it seems to me that swappiness only helps with the performance. I’m not sure if it actually helps with my case. Does it?
Perhaps, I should ask this question: Can swap help when a single program is asking for more memory than physically available on a computer?
Thanks, @ben75 . You are absolutely right. But my suggestion is to let the user select the size of swap in the auto mode. I might not have enough expertise to setup my partitions from ground-up but I can understand swap size. Anyways, it’s just a sugegstion.
Think the other way around: A program says how much RAM it can or will use at most → Virtual memory. If more is used, then the program may also crash. If you start a program that could address 10GB of RAM and you have 32GB of RAM, nothing will be swapped out to swap, but it will crash.
Thanks for the link. It’s really practical. And it’s free too!! It’s just that it only has up to 32 GB which is not enough. Perhaps I should download it mutiple times. I just wish they had provided larges capacities. But again, it’s free.