bakır
September 5th, 2014, 05:37 AM
Dear all,
I accidentally realized some weird behavior of the Linux system in releasing swap space: if a program requires too much RAM, some space in swap area of the hard disk quite rapidly, as quick as the hard drive's speed allows, I suppose. However when a program deallocates the variables, the swap space is not released immediately, but it takes more than 10 hours to do so. This is the case even if I kill the terminal that the program runs in.
Attached is a plot of RAM and SWAP usage (in kB) with respect to time (s). I create a very huge array at around t=1000 s and the program terminates successfully soon after. Can anybody explain the mechanism behind this?
256158
I accidentally realized some weird behavior of the Linux system in releasing swap space: if a program requires too much RAM, some space in swap area of the hard disk quite rapidly, as quick as the hard drive's speed allows, I suppose. However when a program deallocates the variables, the swap space is not released immediately, but it takes more than 10 hours to do so. This is the case even if I kill the terminal that the program runs in.
Attached is a plot of RAM and SWAP usage (in kB) with respect to time (s). I create a very huge array at around t=1000 s and the program terminates successfully soon after. Can anybody explain the mechanism behind this?
256158