Jump to content

Ram Usage


Recommended Posts

People Have been asking for multi-core support and ram usage and I don't get why they are being so fussy about it. There is no bad thing about upgrading ram other than using up some time on it. Ram upgrading would help both sides the devs and us. Adding more Ram would add more possibility to the game make it easier to add more stuff and also be more free with what they want to add. On our perspective we could have bigger spacestations bigger mun(its MUN for god sake)bases

and less lag to worry about. Yes the dev's think that theres no need yet and that they would rather work on other stuff than this but. It would be a great help in the future and would stop those lag stutters.

P.S

I am a victim of this problem as i cannot continue me beautiful space station cause of too many parts ;.;

Link to comment
Share on other sites

I recently realized that there's something amiss in the whole RAM discussion. The Page File. Why doesn't it come up more often? And more importantly, why doesn't KSP use the darn thing? Remember all those other games which slow to a crawl instead of crashing when out of memory? That's because they're essentially using your HD as memory, by the Page File. Now, why can't KSP do this, too? With 4GB of RAM, you should have the Page File set to about twice that amount, meaning you'd have 12GB to work with. 8 of them would be very slow to access unless you have an SSD, but still, it's a difference between a crash and a lag. Now, why is KSP limited to actual RAM?

Link to comment
Share on other sites

I recently realized that there's something amiss in the whole RAM discussion. The Page File. Why doesn't it come up more often? And more importantly, why doesn't KSP use the darn thing? Remember all those other games which slow to a crawl instead of crashing when out of memory? That's because they're essentially using your HD as memory, by the Page File. Now, why can't KSP do this, too? With 4GB of RAM, you should have the Page File set to about twice that amount, meaning you'd have 12GB to work with. 8 of them would be very slow to access unless you have an SSD, but still, it's a difference between a crash and a lag. Now, why is KSP limited to actual RAM?

that is a really good question

Link to comment
Share on other sites

@op

I don't really get what you are trying to say. Yes, KSP does use a lot of Ram and it might even be possible to improve stuff a lot. But that would require a lot of dev time and there are also limitation by others... like unity and modders in general. KSP just has a few devs, so don't expect them to ship an AAA game.

KSP cannot use more than ~3.6 GB memory since its currently based on 32 bit architecture and a 32 bit number cannot hold addresses larger than that. Page Files were designed to work around insufficient memory, not addressing issues. Thats why we switched (/are currently in the process to do so) to 64bit systems. But it will take time until all software does so... and Unity for Win doesn't, yet.

Link to comment
Share on other sites

Does virtual memory overcome the 4gb limit though?

i dont think so. a 32 bit application only has a 32 bit virtual address space. so you can have 4gb of memory, no matter where it is mapped to (real memory, virtual memory, etc). most people have more memory than the game can use, so there is no reason to dip into the slower page file (unless you still use <4gb ram). a 64 bit program on the other hand will have more virtual address space than your machine has memory, and so if you have 8gb and the game wants 9gb, it will map the extra 1gb into the page file.

only things that can be done are:

1: reduce memory usage

2: 64 bit builds

#2 is hard to do and requires the unity people to fix 64 bit in the engine, so that leaves #1 as the only thing that can be done so far. this is actually easy, adopt dxt* compressed texture formats.

Link to comment
Share on other sites

KSP cannot use more than ~3.6 GB memory since its currently based on 32 bit architecture and a 32 bit number cannot hold addresses larger than that. Page Files were designed to work around insufficient memory, not addressing issues. Thats why we switched (/are currently in the process to do so) to 64bit systems. But it will take time until all software does so... and Unity for Win doesn't, yet.

Nope, Page Files are perfectly capable of extending available memory even for a 32bit program. It's not the same thing as virtual memory, and it should make KSP work the way I described (slowdowns instead of crashes).

I hope it's indeed an Unity bug and that the next KSP will have it fixed.

Link to comment
Share on other sites

