We have a virtual OES2, running on Xenserver from citrix.

We installed the server with 512MB assigned memory. After install and configuration there was a system crash due to `out-of-memory`issues, so we decided to add more from the Xenserver host, and also configure swap as it was not done at install. We added first 256MB extra. After this we still saw that the free memory is around 20-40MB. Now I added another 256MB extra, so it is now 1GB for the virtual machine. But it is again around 2040MB available as free memory.

How much memory should I assign to the virtual machine? The documentation mention 512MB.
If I assign more memory, will it be always 20-40MB free, as the system try to use as much as possible? Or this will stop somewhere around 2-4GB? As this is a virtual environment I cannot assign too much memory for a single VM.

Any advise greatly appreciated.