How much memory does Alkaline really use? I don't understand the output from top, ps or the columns in the Windows NT Task Manager.

Any operating system has a fixed amount of physical memory available. Usually, application need more than the physical memory installed on your system, for that purpose the operating system uses a swap mechanism: instead of storing data in physical memory, it uses a disk file.

On operating systems, such as Windows NT, Windows 2000 or UNIX, the memory is logically divided in pages. When the system needs a certain portion of memory which is currently in the swap (this is called a page fault) it will load all the corresponding pages into RAM. When a page is not accessed for a long time, it is saved back to disk and discarded.

If you look on the Windows NT Task Manager or the output from ps or top, Mem Usage is the working set size. It is the amount of physical memory which is directly (currently) allocated to the process. It can be accessed without causing a page fault. This includes pages shared with other processes. The Windows NT VM Size or the UNIX RSS value is the total private virtual memory allocated to the process.

Alkaline extensively uses it's own private swapping mechanism when run with --enableswap . It will force a lot of data into the swap. You can consider that Alkaline allocates the amount of memory shown under VM Size and RSS. The excess of memory shown in the Mem Usage is all the swapped data that is currently resident because more physical memory is available or because that data is required by the program to run.

Try running Alkaline with --enableswap and notice the large differences in VM Size and RSS values.