Nope, Page Files are perfectly capable of extending available memory even for a 32bit program. It's not the same thing as virtual memory, and it should make KSP work the way I described (slowdowns instead of crashes).

I hope it's indeed an Unity bug and that the next KSP will have it fixed.

But ksp can only use 4gb of that memory no matter how much you have, and considering that it loads the entire game at boot up it would still crash.

Link to comment
Share on other sites

Nope, Page Files are perfectly capable of extending available memory even for a 32bit program. It's not the same thing as virtual memory, and it should make KSP work the way I described (slowdowns instead of crashes).

I hope it's indeed an Unity bug and that the next KSP will have it fixed.

You can make the page file as big as you want, but that won't change anything about how much virtual memory a 32bit program can address. I think that what you are describing, in effect, would basically be loading files on the fly instead of all at once. In this case I don't think it would matter if you loaded textures into the page file or into some temp directory on the disk. This is obviously possible (just pay attention to the texture pop in on any Unreal 3 based game), but I gather that it wouldn't work well in KSP even if it is possible (I have no idea if it is).

Link to comment
Share on other sites

nothing prevents you from opening a temp file and writing/reading arbitrary data to it. you would kinda need to wrap it into your references though, so a reference could refer to something in ram or an offset into the temp file. just use a 64-bit integer that you cast to a pointer if its less than equal to 0xFFFFFFFF, otherwise shift it 32 places to the right and use it as an offset into your file. this would of course slow things down a lot, because there would be some extra operations every time you used a pointer.

Link to comment
Share on other sites

[..]

Yes, but a basic 32bit application does use 32bit pointers and thus cannot address more than ~4GB memory. Sure you can implement techniques to use more memory. Even the good old DOS had some techniques for stuff like that.

But it is sth the application has to implement. KSP does not, Unity does not. So no, PageFiles will definitively not help you to get more memory!

That means we are back at Nukes or my initial comment: Either Unity will go 64Bit or Unity/KSP Devs have to spend lots of time on optimization.

Link to comment
Share on other sites

i think using a temp file is a horrible idea. you could do it, but it would actually make things slower. from the developers perspective this is a big no as it would require sweeping changes to the code base for very little gain. switching to compressed texture formats only really requires a few tweaks to a single subsystem and idk why this wasnt done a long time ago.

Edited by Nuke
Link to comment
Share on other sites

I don't want to stray to far from the original topic, but the OP's problem from vessels that have a large part count is due to the high number of physics calculations, not just the RAM limit.

Right now, the real bottleneck of KSP is the CPU. Multi-threading and 64-bit applications would definitely help, but as others have said, very hard to implement.

(part of the multi threading problem is the difficulty of coordinating a bunch of physics calculations at the same time on different threads)

As for pagefile and virtual ram, I don't know very much, but I just wanted to make sure that we don't forget the other bottleneck's that KSP has.

Link to comment
Share on other sites

I don't want to stray to far from the original topic, but the OP's problem from vessels that have a large part count is due to the high number of physics calculations, not just the RAM limit.

Right now, the real bottleneck of KSP is the CPU. Multi-threading and 64-bit applications would definitely help, but as others have said, very hard to implement.

(part of the multi threading problem is the difficulty of coordinating a bunch of physics calculations at the same time on different threads)

As for pagefile and virtual ram, I don't know very much, but I just wanted to make sure that we don't forget the other bottleneck's that KSP has.

However there are mods to deal with the part count issue, there is nothing for memory usage.

Link to comment
Share on other sites

However there are mods to deal with the part count issue, there is nothing for memory usage.

Actually there are: http://forum.kerbalspaceprogram.com/threads/51361-0-21-Squad-Texture-Reduction-Pack-B9-and-KW-Packs-also. And with the new part system and a lot of attention on this issue people are getting better about keeping memory usage down in their mods.

Link to comment
Share on other sites

However there are mods to deal with the part count issue, there is nothing for memory usage.

If it's really that important to you, you do have the option of installing Ubuntu in dual-boot, and running the 64-bit version of KSP.

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...