Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Speaking seriously of RAM usage  (Read 2369 times)

0 Members and 1 Guest are viewing this topic.

greybeard

  • Modder
  • member
  • Offline Offline
  • Posts: 1931
  • diligo veritatem
    • Old stuff about RB3D and a tiny "IL2 corner"
Speaking seriously of RAM usage
« on: July 24, 2016, 12:01:20 PM »

The IL-2_Selector_Manual reads:



For both sentences ("...one of the most important..." and "...available to and used by IL-2") I would kindly ask:<<Sorry for my ignorance,but to do what?>>.

It has been repeated over and over that no more than 2GB can be used by the old Java 1.3 of the game, that also lower settings work fine (even 128 MB), etc. But I would be curious to know actually what does IL-2 inside that RAM. I was also unable to find detailed comments about more or less RAM; the best I found is that highest RAM allowed game to run smoother, although with some stuttering. Unfortunately, I can't figure what does it mean "smoother stuttering", so i remained confused. :-X

I wonder: is that RAM used only by Java? If so, since I see classfiles are relatively little, also 512 MB should allow to manage thousands of files. Or in that RAM resides also graphics, if so it seems that would be required the highest possible...

Is there any impact on FPS?

Personally, I tested with some different setting on my most troubled install, finding that with 128 MB the game just won't start. With 256/512/768 MB it works with same FPS and apparently same stuttering. With 1024 locks up in some instance. Having no instruments for an accurate measure of performance, I wonder if should be better "minimize" or "maximize" the RAM, or searching a balance around the middle. I've no clue. To know what usage makes the game of assigned RAM would help to perform a reasoned choice.

Thank you,
GB
Logged
CPU: AMD Athlon 64 - RAM: 2GB DDR @ 201 MHz - MoBo: ASUSTeK Computer INC. A8N-SLI (Socket 939) - Vidcard: 1024MB NVIDIA GeForce 9400 GT (Club3D) - Screen: L1750SQ (1280x1024@75Hz) - Audio: Realtek AC'97 Audio.

Kilo

  • Modder
  • member
  • Offline Offline
  • Posts: 548
  • Hold my beer!
    • Sqn. 71 fighter-bombing Silver Wings
Re: Speaking seriously of RAM usage
« Reply #1 on: July 24, 2016, 12:59:48 PM »

I think the graphics and phisics use most of that RAM, but the old java can't be used to render something that needs more than 2GB.

Just my 2 cents.
Logged
Fortune favours the bold; disaster even more so

spartan18a

  • Supporter
  • member
  • Offline Offline
  • Posts: 688
Re: Speaking seriously of RAM usage
« Reply #2 on: July 24, 2016, 03:02:01 PM »

I have always wonder if now with the new PC 15 years older than the game, is it 512 or 1024 the beat option? I've heard that 512 is better but honestly ... I just don't get it :(

Sent from my XT1032 using Tapatalk

Logged
Winning is optional, but trying your best is not.

greybeard

  • Modder
  • member
  • Offline Offline
  • Posts: 1931
  • diligo veritatem
    • Old stuff about RB3D and a tiny "IL2 corner"
Re: Speaking seriously of RAM usage
« Reply #3 on: July 25, 2016, 12:08:46 AM »

I was hoping to get enlightening answers. Nevermind! I will remain in my ignorance ... in good company! 8)
Logged
CPU: AMD Athlon 64 - RAM: 2GB DDR @ 201 MHz - MoBo: ASUSTeK Computer INC. A8N-SLI (Socket 939) - Vidcard: 1024MB NVIDIA GeForce 9400 GT (Club3D) - Screen: L1750SQ (1280x1024@75Hz) - Audio: Realtek AC'97 Audio.

SAS~Storebror

  • Editor
  • member
  • Offline Offline
  • Posts: 23959
  • Taking a timeout
    • STFU
Re: Speaking seriously of RAM usage
« Reply #4 on: July 25, 2016, 02:48:04 AM »

Let me try to do the splits between "enlightening" and technical mumbo-jumbo.
First and foremost the Selector RAM setting only applies to memory available to IL-2's Java virtual machine.
The rendering is "outsourced" in native libraries which use their own static buffers to pre-load e.g. textures before they're forwarded to the graphics driver.
Since IL-2 is a 32 Bit application and runs in a single process, adding all memory together cannot exceed 2GB.
That's why for instance it's not clever to try to assign nearly 2GB for Java, it won't fit into the remaining space after subtracting the native buffers from the available 2GB for the whole IL-2 process.
The useable limit is somewhere slightly above 1GB.
IL-2 might start with somewhat more Java dedicated memory (e.g. 1.5 GB), but so far there's no use in doing so.

Comparing the memory limit dedicated to the Java VM with the Java class file sizes is pointless.
For instance a classfile containing just this line in it's static initializer:
Code: [Select]
final byte[] ar = new byte[ Integer.MAX_VALUE / 2 ];will have a filesize of less than one kilobyte, but at runtime it will allocate a full Gigabyte of RAM.

Stock IL-2 allocates as little as 96MB for Java by default.
This works because up to a specific limit the Java VM will dynamically allocate more RAM if needed, but since this is done at runtime, the game will slow down extremely during the allocation process and the subsequent garbage collections.
This is where the Selector kicks in:
It will statically set the minimum and maximum allocated RAM limits to the same values, thereby eliminating the need for the VM to dynamically manage the RAM allocation, making garbage collections much faster etc.
This is most useful when there are many Java objects active at the same time, which can be the case when your mission is very crowded with ground and air objects, and particularly this comes handy when you build complex missions in the Full Mission Builder.

The standard "John Doe" User is best suited with 512MB RAM limit, hands down.
Power users like mission builders will appreciate the ability to raise the limit to 1GB, at least temporarily for mission building.

Best regards - Mike
Logged
Don't split your mentality without thinking twice.

greybeard

  • Modder
  • member
  • Offline Offline
  • Posts: 1931
  • diligo veritatem
    • Old stuff about RB3D and a tiny "IL2 corner"
Re: Speaking seriously of RAM usage
« Reply #5 on: July 25, 2016, 11:57:39 AM »

Thanks Mike for comprehensive explanation.

I had to give a glance to Wiki for "native libraries", "runtime" and "garbage collections", but I think to have understood enough. Quite enlightening the point about selector setting "minimum and maximum allocated RAM limits to the same values". Definitive conclusion about need of high RAM to manage "many Java objects active at the same time", which I can understand happens mainly with very crowded missions in FMB.

I'm going to set 512 MB in all my game installations, and now I know why. ;)

Thanks again,
GB
Logged
CPU: AMD Athlon 64 - RAM: 2GB DDR @ 201 MHz - MoBo: ASUSTeK Computer INC. A8N-SLI (Socket 939) - Vidcard: 1024MB NVIDIA GeForce 9400 GT (Club3D) - Screen: L1750SQ (1280x1024@75Hz) - Audio: Realtek AC'97 Audio.

vpmedia

  • Modder
  • member
  • Offline Offline
  • Posts: 6652
  • www.vpmedia.hu/il2
    • VPMEDIA SKINS
Re: Speaking seriously of RAM usage
« Reply #6 on: July 26, 2016, 09:36:14 AM »

Thanks for the explanation Mike. I do build those crowded missions sometimes and 1024Mb works just fine, I have an extremly stable 4.12 modact game.
Pages: [1]   Go Up
 

Page created in 0.03 seconds with 26 queries.