Jump to content

What's so special about 64-bit KSP?


Recommended Posts

I've seen people discussing it before as being an improvement to the standard 32-bit KSP, and some people get KSP to work this way even though there's no official support. Now in the new video about version 0.24, they said that it was made in the new 64-bit version of the game. This apparently is a big deal.

So what is the difference? Does it run faster? Does it allow for more mods? Is it more compatible with some computers?

Edited by Blind Dead McJones
Link to comment
Share on other sites

For those people with 64-bit computers (like me), I believe that it will allow for a more complete effort on the part of the computer, leading to hardware fryout and "mystical blue smoke" with unrenowned speed.

Just kidding, it should improve performance.

Link to comment
Share on other sites

64bit allows KSP to access more RAM, is the simple answer. What this means in detail is that at the moment, KSP loads everything at the start - plugins, model, parts, textures.. everything. If the total memory used goes over about 3.5GB of RAM, the game will crash because there's no more room to load stuff into. What 64bit does is increase that 3.5GB limit (up to such a high number, no home computer can even dream of attaining it) which means more can be loaded into the memory - this mainly applies to textures which means it'll mostly affect mods which include a lot of/high-res textures in that it'll load them and won't hit the memory cap. Things like physics calculations are still single threaded so there won't be any improvement with large part count ships, but it means you'll be able to look at them with texture detail on high, with 'melt my computer!' settings for EVE etc..

In short, it won't affect stock KSP much, but is a godsend to those who mod.

Link to comment
Share on other sites

Yes to everything Obsessed said.

Plus this little gem:

What 64bit does is increase that 3.5GB limit (up to such a high number, no home computer can even dream of attaining it) ...

Which is entertaining to me because this line has been uttered countless times by computer engineers and scientists for decades.

"Who needs more than 128kb of ram anyway..." :

/sidetrack

Link to comment
Share on other sites

In a nutshell, 64 Bit basically has three big advantages:

- it allows 64 Bit calculations within one pass (which is relevant e.g. for floating number calculations)

- it allows to use a lot more physical RAM than before

- it allows an easier memory layout, and therefore avoids memory fragmentation and swapping

The last one is a limitation from the OS. Actually, Windows only allows to directly address 2 GB of virtual memory to a single 32 Bit process. You can circumvent this limitation with a dirty hack so you can get up to 3.5 GB (Large address aware flag), but it comes with a small performance penalty. Also: Windows on Windows 64 (i.e. the "emulation" of a 32 Bit process on a native 64 Bit OS) comes with a small performance penalty as well.

On the other hand, there are so many other factors that need to be counted in. For example, does the physics engine that Unity provides actually make any use of native 64 Bit floating numbers (i.e. "Double")? Is the .NET Runtime able to manage so much memory properly, or will the garbage collector fail at some point?

There is only one way to find out if switching to 64Bit actually does any good: you have to try it out. It depends a lot on your hardware, on the mods you have installed and what you exactly are doing in the game. But at least it is moderatively save to say that you won't have any disadvantages, so just give it a try.

In fact: if Squad provides a proper launcher that selects the correct version at the start, you probably won't even notice that you are using 64 Bit now.

Link to comment
Share on other sites

I'm not expecting 64bit KSP to deliver noticable performance improvements, and I don't expect it to be rock stable for the next version or three.

However I do have 16 GB RAM in my computer and appreciate being able to use more of it, and as for the rest, I will be happy to be proven wrong :P

Link to comment
Share on other sites

In a nutshell, 64 Bit basically has three big advantages:

- it allows 64 Bit calculations within one pass (which is relevant e.g. for floating number calculations)

Intel processors (and clones) natively calculate using 80-bit floating-point math (long double) and convert to a narrower type afterwards [1]. But in any case, this has nothing to do with whether you're running in 64-bit mode, which only determines the addressing and integer calculations.

[1]: I'm talking about native FPU only, not the packed types like SIMD.

- it allows an easier memory layout, and therefore avoids memory fragmentation and swapping

That's only a concern for the operating system as applications see one unfragmented virtual address space. See: http://en.wikipedia.org/wiki/Virtual_memory. The mapping is done in hardware so it does not have any effect on performance.

On the other hand, there are so many other factors that need to be counted in. For example, does the physics engine that Unity provides actually make any use of native 64 Bit floating numbers (i.e. "Double")? Is the .NET Runtime able to manage so much memory properly, or will the garbage collector fail at some point?

As noted above, 64-bit mode is irrelevant to floating-point math. I don't know whether Unity uses floats or doubles but that will not change when you switch to 64-bit mode. Anyway, don't they use GPUs for physics stuff these days?

