Jump to content

Able to choose how much RAM KSP uses


Recommended Posts

Hey, i love my mods, and KSP keeps crashing because of lack of memory.

I have a computer with 16GB of ram, and I would like to use it so KSP has some breathing room.

I was thinking a drop down menu in the settings, just like you do for resolution, with things like 1GB, 2GB, 4GB and so on, dependant on the amount of RAM installed on the PC/Laptop. It may need a 'reset to apply changes' but as long as it has lots of RAM.

Well that's just my idea, I have no idea about coding, not sure if this is even possible, but if it is, something like this could benefit a lot of people.

Link to comment
Share on other sites

Hi mate, the reason why is because KSP is built on Unity Engine and this engine is only just starting to support 64bit, it barely supports other features like Multi-threading ect, so in short when you launch KSP it will only ever see 3.5GB anything above that it can access, plus it only see's your first core this is why the game lags so much, i am hoping to convince KSP to drop Unity my self for the same reasons UKD Engine supports everything plus PhysX out of the box, even KSP mentioned they wanted to use a different Engine.

It's sad because i really love this game but i hate wasting all the time on crashing ect.

Link to comment
Share on other sites

At the moment, KSP (like pretty much all programs) just asks the operating system for RAM as and when it needs it. The operating system is really good at looking after RAM, it is never going to decline a request when there is any way it can free up the RAM, and it's never going to offer RAM that's not needed. So there is nothing to gain by changing the total amount of ram allowed, best to just set the proposed drop-down menu to 'all the ram!' and leave it there.

There is a limit though: KSP is a 32 bit program, that means it can only handle 3.5GB or so. It just can't keep track of more than that, so will never ask the operating system for it. That's why most of your RAM is going unused.

The solution would be to change KSP to be a 64 bit program, but that's easier said than done. A quick search of the forum for "64 bit" will turn up tons of threads discussing it, but the short version is that KSP uses Unity, and Unity can't do 64 bit (on Windows anyway). So the Squad devs have to wait and hope the Unity devs fix the problem.

I hear that a 64-bit KSP exists for Linux, if you want/are able to try that.

Link to comment
Share on other sites

Hi mate, the reason why is because KSP is built on Unity Engine and this engine is only just starting to support 64bit, it barely supports other features like Multi-threading ect, so in short when you launch KSP it will only ever see 3.5GB anything above that it can access, plus it only see's your first core this is why the game lags so much, i am hoping to convince KSP to drop Unity my self for the same reasons UKD Engine supports everything plus PhysX out of the box, even KSP mentioned they wanted to use a different Engine.

It's sad because i really love this game but i hate wasting all the time on crashing ect.

While you are right in saying that the Unity Engine imposes a lot of restrictions, please note:

Changing the engine has been discussed over and over again and will not happen due to the massive overhead involved in the process. Squad are working closely together with the Unity developers in getting the most out of the engine, too.

Unity also does support PhysX, but an old version in order to maintain compatibility - the version it uses is solely CPU-based, while more recent incarnations would be able to use the GPU (but only nVidia ones) for some physics calculations.

That said:

Please do stay on topic and avoid turning threads into discussions about the engine - you will just frustrate yourself and others in doing so. :)

Link to comment
Share on other sites

When KSP starts, you can see all parts available get loaded. All 3D-models, textures and logic gets loaded into RAM. No matter whether or not you are using any of those parts in your spaceships / rockets / stations etc. Since i am using NovaPunch, which has another 150 parts, KSP instantly needs 2,5GB RAM on starting the application, with no savegame loaded or anything. When i look at my constructions, i can see that i am using barely 1/4 or 1/5 of all available parts in the game. So if KSP would only load the modules that are currently in use into RAM, it could use much less RAM - but if you build a new ship and use parts you haven't used before, it would need to load the parts from disk, which would always take a small moment for every part.

Since i have less than 4GB RAM, i would like to wait for parts to load when building a new rocket and keep some RAM free, resulting in no need for constant memory swapping to hard drive, instead of loading ALL parts into RAM no matter if they will ever be used. That - by the way - is the reason why KSP becomes unresponsive from time to time - because there is no more RAM available and the PC starts swapping, which is slow as hell. You can see that behavior by opening task manager and resource monitor on win7.

