MEDx Frequently Asked Questions - System

Q: MEDx Swap Space Usage

MEDx does not directly access swap, swap space is handled by the operating system as part of its memory management. Swap space is used to hold (swap out) chunks of memory (called pages) to disk freeing up memory. Each processes running on a system uses some memory. When a new processes is started or an old process grows and there is no free memory left the OS swaps out a page of memory to disk (swap space), this free's up a page of memory which is then given to the new or growing process. The operating system tries to first swap out pages of memory of processes that are not active (perhaps a print server, mail server, etc). Things can get very complex. As MEDx grows and needs more memory either memory from other processes is swapped out or parts of the MEDx processes is swapped out. Once swapped out a page will not be brought back into memory (thus freeing swap space) until the processes associated with that page needs to access the information stored there.


Lets say you have 500 MB of memory used before starting MEDx. You have processes A-D running, A is 100 MB, B is 50 MB, C is 25 MB, and D is 25 MB, totaling 200 MB. Since the total memory used by these processes are 200 MB, nothing is being sent to swap. You start MEDx and it wants 200 MB, now the total memory used is 400 MB, still below the 500 MB limit so nothing is being sent to swap. You now load in 200 MB of data into MEDx but there is only 100 MB of memory free so 100 MB of swap space is used. In this example lets say B, C and D are not used much so it is their memory that gets swapped out. The three processes total 100 MB, thus freeing up the extra 100 MB needed for the rest of the data. You now exit MEDx which should free up 400 MB, leaving 100 MB from process A still in memory and 100 MB in swap space.


In this simplistic example swap space would not be free'd even though you exited MEDx. But there is 'lots' of free memory now. If and when B, C, or D need their data it will be swapped back into memory freeing up swap space. This will not be seen immediately.


Process B is activated at some later point, now total memory used is 150 MB (100 MB process A, 50 MB process B) and 50 MB still in swap space from processes C and D. Now in reality it seems that when MEDx exits not all of the memory is freed. All of the memory used explicitly by MEDx should be free'd, but processes which support MEDx like the X11 server may grow while MEDx is running and never shrink when MEDx exits.


Other FAQ Topics

If you have a question that you would like to see addressed in our list of Frequently Asked Questions, please contact customer support.

Back to FAQ Home