Kerbal Space Program

Kerbal Space Program

Why does KSP use up so much Virtual Memory
I have several mods i use for KSP, all working well and everything is up to date. However, KSP seems to eat all of my virtual memory. I have a 2GB GPU RAM with 16GBs of base RAM. I have my paging file setup to use 2GBs of VM for backup. KSP eats every bit of that 2GB of VM. When i shut down KSP, my VM empties out and it goes back down to about 15% usage, but when KSP runs it uses up the rest. This makes no sense. Where is the memory leak and is there a plug for it.
最近の変更はGhostParticalが行いました; 2015年12月6日 16時26分
< >
1-8 / 8 のコメントを表示
Are you sure you are talking about actual physical memory (where physical is either RAM or Pagefile) being used?

Processes that use shared libraries for example will map the physical memory where these are loaded into their own virtual address space.

Not sure how Windows will display this, and what tool you are using to check memory usage though.

Assuming you are using 32bit KSP on a rig with 16GB of RAM, there'd have to be something seriously wrong with your OS to have so much of the game end up in the page file unless you have some insane amount of background activity.


For reference, this is what 32bit KSP uses on Linux on a rig with 8GB RAM with a modest amount of mods, swap partition (=pagefile) remains untouched:

-----------
KiB Mem : 8117644 total, 1760816 free, 3335380 used, 3021448 buff/cache
KiB Swap: 15625212 total, 15625212 free, 0 used. 4510364 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
11197 bg 20 0 2518632 1,781g 58716 R 168,8 23,0 1:28.28 KSP.x86

-----------
VIRT stands for the virtual size of a process, which is the sum of memory it is actually using, memory it has mapped into itself (for instance the video card’s RAM for the X server), files on disk that have been mapped into it (most notably shared libraries), and memory shared with other processes. VIRT represents how much memory the program is able to access at the present moment.

RES stands for the resident size, which is an accurate representation of how much actual physical memory a process is consuming. (This also corresponds directly to the %MEM column.) This will virtually always be less than the VIRT size, since most programs depend on the C library.

SHR indicates how much of the VIRT size is actually sharable (memory or libraries). In the case of libraries, it does not necessarily mean that the entire library is resident. For example, if a program only uses a few functions in a library, the whole library is mapped and will be counted in VIRT and SHR, but only the parts of the library file containing the functions being used will actually be loaded in and be counted under RES.
最近の変更はwhatdoesthisbuttondo?が行いました; 2015年12月6日 16時51分
I use a CPU and GPU meter. My CPU meter has RAM usage as well as Virtual RAM usage (aka PageFile.sys). It is the PageFile.sys that is being fully used up while running KSP. Also, i dont remember how to run 32bit as appose to 64 and i dont remember how to check it, but i am pretty sure i set it up a long time ago to only load 32.
Pretty sure you'll be running 32bit then.

As for why so much of the pagefile is being used, that is nothing a user process (like KSP) can actually control, it is managed by the operating system itself.

If there is plenty of RAM left and the operating system is insisting on filling up the pagefile instead, there is something seriously wrong with the operating systems memory management.

Edit:

What you might be seeing is Windows filling the pagefile, but only as a preemptive measure in case your system runs low on memory in the future. It will run KSP from your RAM, but copy portions that are good candidates to be swapped out into the pagefile.

If you start a couple more processes that need a lot of RAM, it already has KSP parts in the pagefile, so it can immediately drop those from RAM and make it available faster, instead of starting the copy to pagefile when RAM is going low.

Still, I'm not seeing why this would be the case on a machine that is otherwise idle and has at least half its memory unused, there'd just be unnecessary disk activity for no actual benefit.
最近の変更はwhatdoesthisbuttondo?が行いました; 2015年12月6日 17時09分
1. why do you use a VM if you run 32bit ksp? run a linux distro in that VM to get 64 bit!
2. by do you shackle your good pc with 2gb ram in that VM? ksp is known to be ram hungry because unity
Mister Armarnis の投稿を引用:
1. why do you use a VM if you run 32bit ksp? run a linux distro in that VM to get 64 bit!
2. by do you shackle your good pc with 2gb ram in that VM? ksp is known to be ram hungry because unity

In this case, the OP's use of VM = "Virtual Memory", not "Virtual Machine".
Maybe paging file is too small? No idea if it would help, windows reccomends between 1x and 3x RAM for paging file. OP would call for between 16 and 48 Gb reccomended paging file size, depending on version.
Nostradufus の投稿を引用:
Maybe paging file is too small? No idea if it would help, windows reccomends between 1x and 3x RAM for paging file. OP would call for between 16 and 48 Gb reccomended paging file size, depending on version.

Actually, Microsoft recommends no paging file at all if you don't need one.
;492379439688426162 の投稿を引用:
Actually, Microsoft recommends no paging file at all if you don't need one.

Mmm, well....not quite. They recommend you have enough to dump the appropriate files in the case of emergency.
< >
1-8 / 8 のコメントを表示
ページ毎: 1530 50

投稿日: 2015年12月6日 16時25分
投稿数: 8