My suggestion would be: Dont load ALL modules on application startup, but those needed - you can read them from persistant game file when loading / resuming a game. And load parts from disk when building a new rocket, since this wont be taking too long for single parts. And, from time to time, do some "garbage collection" to get rid of the parts you are not using any more. That would save a LOT of memory.

Link to comment
Share on other sites

While you are right in saying that the Unity Engine imposes a lot of restrictions, please note:

Changing the engine has been discussed over and over again and will not happen due to the massive overhead involved in the process. Squad are working closely together with the Unity developers in getting the most out of the engine, too.

Unity also does support PhysX, but an old version in order to maintain compatibility - the version it uses is solely CPU-based, while more recent incarnations would be able to use the GPU (but only nVidia ones) for some physics calculations.

That said:

Please do stay on topic and avoid turning threads into discussions about the engine - you will just frustrate yourself and others in doing so. :)

Physics and PhysX are two different things PhysX will not run on a CPU in any mode as its owned by Nvidia thus will work on GPU, if its Physics yes that can run on a CPU but very badley as Physics badly as Physics needs many calculations done at the same time.

Unity does not support Nvida PhysX from what i seen its a browser based engine for one secondly there is no files for PhysX in KSP i have looked, secondly when i run the i do not see the Nvidia PhysX Notifier.......This can be turned on in your Nvidia settings.

well i would say the engine has already hit that wall as i can barely play with out a crashs due to mem because of unity engine is 32bit. "its like 2013 ffs"

Not to mention the massive lag because the unity engine can not handle what KSP is doing, also there are articals about Unity not been able to support too many parts and texture meshs after all it is a Browser engine.

I would Personly pay more and i am sure many other people would for a Proper engine like UDK or the many others that are out there.

Last thing that was on topic as the guy wanted to know why he gets crashing the engine is the reason.................

Link to comment
Share on other sites

Physics and PhysX are two different things PhysX will not run on a CPU in any mode as its owned by Nvidia thus will work on GPU, if its Physics yes that can run on a CPU but very badley as Physics badly as Physics needs many calculations done at the same time.

Unity does not support Nvida PhysX from what i seen its a browser based engine for one secondly there is no files for PhysX in KSP i have looked, secondly when i run the i do not see the Nvidia PhysX Notifier.......This can be turned on in your Nvidia settings.

well i would say the engine has already hit that wall as i can barely play with out a crashs due to mem because of unity engine is 32bit. "its like 2013 ffs"

Not to mention the massive lag because the unity engine can not handle what KSP is doing, also there are articals about Unity not been able to support too many parts and texture meshs after all it is a Browser engine.

I would Personly pay more and i am sure many other people would for a Proper engine like UDK or the many others that are out there.

Last thing that was on topic as the guy wanted to know why he gets crashing the engine is the reason.................

Well that's interesting, I think pretty much everything you just wrote is wrong. Go to the Unity site if you really want to understand why. But in short, Unity uses PhysX, but doesn't support GPU PhysX, it is not a browser engine, and the developers have explicitly stated that they are happy with Unity and that they aren't going to change the engine.

As for the original post, it would be nice if Unity's 64 bit .exe worked better, but it is apparently very buggy under Windows and OSX. So until that is improved there is basically nothing that can be done to increase the amount of RAM used. Loading parts only when they are used could help, but that's been discussed a thousand times already, so I'm not expecting that to change.

Link to comment
Share on other sites

Well that's interesting, I think pretty much everything you just wrote is wrong. Go to the Unity site if you really want to understand why. But in short, Unity uses PhysX, but doesn't support GPU PhysX, it is not a browser engine, and the developers have explicitly stated that they are happy with Unity and that they aren't going to change the engine.

As for the original post, it would be nice if Unity's 64 bit .exe worked better, but it is apparently very buggy under Windows and OSX. So until that is improved there is basically nothing that can be done to increase the amount of RAM used. Loading parts only when they are used could help, but that's been discussed a thousand times already, so I'm not expecting that to change.

