Sample Header Ad - 728x90

memory increase after completion of scripts

0 votes
1 answer
467 views
(I am new user of linux). I am running several matlab scripts in parallel using nohup in this form: (cd Documents/dir_001; nohup matlab -nodisplay -nosplash -nodesktop -r "run('/home/user/Documents/dir_001/myScript.m')") & (cd Documents/dir_002; nohup matlab -nodisplay -nosplash -nodesktop -r "run('/home/user/Documents/dir_002/myScript.m')") & (cd Documents/dir_003; nohup matlab -nodisplay -nosplash -nodesktop -r "run('/home/user/Documents/dir_003/myScript.m')") & I notice (by using top -u ) that when my scripts finish their routines (I can tell it is finished by looking at directories, when a directory is empty then a script has completed it job) the memory associated to the scripts start to increase progressively. I have to kill the PID to prevent it to keep growing. My questions: - Why does not the memory usage go to minimum value if not zero right after the script finish its routine? - Why does the memory increase? when running a script it consumes 1% of memory, and after completion it keeps growing to values 1.3%, 1.5%, 1.9%, 2%, and so on. How can I fix it? I would like to automatically kill the PID after a script is completed
Asked by Bur Nor (3 rep)
Jun 19, 2020, 08:40 PM
Last activity: Jun 19, 2020, 09:33 PM