So, I recently noticed that in my f3 screen it's been saying that I only have like 455mb of memory available, and that I had used about 70% of it etcetc.
Now I usually run Minecraft by allocating 3GB of RAM to it, I average around 90-140FPS.
The thing is, I'm not quite sure what the issue is here, I've run the game with more memory in the past, I launch the game with the same arguments as always, being -Xmx3G, yet it still launchs with about half a gig of ram.
There's a difference between "allocating" and "needing"
You are giving the JVM permission to use up to 3GB( That's Allocating),
but MC doesn't need that much at start up.
In the F3 screen it tells howmuch memory is allocated and how is in use,
as MC's needs increase, more is allocated , up to the max amount you
allocated in the JVM Arguments options.
You will have problems if the arguments are not used correctly, the game will crash.
The rule of thumb is that you should not set the maximum to more then 1/2 of what is installed
and if you set the max, the you should set a low minimum, to make sure the game has the flexibility it needs.
Here are the JVM Arguments I use on an XP system with only 2GB ram installed:
-Xmx1g -This tells the JVM that it can not use more then
1GB of ram. The value you use should be 1/2 of the total ram installed or less.
If you set it to 3g, then you must have at least 6GB ram installed.
-Xms256m - This tells the JVM to reserve a minimum of 256MB ram for MC, if it needs more, MC will request it.
I suggest you keep the value at 256m, using more does nothing useful.
-Xmn128M -This tells the JVM to set aside 128m of the allocated memory for temporary
objects that have a short lifespan.
This is used primarily by mods and has garbage collection performed on it frequently.
Objects that survive long enough are moved to long term memory instead, allowing this heap to be recycled
and help keep memory use under better control.
-XX:PermSize=64m and -XX:MaxPermSize=128m
is a fix for a bug introduced in 1.6 (i believe) that caused frequentl crashes from memory errors.
not everyone needs to use this option
There's a difference between "allocating" and "needing"
You are giving the JVM permission to use up to 3GB( That's Allocating),
but MC doesn't need that much at start up.
In the F3 screen it tells howmuch memory is allocated and how is in use,
as MC's needs increase, more is allocated , up to the max amount you
allocated in the JVM Arguments options.
You will have problems if the arguments are not used correctly, the game will crash.
The rule of thumb is that you should not set the maximum to more then 1/2 of what is installed
and if you set the max, the you should set a low minimum, to make sure the game has the flexibility it needs.
Here are the JVM Arguments I use on an XP system with only 2GB ram installed:
-Xmx1g -This tells the JVM that it can not use more then
1GB of ram. The value you use should be 1/2 of the total ram installed or less.
If you set it to 3g, then you must have at least 6GB ram installed.
-Xms256m - This tells the JVM to reserve 256MB ram for MC, if it needs more, MC will request it.
I suggest you keep the value at 256m, using more does nothing useful.
-Xmn128M -This tells the JVM to set aside 128m of the allocated memory for temporary
objects that have a short lifespan.
This is used primarily by mods and has garbage collection performed on it frequently.
Objects that survive long enough are moved to long term memory instead, allowing this heap to be recycled
and help keep memory use under better control.
-XX:PermSize=64m and -XX:MaxPermSize=128m
is a fix for a bug introduced in 1.6 (i believe) that caused frequentl crashes from memory errors.
not everyone needs to use this option
There's a difference between "allocating" and "needing" -snip-
The debug screen uses Runtime.maxMemory(), which returns the max allocated memory. If you allocate 3GB with the -Xmx argument, then this is what the debug screen should say.
EDIT - Checked MC Source EDIT2 - idgaf about the tiny discrepancy, because it's not relevant. The JVM shouldn't be using a significant amount of the initial allocation anyway. Yes, I said it badly, deal with it.
@OP If you open up task manager or whatever, how much memory does the process use?
Rollback Post to RevisionRollBack
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
The debug screen uses Runtime.maxMemory(), which returns the max allocated memory. If you allocate 3000MB with the -Xmx argument, then this is what the debug screen should say.
EDIT - Checked MC Source
@OP If you open up task manager or whatever, how much memory does the process use?
The debug screen uses Runtime.maxMemory(), which returns the max allocated memory. If you allocate 3000MB with the -Xmx argument, then this is what the debug screen should say.
EDIT - Checked MC Source
@OP If you open up task manager or whatever, how much memory does the process use?
Sorry, that is not correct.
The in game screen displays actual usage and allocation (from the JVM not the arguments)
I am loading 1.7.10 now, with 57 mods installed and using -Xmx1g -Xms256m -Xmn128M
2 Minutes after the world loads , the F3 screen is displaying memory usage at 280MB to 375MB of 499MB allocated
That's 499MB , 1/2 of the max allowed by the JVM Arguments.
If I were to play around for a while, the amount allocated would climb as needed.
If someone elses' game is displaying the Xmx value, then they probably ain't using all 3 of the parameters
(or not correctly)
Or an external program is adding that parameter, recently, the cause of this is Razor Synapse.
I just looked that program up.
It's just a glorified macro editor, that binds macro scripts to input devices
(keyboard keypresses, mouse click, sjoy sticks, etc.)
This probably has nothing to do with the topic.
I just looked that program up.
It's just a glorified macro editor, that binds macro scripts to input devices
(keyboard keypresses, mouse click, sjoy sticks, etc.)
This probably has nothing to do with the topic.
Sorry, that is not correct.
The in game screen displays actual usage and allocation (from the JVM not the arguments)
Perhaps you should be a little less sure. F3 does show you your max heap. Specifically F3 shows 3 different heap statistics. On the first line ("Mem") is how much heap you are using in Java, and the max allowed heap (aka Xmx). On the second line ("Allocated") is the current size of the heap allocated from the OS. This number should be somewhere between Xms and Xmx. For whatever reason the numbers never exactly match the command line parameters, i.e. my Xmx is 2G, but F3 shows 2035MB which is a 13MB discrepancy. There is a similar 13MB discrepancy for my allocated heap compared to the Xms parameter. But if you change your Xmx parameter, you will be able to see the effect on F3
Sorry, that is not correct.
The in game screen displays actual usage and allocation (from the JVM not the arguments)
I am loading 1.7.10 now, with 57 mods installed and using -Xmx1g -Xms256m -Xmn128M
long i = Runtime.getRuntime().maxMemory();
long j = Runtime.getRuntime().totalMemory();
long k = Runtime.getRuntime().freeMemory();
long l = j - k;
ArrayList arraylist = Lists.newArrayList([...] String.format("Mem: % 2d%% %03d/%03dMB", new Object[]{Long.valueOf(l * 100L / i), Long.valueOf(bytesToMb(l)), Long.valueOf(bytesToMb(i))}), String.format("Allocated: % 2d%% %03dMB", new Object[]{Long.valueOf(j * 100L / i), Long.valueOf(bytesToMb(j))}), [...]
Pretty sure it's 100% correct...
It displays the max allocation, and from 1.8 onwards it will actually go as far as to say how much of the max allocation is being used.
Rollback Post to RevisionRollBack
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
long i = Runtime.getRuntime().maxMemory();
long j = Runtime.getRuntime().totalMemory();
long k = Runtime.getRuntime().freeMemory();
long l = j - k;
ArrayList arraylist = Lists.newArrayList([...] String.format("Mem: % 2d%% %03d/%03dMB", new Object[]{Long.valueOf(l * 100L / i), Long.valueOf(bytesToMb(l)), Long.valueOf(bytesToMb(i))}), String.format("Allocated: % 2d%% %03dMB", new Object[]{Long.valueOf(j * 100L / i), Long.valueOf(bytesToMb(j))}), [...]
Pretty sure it's 100% correct...
Dude ...
I said the F3 screen displays Used Memory and Allocated memory
I'm talking about the amounts CURRENTLY Used and CURRENTLY Allocated
I also said that if all 3 options are correctly used the F3 screen does NOT display the maximum Allocated with Xmx.
As I said, I'm using -Xmx1g -Xms256m -Xmn128M -XX:PermSize=64m -XX:MaxPermSize=128m
When I load a world the top right corner of the Debug screen looks something like this ...
Used Memory: XX% (YYYMB) of 1011MB Allocated Memory ZZ% (AAAMB)
do you see it yet? the Xmx value is NOT displayed, instead, what's displayed is Xmx - JVM reserved memory = Displayed Max that can be used.
You can not rely on 1 section of code to figure out what is going on in the game and what is not.
There are too many outside influances going on (ie. mods) or in this case the JVM.....
In this case you didn't know that the Xmx value is used as a command line option with javaw.exe ( the JVM) not the game itself.
Javaw.exe then acts as a sandbox for Minecraft to run inside of, so javaw.exe is using part of the 1GB max allocated
for it's own needs, which in my case, has been 13MB, leaving 1011MB for Minecraft to use.
As I said, I'm using -Xmx1g -Xms256m -Xmn128M -XX:PermSize=64m -XX:MaxPermSize=128m
When I load a world the top right corner of the Debug screen looks something like this ...
Used Memory: XX% (YYYMB) of 1011MB Allocated Memory ZZ% (AAAMB)
not sure if that's directed at me, but the point is, OP cares about a missing 2500mb, not a missing 10-20mb. Yes there will always be a small difference between Xmx and the available RE memory, but I don't think its actually relevant here.
Rollback Post to RevisionRollBack
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
As I said, I'm using -Xmx1g -Xms256m -Xmn128M -XX:PermSize=64m -XX:MaxPermSize=128m
When I load a world the top right corner of the Debug screen looks something like this ...
Used Memory: XX% (YYYMB) of 1011MB Allocated Memory ZZ% (AAAMB)
do you see it yet?
What's your point? That you are capable of editing out the part where I explained what 1011MB referred to?
Or are you trying to tell us that you're bored and want to join the conversation, yet have nothing meaningful to add?
I've seen a lot of useful post from you, helping a lot people , you have my respect for that.
Yet now you post something that appears to be an attempt at causing more chaos in this thread.
Make a valid point, please, or stay away, The energy monster has been fed enough.
We really should get back to trying to fix OP's problem lol...
Regardless of how the JVM works, task manager says that only 500mb of memory is allocated to the entire java process, which means that the problem is probably somewhere else.
@OP you should at least try uninstalling Razer Synapse and seeing what happens.
Rollback Post to RevisionRollBack
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
I love how I'm the one harping on like a 10 year old here lol.
Sorry, I thought i had removed all of the insults I had originally included in frustration over having to reply about something
I felt should have been obviously visible and verifiable.
Now I usually run Minecraft by allocating 3GB of RAM to it, I average around 90-140FPS.
The thing is, I'm not quite sure what the issue is here, I've run the game with more memory in the past, I launch the game with the same arguments as always, being -Xmx3G, yet it still launchs with about half a gig of ram.
Can you copy paste all of your JVM arguments here?
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
You are giving the JVM permission to use up to 3GB( That's Allocating),
but MC doesn't need that much at start up.
In the F3 screen it tells howmuch memory is allocated and how is in use,
as MC's needs increase, more is allocated , up to the max amount you
allocated in the JVM Arguments options.
You will have problems if the arguments are not used correctly, the game will crash.
The rule of thumb is that you should not set the maximum to more then 1/2 of what is installed
and if you set the max, the you should set a low minimum, to make sure the game has the flexibility it needs.
Here are the JVM Arguments I use on an XP system with only 2GB ram installed:
[quote]Xmx1g -Xms256m -Xmn128M -XX:PermSize=64m -XX:MaxPermSize=128m -XX:+UseParNewGC -XX:+CMSConcurrentMTEnabled -XX:+UseCMSCompactAtFullCollection -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy
-Xmx1g -This tells the JVM that it can not use more then
1GB of ram. The value you use should be 1/2 of the total ram installed or less.
If you set it to 3g, then you must have at least 6GB ram installed.
-Xms256m - This tells the JVM to reserve a minimum of 256MB ram for MC, if it needs more, MC will request it.
I suggest you keep the value at 256m, using more does nothing useful.
-Xmn128M -This tells the JVM to set aside 128m of the allocated memory for temporary
objects that have a short lifespan.
This is used primarily by mods and has garbage collection performed on it frequently.
Objects that survive long enough are moved to long term memory instead, allowing this heap to be recycled
and help keep memory use under better control.
-XX:PermSize=64m and -XX:MaxPermSize=128m
is a fix for a bug introduced in 1.6 (i believe) that caused frequentl crashes from memory errors.
not everyone needs to use this option
XX:+UseParNewGC
-XX:+CMSConcurrentMTEnabled
-XX:+UseCMSCompactAtFullCollection
-XX:+UseConcMarkSweepGC
-XX:+CMSIncrementalMode
-XX:-UseAdaptiveSizePolicy
These are mostly garbage collection options I use, since my system only has 1GB for MC to use
-
View User Profile
-
View Posts
-
Send Message
Retired StaffWow, thanks for the help man. Learn something new everyday.
That would explain it, I got a new razer keyboard and mouse for christmas, thanks for the help!
Do you know if theres any way I can disable this?
-
View User Profile
-
View Posts
-
Send Message
Retired StaffUninstall it, as it's not necessary.
The debug screen uses Runtime.maxMemory(), which returns the max allocated memory. If you allocate 3GB with the -Xmx argument, then this is what the debug screen should say.
EDIT - Checked MC Source
EDIT2 - idgaf about the tiny discrepancy, because it's not relevant. The JVM shouldn't be using a significant amount of the initial allocation anyway. Yes, I said it badly, deal with it.
@OP If you open up task manager or whatever, how much memory does the process use?
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
470-450mb, and my pc has 8GB
Sorry, that is not correct.
The in game screen displays actual usage and allocation (from the JVM not the arguments)
I am loading 1.7.10 now, with 57 mods installed and using -Xmx1g -Xms256m -Xmn128M
2 Minutes after the world loads , the F3 screen is displaying memory usage at 280MB to 375MB of 499MB allocated
That's 499MB , 1/2 of the max allowed by the JVM Arguments.
If I were to play around for a while, the amount allocated would climb as needed.
If someone elses' game is displaying the Xmx value, then they probably ain't using all 3 of the parameters
(or not correctly)
I just looked that program up.
It's just a glorified macro editor, that binds macro scripts to input devices
(keyboard keypresses, mouse click, sjoy sticks, etc.)
This probably has nothing to do with the topic.
-
View User Profile
-
View Posts
-
Send Message
Retired Staffhttp://craftcadia.com/forums/threads/psa-razer-synapse-software-limits-java-memory-to-512mb.6751/
Perhaps you should be a little less sure. F3 does show you your max heap. Specifically F3 shows 3 different heap statistics. On the first line ("Mem") is how much heap you are using in Java, and the max allowed heap (aka Xmx). On the second line ("Allocated") is the current size of the heap allocated from the OS. This number should be somewhere between Xms and Xmx. For whatever reason the numbers never exactly match the command line parameters, i.e. my Xmx is 2G, but F3 shows 2035MB which is a 13MB discrepancy. There is a similar 13MB discrepancy for my allocated heap compared to the Xms parameter. But if you change your Xmx parameter, you will be able to see the effect on F3
long i = Runtime.getRuntime().maxMemory(); long j = Runtime.getRuntime().totalMemory(); long k = Runtime.getRuntime().freeMemory(); long l = j - k; ArrayList arraylist = Lists.newArrayList([...] String.format("Mem: % 2d%% %03d/%03dMB", new Object[]{Long.valueOf(l * 100L / i), Long.valueOf(bytesToMb(l)), Long.valueOf(bytesToMb(i))}), String.format("Allocated: % 2d%% %03dMB", new Object[]{Long.valueOf(j * 100L / i), Long.valueOf(bytesToMb(j))}), [...]Pretty sure it's 100% correct...
It displays the max allocation, and from 1.8 onwards it will actually go as far as to say how much of the max allocation is being used.
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
Dude ...
I said the F3 screen displays Used Memory and Allocated memory
I'm talking about the amounts CURRENTLY Used and CURRENTLY Allocated
I also said that if all 3 options are correctly used the F3 screen does NOT display the maximum Allocated with Xmx.
As I said, I'm using -Xmx1g -Xms256m -Xmn128M -XX:PermSize=64m -XX:MaxPermSize=128m
When I load a world the top right corner of the Debug screen looks something like this ...
Used Memory: XX% (YYYMB) of 1011MB
Allocated Memory ZZ% (AAAMB)
do you see it yet? the Xmx value is NOT displayed, instead, what's displayed is Xmx - JVM reserved memory = Displayed Max that can be used.
You can not rely on 1 section of code to figure out what is going on in the game and what is not.
There are too many outside influances going on (ie. mods) or in this case the JVM.....
In this case you didn't know that the Xmx value is used as a command line option with javaw.exe ( the JVM) not the game itself.
Javaw.exe then acts as a sandbox for Minecraft to run inside of, so javaw.exe is using part of the 1GB max allocated
for it's own needs, which in my case, has been 13MB, leaving 1011MB for Minecraft to use.
ok?
I love how I'm the one harping on like a 10 year old here lol.
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
not sure if that's directed at me, but the point is, OP cares about a missing 2500mb, not a missing 10-20mb. Yes there will always be a small difference between Xmx and the available RE memory, but I don't think its actually relevant here.
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
What's your point? That you are capable of editing out the part where I explained what 1011MB referred to?
Or are you trying to tell us that you're bored and want to join the conversation, yet have nothing meaningful to add?
I've seen a lot of useful post from you, helping a lot people , you have my respect for that.
Yet now you post something that appears to be an attempt at causing more chaos in this thread.
Make a valid point, please, or stay away, The energy monster has been fed enough.
Regardless of how the JVM works, task manager says that only 500mb of memory is allocated to the entire java process, which means that the problem is probably somewhere else.
@OP you should at least try uninstalling Razer Synapse and seeing what happens.
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
Sorry, I thought i had removed all of the insults I had originally included in frustration over having to reply about something
I felt should have been obviously visible and verifiable.
Go ahead, you got a freebie coming.