i think all of you have no idea about Nvidia PhysX as it only runs on the GPU or Agiea PPU, CPU mode in NVIDIA PhysX is running Nvidia PhysX through the cpu in software mode do you understand what the difference is? i guess you dont or you would not spew rubbish from some crap that you where told, secondly did you even bother to try what i said by testing this out???? IN KSP no you did not, I HAVE PhysX does not come up as there is no Cooked Files or PhysX DLL and if there is no hooks for those guess what? you not using Nvidia PhysX you are using a built in Physics engine that is completely different from Nvidia/ Ageia PPU GPU physX, its the type of Physics you would get from the HL "Half Life engine" aka havok FX << works on ATI and Nvida.

Clearly you have no idea how it works, well at leased less then me, Unity may just barely Support PhysX but it was not included with KSP..........

your all drawing your conclusions from the fact that it has it on the Unity Site, plus not thinking there are many versions of a product and the Unity Engine that is in KSP does not have Nvidia PhysX support or even the older Ageia

read that too mate.

http://en.wikipedia.org/wiki/Physics_processing_unit

after you read how PhysX works and Havok you will know that in oder for that to work you would need 2 things, Multi-threading "CPU PhysX with some PhysX been off loaded to GPU so you would need that as well, or Nvidia PhysX where all Physics commands are off loaded to a Nvidia GPU if that is not present it will do CPU mode and turn down the Physics.

"In February 2008 after Nvidia bought Ageia Technologies and eventually cut off the ability to process PhysX on the AGEIA PPU and NVIDIA GPUs in systems with active ATi/AMD GPUs, it seemed that PhysX went 100% to Nvidia. But in March 2008, Nvidia announced that it will make PhysX an open standard for everyone,[8] so the main graphic-processor manufacturers will have PhysX support in the next generation graphics cards. Nvidia announced that PhysX will also be available for some of their released graphics cards just by downloading some new drivers."

see how wrong you are.

well if they are going to stick with the Unity engine they have a very very long road ahead.

http://en.wikipedia.org/wiki/Unity_%28game_engine%29

wow i just read it was a mac engine, no wonder it supports nothing new.......... strange it have problems with noobintosh..

Link to comment
Share on other sites

64bit works pretty good in Linux, I do not know what is Unity's hold up with rolling it out in Windows.

tbh, I find 64bit programs easier to code than 32bit.

i think all programs should be 64bit its 2013 i been personally using 64bit computers for many many years now, and all of my Clients have 64bit machines both in the workplace and at home so i was very shocked to see my recent game crash on me because of a silly thing like ram, so i did some reading here and there on what unity was boy i wish i read that before buying the game but i really enjoy the Concept of KSP and the humor in the game, makes me think what it would cost me to get it in UDK or something better.

If i find anything out i will contact you all since you guys seem to want more out of your game like me rather then just listen to what fan boys say about there crap tastic Mac Gaming engine..... LOL

Link to comment
Share on other sites

i think all of you have no idea about Nvidia PhysX as it only runs on the GPU or Agiea PPU, CPU mode in NVIDIA PhysX is running Nvidia PhysX through the cpu in software mode do you understand what the difference is?

PhysX does not only run on the GPU. There is a hardware implementation that runs on the GPU and a software implementation that runs on the CPU. You're above statement may reflect that, but it's hard to tell as the sentence seems to be self contradictory.

http://physxinfo.com/wiki/Category:PhysX_SDK#Common_delusions

But at any rate, the implementation used by Unity does not support GPU PhysX.

http://answers.unity3d.com/questions/290454/physx-cpu-consuption-rather-then-gpu.html

http://docs.unity3d.com/Documentation/Manual/Physics.html

secondly did you even bother to try what i said by testing this out???? IN KSP no you did not, I HAVE PhysX does not come up as there is no Cooked Files or PhysX DLL and if there is no hooks for those guess what? you not using Nvidia PhysX you are using a built in Physics engine that is completely different from Nvidia/ Ageia PPU GPU physX,

If you are referring to the PhysX indicator that you can turn on in the nVidia control panel (that puts a big PhysX logo on screen), that should indicate whether physics are being run entirely on the CPU or if there is also GPU physics running. But you're right, I haven't tried that out because I don't have an nVidia card.

http://physxinfo.com/wiki/PhysX_Visual_Indicator

I'm not really sure how Unity uses PhysX without requiring the system software. Some newer versions of PhysX don't require that, but I don't think Unity uses those versions. You aren't the first person to ask that question though, and that might also affect how the PhysX Visual Indicator works, or doesn't work as the case may be.