So the only advantages are more RAM and no 32-bit virtualization.

Sorry, I'm into OS development and could not let this slip through. :)

Edited by qazsedcft
Link to comment
Share on other sites

A short answer is for stock players, 64bit won`t change much at all.

For people who use mods they can run more mods without crashing or slowing down.

Anyway, don't they use GPUs for physics stuff these days?

Not KSP. Unity is multi platform and there are too many GPU types or some run with no GPU. All the phys-x in KSP is software, and single threaded at that.

The latest Unity has multi threaded phys-x so personally I`m looking forward to that.

Edited by John FX
Link to comment
Share on other sites

KSP could probably port its physics engine to run on GPUs, as Unity's physics runtime environment (Nvidia PhysX) is GPU-compliant to begin with.

Of course, that would also mean that you would have to buy a Nvidia card in order to play KSP. I'm fairly sure that nobody here wants Squad to open that particular can of worms... <_<

Link to comment
Share on other sites

64-bit might not be that interesting for stock players currently, but do note KSP is still under development.

The memory consumption of stock might gradually go up with more features added. Not having to worry about 32-bit limitations leaves more time to worry about actually getting things done.

Link to comment
Share on other sites

Intel processors (and clones) natively calculate using 80-bit floating-point math (long double) and convert to a narrower type afterwards [1]. But in any case, this has nothing to do with whether you're running in 64-bit mode, which only determines the addressing and integer calculations.

There are some applications that have enormous performance gains through 64Bit, like 7-Zip. So does this mean applications like that are heavy on integer calculations? Well, makes sense, I guess.

Still I wonder: even if the CPU can natively calculate 64Bit float, the OS still has to address and store it. And memory pointers are limited to x86 for x86 processes, and need to be remapped. This should have a performance penalty compared to native 64Bit.

That's only a concern for the operating system as applications see one unfragmented virtual address space. See: http://en.wikipedia.org/wiki/Virtual_memory. The mapping is done in hardware so it does not have any effect on performance.

That's what I meant. The application won't notice it. (In Case of Unity and other .NET application especially, because they are boxed in the runtime anyway). But still: the OS usually performs a little better, because memory mapping becomes easier.

Anyway, don't they use GPUs for physics stuff these days?

There is still not a single standardized GPGPU API on Windows, let alone one for .NET. And even then it is far from being transparent, i.e. that the OS can decide on the fly whether calculcations should be done on the GPU or CPU, depending which is currently less stressed. Microsoft has announced plans for this some time ago, but they are still not there yet.

Link to comment
Share on other sites

Someday ram and harddrives will become one (after they get around to mass producing MRAM or something) but I really don't think we are going to hit the 64 bit memory addressing limit any time soon: it is over 4 million gigabytes!

Link to comment
Share on other sites

Still I wonder: even if the CPU can natively calculate 64Bit float, the OS still has to address and store it. And memory pointers are limited to x86 for x86 processes, and need to be remapped. This should have a performance penalty compared to native 64Bit.

Memory pointers have to be remapped for all processes, 32 or 64 bit. No userspace program has direct access to RAM, only the OS does.

Link to comment
Share on other sites

Memory pointers have to be remapped for all processes, 32 or 64 bit. No userspace program has direct access to RAM, only the OS does.

Yes of course, but 64Bit data types are mapped differently into memory under 32Bit than under 64Bit. If I remember right, WoW64 always maps 32Bit addresses 1:1 on a 64Bit address, and 64Bit values are splitted into two addresses.

Link to comment
Share on other sites

That's what I meant. The application won't notice it. (In Case of Unity and other .NET application especially, because they are boxed in the runtime anyway). But still: the OS usually performs a little better, because memory mapping becomes easier.

Yes of course, but 64Bit data types are mapped differently into memory under 32Bit than under 64Bit. If I remember right, WoW64 always maps 32Bit addresses 1:1 on a 64Bit address, and 64Bit values are splitted into two addresses.

I don't think you really understand how that works. There is no difference at all in how the mapping is done. It's all done by the CPU at the hardware level. The program specifies an address and the CPU just looks up some translation tables and either reads it from RAM or calls the OS to load a page from the disk. In the case of 32-bit programs the upper half of the address is simply set to zero. That's it. There is absolutely nothing "easier" or "harder" about it.

The only (slight) performance penalty is for system calls. See this: http://msdn.microsoft.com/en-us/library/windows/desktop/aa384219%28v=vs.85%29.aspx

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...