http://stackoverflow.com/questions/7097747/how-does-unity3d-use-physx-without-requiring-the-physx-runtime

its the type of Physics you would get from the HL "Half Life engine" aka havok FX << works on ATI and Nvida.

There is no Half Life engine. There is the Source engine which does use Havok. This is just another physics middleware, owned by Intel, and used by many games. The GPU has nothing to do with Havok (there is also another physics engine that runs on the GPU, Bullet, but that isn't relevant here), and Havok has nothing to do with Unity or KSP. Havok FX was going to be an alternative that could be used by the GPU, but I don't think anyone ever made anything that actually uses it.

http://en.wikipedia.org/wiki/Havok_(software)#Other_products

after you read how PhysX works and Havok you will know that in oder for that to work you would need 2 things, Multi-threading "CPU PhysX with some PhysX been off loaded to GPU so you would need that as well, or Nvidia PhysX where all Physics commands are off loaded to a Nvidia GPU if that is not present it will do CPU mode and turn down the Physics.

That Wikipedia article is actually the first place I've read that says PhysX completely offloads physics calculations to the GPU if hardware acceleration is used. I always thought the GPU did some of the calculations while the CPU does others. In any event that doesn't matter here, since Unity and KSP have no support for hardware PhysX.

"In February 2008 after Nvidia bought Ageia Technologies and eventually cut off the ability to process PhysX on the AGEIA PPU and NVIDIA GPUs in systems with active ATi/AMD GPUs, it seemed that PhysX went 100% to Nvidia. But in March 2008, Nvidia announced that it will make PhysX an open standard for everyone,[8] so the main graphic-processor manufacturers will have PhysX support in the next generation graphics cards. Nvidia announced that PhysX will also be available for some of their released graphics cards just by downloading some new drivers."

see how wrong you are.

I'm not sure why this matters here. I know that people got upset about this, and that there have been ways to get around this. As far as I know it's still not possible to run hybrid PhysX, where you have an AMD card for graphics and an nVidia card for PhysX without using the hacks from that link.

wow i just read it was a mac engine, no wonder it supports nothing new.......... strange it have problems with noobintosh..

Unity isn't a mac engine, or a browser engine, it's a multi-platform engine. It works on Windows, OSX, Linux, web browsers, iOS, Android, etc...

i think all programs should be 64bit its 2013

I think this would be great, too. And it would solve the OP's, and many other people's problems with RAM. But I think the reason for the lack of focus on a 64 bit .exe is that it's a multi-platform engine. ARM has only recently created a 64-bit architecture and I don't think any CPU's have been released using those instructions. So it seems unlikely that the Unity people will put much focus on supporting a feature that many of their platforms can't use, and most of their software doesn't really need anyway.

Link to comment
Share on other sites

i think all programs should be 64bit its 2013 i been personally using 64bit computers for many many years now, and all of my Clients have 64bit machines both in the workplace and at home so i was very shocked to see my recent game crash on me because of a silly thing like ram, so i did some reading here and there on what unity was boy i wish i read that before buying the game but i really enjoy the Concept of KSP and the humor in the game, makes me think what it would cost me to get it in UDK or something better.

If i find anything out i will contact you all since you guys seem to want more out of your game like me rather then just listen to what fan boys say about there crap tastic Mac Gaming engine..... LOL

Since more that 99.9% of all software in the world is still 8bit, you have a damn long way to go to reach 64bit.

In fact there is still more 8bit development than 32bit going on right now.

Link to comment
Share on other sites

PhysX does not only run on the GPU. There is a hardware implementation that runs on the GPU and a software implementation that runs on the CPU. You're above statement may reflect that, but it's hard to tell as the sentence seems to be self contradictory.

http://physxinfo.com/wiki/Category:PhysX_SDK#Common_delusions

But at any rate, the implementation used by Unity does not support GPU PhysX.

http://answers.unity3d.com/questions/290454/physx-cpu-consuption-rather-then-gpu.html

http://docs.unity3d.com/Documentation/Manual/Physics.html

If you are referring to the PhysX indicator that you can turn on in the nVidia control panel (that puts a big PhysX logo on screen), that should indicate whether physics are being run entirely on the CPU or if there is also GPU physics running. But you're right, I haven't tried that out because I don't have an nVidia card.

http://physxinfo.com/wiki/PhysX_Visual_Indicator

I'm not really sure how Unity uses PhysX without requiring the system software. Some newer versions of PhysX don't require that, but I don't think Unity uses those versions. You aren't the first person to ask that question though, and that might also affect how the PhysX Visual Indicator works, or doesn't work as the case may be.

http://stackoverflow.com/questions/7097747/how-does-unity3d-use-physx-without-requiring-the-physx-runtime

There is no Half Life engine. There is the Source engine which does use Havok. This is just another physics middleware, owned by Intel, and used by many games. The GPU has nothing to do with Havok (there is also another physics engine that runs on the GPU, Bullet, but that isn't relevant here), and Havok has nothing to do with Unity or KSP. Havok FX was going to be an alternative that could be used by the GPU, but I don't think anyone ever made anything that actually uses it.

http://en.wikipedia.org/wiki/Havok_(software)#Other_products

That Wikipedia article is actually the first place I've read that says PhysX completely offloads physics calculations to the GPU if hardware acceleration is used. I always thought the GPU did some of the calculations while the CPU does others. In any event that doesn't matter here, since Unity and KSP have no support for hardware PhysX.

I'm not sure why this matters here. I know that people got upset about this, and that there have been ways to get around this. As far as I know it's still not possible to run hybrid PhysX, where you have an AMD card for graphics and an nVidia card for PhysX without using the hacks from that link.

Unity isn't a mac engine, or a browser engine, it's a multi-platform engine. It works on Windows, OSX, Linux, web browsers, iOS, Android, etc...

I think this would be great, too. And it would solve the OP's, and many other people's problems with RAM. But I think the reason for the lack of focus on a 64 bit .exe is that it's a multi-platform engine. ARM has only recently created a 64-bit architecture and I don't think any CPU's have been released using those instructions. So it seems unlikely that the Unity people will put much focus on supporting a feature that many of their platforms can't use, and most of their software doesn't really need anyway.

mate you think i don't know what i talking about i was the one who said for people to use the physX indicator so they can see KSP does not support it......... READ If you going to reply to me.

i could not give a dam about arm cpus there only recently come back on, the fact is 64bit and multi-threading and other hardware features is something that programmers always forget then its too late to add it because of there ego's.

you have a gooooood hard read mate Unity started out on MAC.

PhysX is nvidia made by Ageia then taken over by Nvidia since then 2008 Nvidia owns it, when you run PhysX in SOFTWARE MODE that is technically on the CPU but it is not full PhysX as CPU do not have the architicture to run PhysX as it uses different instruction sets so the cpu does not have HARDWARE support for that.

KSP does not have PhysX support. Unity might support it in some form or another but if it runs on the CPU then its not PhysX it just uses the Nvidia PhysX API which is like using your CPU as a GPU.......... and i am talking about a CPU with no Intergrated GPU.

HARDWARE and software are two different things and there is a big gap between the two.

stop been fan boys and face the reality of the situation, i want KSP to run well and support all the latest hardware so i can play this is why i writen and made people aware of what the difference is.

first line from WIKI about Unity Engine "Unity (also called Unity3D) is a cross-platform game engine with a built-in IDE developed by Unity Technologies. It is used to develop video games for web plugins, desktop platforms, consoles and mobile devices, and is utilized by over one million developers. It grew from an OS X supported game development tool in 2005 to a multi-platform game engine."

stop been fan boys of this unity engine it does not deserve worship, i do not think the version that was used in KSP supports PhysX at all and if it the latest version of PhysX the Nvidia Indicator will show it if it using hardware or software API as i have the latest drivers. " i have never seen a single programe that the indicator does not work on when its using the Nvidia PhysX API.

I have a feeling that Unity might be using Ageia version if so then Nvidia does not support that at all as support was pulled.

Link to comment
Share on other sites

Since more that 99.9% of all software in the world is still 8bit, you have a damn long way to go to reach 64bit.

In fact there is still more 8bit development than 32bit going on right now.

64bit works pretty good in Linux, I do not know what is Unity's hold up with rolling it out in Windows.

tbh, I find 64bit programs easier to code than 32bit.

<<< SO WHATS THAT you going back on your words what because?

http://en.wikipedia.org/wiki/64-bit_computing

32-bit vs 64-bit[edit source]

A change from a 32-bit to a 64-bit architecture is a fundamental alteration, as most operating systems must be extensively modified to take advantage of the new architecture, because that software has to manage the actual memory addressing hardware.[20] Other software must also be ported to use the new capabilities; older 32-bit software may be supported through either a hardware compatibility mode in which the new processors support the older 32-bit version of the instruction set as well as the 64-bit version, through software emulation, or by the actual implementation of a 32-bit processor core within the 64-bit processor, as with the Itanium processors from Intel, which include an IA-32 processor core to run 32-bit x86 applications. The operating systems for those 64-bit architectures generally support both 32-bit and 64-bit applications.[21]

One significant exception to this is the AS/400, whose software runs on a virtual Instruction Set Architecture (ISA) called TIMI (Technology Independent Machine Interface), which is translated to native machine code by low-level software before being executed. The translation software is all that has to be rewritten to move the entire OS and all software to a new platform, such as when IBM transitioned their line from the older 32/48-bit "IMPI" instruction set to the 64-bit PowerPC-AS instruction set, codenamed "Amazon" (the IMPI instruction set was quite different from the 32-bit PowerPC instruction set, so this was an even bigger transition than from a 32-bit version of an instruction set to a 64-bit version of the same instruction set).

On 64-bit hardware with x86-64 architecture (AMD64), most 32-bit operating systems and applications can run without compatibility issues. While the larger address space of 64-bit architectures makes working with large data sets in applications such as digital video, scientific computing, and large databases easier, there has been considerable debate on whether they or their 32-bit compatibility modes will be faster than comparably priced 32-bit systems for other tasks.

A compiled Java program can run on a 32- or 64-bit Java virtual machine without modification. The lengths and precision of all the built-in types are specified by the standard and are not dependent on the underlying architecture. Java programs that run on a 64-bit Java virtual machine have access to a larger address space.[22]

Speed is not the only factor to consider in a comparison of 32-bit and 64-bit processors. Applications such as multi-tasking, stress testing, and clusteringâ€â€for high-performance computing (HPC)â€â€may be more suited to a 64-bit architecture when deployed appropriately. 64-bit clusters have been widely deployed in large organizations, such as IBM, HP, and Microsoft, for this reason.

Summary:

A 64-bit processor performs best with 64-bit software.

A 64-bit processor has backward compatibility and will handle most 32-bit software.

A 32-bit processor is not compatible with 64-bit software.

i do not think i will post anymore as everyone does not care what is real or what is not all they care about is sucking up, i care about how the KSP runs and prospers i have so much i would like to do with KSP but am already limited because of the engine that is very very scary to be limited by an engine by a game that is still been developed i really think there going to spend alot of time on trying to get it to work on the unity engine when they could be spending the effort to port it to a better engine like UDK and supports all the things that are needed to run a game that needs CPU/GPU/CUDA and 64bit 3.7GB+ ram in order to work well + multi-player support and high res graphics. UDK is cross platform as well if thats really a major thing.

I have no idea why software devs put them self in this position when they could use all the latest hardware then they would not have to spend so much time on trying to programme something really complex on something so limited.

plus i would be more then happy to even donate money for this proccess as i believe that the KSP is a good solid game that could be played over and over again. "that is rare for me".

i dont believe its too late to change the game is still in early DEV.

back to try to get KSP support my mod pack :( and my masssssssive Ships.... :(

Link to comment
Share on other sites

Since more that 99.9% of all software in the world is still 8bit, you have a damn long way to go to reach 64bit.

In fact there is still more 8bit development than 32bit going on right now.

Where do you come up with this nonsense?

Link to comment
Share on other sites

As FEichinger said earlier, a game engine swap out is not gonna happen, we're gonna stick with Unity all the way through, so discussing it is pretty useless. The devs have tried coming up with 64 bit versions of the game for Windows and OSX, but they never managed to create something stable enough to release it to the public, i.e. the game crashed as soon as you tried to start a flight. Don't worry, they are aware of the memory issues with the game, they are constantly trying to improve the performance, and as soon as a 64bit version is available, you can be sure that they'll release it as fast as they can.

Now, since this whole thread is turning out into pointless arguments and fighting, and since both changing the game engine and 64 bit support is on the what not to suggest list, I'll close this thread now, it's gone it's way.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...