1
Minecraft memory being used up to fast!?
Okay... well hello there planet Minecraft!
So recently I have gotten a lot of lag spikes and I found the problem, my memory is being used up to quickly! But that solution lead to another problem... I have no idea why it is happening....
Please help! :3
So recently I have gotten a lot of lag spikes and I found the problem, my memory is being used up to quickly! But that solution lead to another problem... I have no idea why it is happening....
Please help! :3
Create an account or sign in to comment.
41
1
ZeldaStone_ENDER_DRAGON_TheShadbusherNot really. If you give Minecraft 8 gigs of RAM to work with and it never uses over 2, that extra 6 gigs is useless.
I tried to challenge that.
HA! See! GPU! :p
That's just because I was trying to run shaders and a 512x texturepack at once. My gpu only has 2gb of Memory.
1
_ENDER_DRAGON_TheShadbusherNot really. If you give Minecraft 8 gigs of RAM to work with and it never uses over 2, that extra 6 gigs is useless.
I tried to challenge that.
HA! See! GPU! :p
1
TheShadbusherNot really. If you give Minecraft 8 gigs of RAM to work with and it never uses over 2, that extra 6 gigs is useless.
I tried to challenge that.
1
Well, is your graphics old? Is it overheating?
1
What problem is that trying to solve though. That's what I'm trying to understand.
1
Holy hell I am dumb. Ignore me, it's like midnight
1
Heh, that's ok. I do that too sometimes.
1
Is your gpu dead?
1
That makes no sense.
1
53MP3RF1_ENDER_DRAGON_
How did you manage only using that much memory? I copied my settings to yours and even got the same resource pack. My mc uses alot of Memory for some reason. It's not modded.
http://i.imgur.com/W8540Sm.png
Can't use SIMG because you can't see any numbers.
Optifine, perhaps?
Your resolution is also different from mine. Can you post a picture of your Edit Profile menu? I'm especially interested in your -Xmn value. Is it set to the same one I set mine to when I was using 3GB of RAM? It looks like you've got 3 and a half or so allocated, so that may also affect things.
The start arguments aren't much: -Xmx4G
I used to have alot more java flags but minecraft suddenly had a problem with them so I removed them all.
Here's my settings. All the other settings that aren't shown are still the same as you had them.
1
_ENDER_DRAGON_
How did you manage only using that much memory? I copied my settings to yours and even got the same resource pack. My mc uses alot of Memory for some reason. It's not modded.
http://i.imgur.com/W8540Sm.png
Can't use SIMG because you can't see any numbers.
Optifine, perhaps?
Your resolution is also different from mine. Can you post a picture of your Edit Profile menu? I'm especially interested in your -Xmn value. Is it set to the same one I set mine to when I was using 3GB of RAM? It looks like you've got 3 and a half or so allocated, so that may also affect things.
1
I have 1337Mb allocated. For reals.
1
Ha.
1
Seems legit.
1
Click to reveal
53MP3RF1I decided to do a little test in regards to this. There are two important values that need to be addressed, however, before I continue. They are the -Xmx value and the -Xmn value. Both can be reached in the "Edit Profile" menu. The -Xmx value controls the amount of RAM that is allocated in total to Minecraft at any given time. Thus, -Xmx1G allocates 1 gigabyte of RAM to Minecraft. The -Xmn value controls the minimum amount of RAM Minecraft is using at any given time. Thus, -Xmn128M forces the client to use at least 128 megabytes of RAM at any given time.
With those out of the way, I will include a screenshot of my graphics settings for these tests. There are no mods, and I am running 32x32 WillPack. All credit for images goes to the creator of that texture pack, which can be found here.
The first test I decided to do was on an Amplified world. I ran around the world a bit and then returned to the same spot every time to take a screenshot. I tried this with 1GB, 2GB, 3GB, 4GB, 5GB, and 6GB of RAM, scaling the Xmn value up 128MB of RAM for every GB allocated.
Here is the default RAM allocation values, with -Xmx1G and -Xmn128M.
Alright, pretty standard. About 30%-35% RAM usage overall.
Here is -Xmx2G and -Xmn256M.
Interesting. We've dropped about 8%-10% of our RAM usage, by only scaling up by 1GB of RAM allocated.
Here is -Xmx3G and -Xmn384M.
Wow. We've dropped another 10% or so down here. Very interesting. Will the scaling continue in this fashion?
Here is -Xmx4G and -Xmn512M.
Hm, I guess not. RAM consumption seems to be about the same here.
Here is -Xmx5g and -Xmn640M.
We seem to have dropped a little bit once again, but having to allocate two more gigabytes of RAM to the program to achieve 4%-5% less RAM usage seems silly.
Now, the main attraction: -Xmx6G and -Xmn768M.
It looks, actually, like RAM usage has gone up. Unfortunately, I cannot see if the relationship between RAM and usage is parabolic (or at least curved) as 6GB is half of the RAM in my PC, and I don't want to choke the rest of the computer for resources.
Now, I was curious. I wanted to see what happened if we went down in RAM allocation. I started with -Xmx512M and -Xmn64M.
VERY interesting. RAM usage is the highest we've seen out of all of it, but it appears to be the same (or close to the same) amount of RAM being used in the 1GB test. Also, if you've been paying attention to the FPS counter, you'll notice the frames are quite a bit higher than the ones in the other test. While every other test ranged between 280 and 200 frames per second, I checked and saw the frames on the 512MB RAM allocation test was consistently higher (lowest I saw was 280 or 285, highest seen was about 350).
I tried with -Xmx128M and -Xmn32M, but the game gave me less than 10 fps and 99% memory usage at that point - it crashed when I tried to take a screenshot.
So, I've come to the conclusion that RAM allocation DOES matter in terms of RAM consumed, but it scales weirdly and at some point begins to double back on itself.
OP, if you're having trouble you could try allocating a little LESS RAM, as 512MB seemed to be fine for me and gave me very nice frames per second, at least on a vanilla, 32x32 pack client. I'm not sure if you have 800 mods installed that that is recommended, but to each their own. I prefer vanilla. You should also make sure you're not allocating too MUCH RAM if you decide to scale it higher than the default - anything higher than about half of your PC's RAM resources may choke out other processes and will definitely affect your gameplay (so, if you have 4GB of RAM you should only allocate 2GB MAX, and 8GB only allocate 4GB MAX, etc. - however, you can see by my tests it's not always beneficial to allocate more RAM). I wish you the best of luck in your problem-solving!
How did you manage only using that much memory? I copied my settings to yours and even got the same resource pack. My mc uses alot of Memory for some reason. It's not modded.
http://i.imgur.com/W8540Sm.png
Can't use SIMG because you can't see any numbers.
1
SnowyfoxRoboShadow
How exactly does memory help compensate for a GPU? Under this logic, I could install more RAM into my computer and play BF4. (I couldn't)
Weaker GPUs don't have their own dedicated VRAM. They are Integrated; they share memory with the main RAM. If you have tons of RAM and use an Integrated card, you will have enough memory for both the game itself and all the graphics processing they have to do. It won't be the same as a dedicated GPU, but adding more RAM in this case will definitely help instead of trying to use like 2GB of RAM for both Minecraft and all the graphic processing. It'll really be belted thin if you do that.
You can actually install more RAM and try to play BF4. You'll run at like 5-10 FPS, but the extra RAM will at least get the game running in the first place, instead of downright crashing due to insufficient memory. So yes, that logic SHOULD work. Unless your comp is wayyyyy too weak.
Yes, that. I'm pretty sure I can run BF4, at least with the graphics set lower, but the "can you run it" site tells me I can't even do portal 2 or Minecraft --- And I play both of those with graphics set as high as they can go, 90% of the time. The only thing I ever have to turn down, in minecraft, is the view distance, and that's generally only when i'm playing on my modded server or in an area that's generating a lot of lag.
1
53MP3RF1Click to revealI decided to do a little test in regards to this. There are two important values that need to be addressed, however, before I continue. They are the -Xmx value and the -Xmn value. Both can be reached in the "Edit Profile" menu. The -Xmx value controls the amount of RAM that is allocated in total to Minecraft at any given time. Thus, -Xmx1G allocates 1 gigabyte of RAM to Minecraft. The -Xmn value controls the minimum amount of RAM Minecraft is using at any given time. Thus, -Xmn128M forces the client to use at least 128 megabytes of RAM at any given time.
With those out of the way, I will include a screenshot of my graphics settings for these tests. There are no mods, and I am running 32x32 WillPack. All credit for images goes to the creator of that texture pack, which can be found here.
The first test I decided to do was on an Amplified world. I ran around the world a bit and then returned to the same spot every time to take a screenshot. I tried this with 1GB, 2GB, 3GB, 4GB, 5GB, and 6GB of RAM, scaling the Xmn value up 128MB of RAM for every GB allocated.
Here is the default RAM allocation values, with -Xmx1G and -Xmn128M.
Alright, pretty standard. About 30%-35% RAM usage overall.
Here is -Xmx2G and -Xmn256M.
Interesting. We've dropped about 8%-10% of our RAM usage, by only scaling up by 1GB of RAM allocated.
Here is -Xmx3G and -Xmn384M.
Wow. We've dropped another 10% or so down here. Very interesting. Will the scaling continue in this fashion?
Here is -Xmx4G and -Xmn512M.
Hm, I guess not. RAM consumption seems to be about the same here.
Here is -Xmx5g and -Xmn640M.
We seem to have dropped a little bit once again, but having to allocate two more gigabytes of RAM to the program to achieve 4%-5% less RAM usage seems silly.
Now, the main attraction: -Xmx6G and -Xmn768M.
It looks, actually, like RAM usage has gone up. Unfortunately, I cannot see if the relationship between RAM and usage is parabolic (or at least curved) as 6GB is half of the RAM in my PC, and I don't want to choke the rest of the computer for resources.
Now, I was curious. I wanted to see what happened if we went down in RAM allocation. I started with -Xmx512M and -Xmn64M.
VERY interesting. RAM usage is the highest we've seen out of all of it, but it appears to be the same (or close to the same) amount of RAM being used in the 1GB test. Also, if you've been paying attention to the FPS counter, you'll notice the frames are quite a bit higher than the ones in the other test. While every other test ranged between 280 and 200 frames per second, I checked and saw the frames on the 512MB RAM allocation test was consistently higher (lowest I saw was 280 or 285, highest seen was about 350).
I tried with -Xmx128M and -Xmn32M, but the game gave me less than 10 fps and 99% memory usage at that point - it crashed when I tried to take a screenshot.
So, I've come to the conclusion that RAM allocation DOES matter in terms of RAM consumed, but it scales weirdly and at some point begins to double back on itself.
OP, if you're having trouble you could try allocating a little LESS RAM, as 512MB seemed to be fine for me and gave me very nice frames per second, at least on a vanilla, 32x32 pack client. I'm not sure if you have 800 mods installed that that is recommended, but to each their own. I prefer vanilla. You should also make sure you're not allocating too MUCH RAM if you decide to scale it higher than the default - anything higher than about half of your PC's RAM resources may choke out other processes and will definitely affect your gameplay (so, if you have 4GB of RAM you should only allocate 2GB MAX, and 8GB only allocate 4GB MAX, etc. - however, you can see by my tests it's not always beneficial to allocate more RAM). I wish you the best of luck in your problem-solving!
Thanks for testing! Pretty interesting results. But for me, not that surprising. The JVM itself is quite the weird thing, especially with memory management. Minecraft as a Java game would act quite insensible on memory management at times. I don't really expect any actual legitimate pattern in memory usage if you toy around with the settings. Nice that you found some form of quadratic pattern. Maybe it works different on different machines?
53MP3RF1You should also make sure you're not allocating too MUCH RAM if you decide to scale it higher than the default - anything higher than about half of your PC's RAM resources may choke out other processes and will definitely affect your gameplay
Oh, right! That too! Maybe that's OP's problem here. I forgot about that.
1
FrankieHolden09i only allocate 1G of ram
and I get 100 fps
you should try that to
If that actually happens, chances are, your GPU's as strong as mine.
1
I decided to do a little test in regards to this. There are two important values that need to be addressed, however, before I continue. They are the -Xmx value and the -Xmn value. Both can be reached in the "Edit Profile" menu. The -Xmx value controls the amount of RAM that is allocated in total to Minecraft at any given time. Thus, -Xmx1G allocates 1 gigabyte of RAM to Minecraft. The -Xmn value controls the minimum amount of RAM Minecraft is using at any given time. Thus, -Xmn128M forces the client to use at least 128 megabytes of RAM at any given time.
With those out of the way, I will include a screenshot of my graphics settings for these tests. There are no mods, and I am running 32x32 WillPack. All credit for images goes to the creator of that texture pack, which can be found here.
The first test I decided to do was on an Amplified world. I ran around the world a bit and then returned to the same spot every time to take a screenshot. I tried this with 1GB, 2GB, 3GB, 4GB, 5GB, and 6GB of RAM, scaling the Xmn value up 128MB of RAM for every GB allocated.
Here is the default RAM allocation values, with -Xmx1G and -Xmn128M.
Alright, pretty standard. About 30%-35% RAM usage overall.
Here is -Xmx2G and -Xmn256M.
Interesting. We've dropped about 8%-10% of our RAM usage, by only scaling up by 1GB of RAM allocated.
Here is -Xmx3G and -Xmn384M.
Wow. We've dropped another 10% or so down here. Very interesting. Will the scaling continue in this fashion?
Here is -Xmx4G and -Xmn512M.
Hm, I guess not. RAM consumption seems to be about the same here.
Here is -Xmx5g and -Xmn640M.
We seem to have dropped a little bit once again, but having to allocate two more gigabytes of RAM to the program to achieve 4%-5% less RAM usage seems silly.
Now, the main attraction: -Xmx6G and -Xmn768M.
It looks, actually, like RAM usage has gone up. Unfortunately, I cannot see if the relationship between RAM and usage is parabolic (or at least curved) as 6GB is half of the RAM in my PC, and I don't want to choke the rest of the computer for resources.
Now, I was curious. I wanted to see what happened if we went down in RAM allocation. I started with -Xmx512M and -Xmn64M.
VERY interesting. RAM usage is the highest we've seen out of all of it, but it appears to be the same (or close to the same) amount of RAM being used in the 1GB test. Also, if you've been paying attention to the FPS counter, you'll notice the frames are quite a bit higher than the ones in the other test. While every other test ranged between 280 and 200 frames per second, I checked and saw the frames on the 512MB RAM allocation test was consistently higher (lowest I saw was 280 or 285, highest seen was about 350).
I tried with -Xmx128M and -Xmn32M, but the game gave me less than 10 fps and 99% memory usage at that point - it crashed when I tried to take a screenshot.
So, I've come to the conclusion that RAM allocation DOES matter in terms of RAM consumed, but it scales weirdly and at some point begins to double back on itself.
OP, if you're having trouble you could try allocating a little LESS RAM, as 512MB seemed to be fine for me and gave me very nice frames per second, at least on a vanilla, 32x32 pack client. I'm not sure if you have 800 mods installed that that is recommended, but to each their own. I prefer vanilla. You should also make sure you're not allocating too MUCH RAM if you decide to scale it higher than the default - anything higher than about half of your PC's RAM resources may choke out other processes and will definitely affect your gameplay (so, if you have 4GB of RAM you should only allocate 2GB MAX, and 8GB only allocate 4GB MAX, etc. - however, you can see by my tests it's not always beneficial to allocate more RAM). I wish you the best of luck in your problem-solving!
With those out of the way, I will include a screenshot of my graphics settings for these tests. There are no mods, and I am running 32x32 WillPack. All credit for images goes to the creator of that texture pack, which can be found here.
The first test I decided to do was on an Amplified world. I ran around the world a bit and then returned to the same spot every time to take a screenshot. I tried this with 1GB, 2GB, 3GB, 4GB, 5GB, and 6GB of RAM, scaling the Xmn value up 128MB of RAM for every GB allocated.
Here is the default RAM allocation values, with -Xmx1G and -Xmn128M.
Alright, pretty standard. About 30%-35% RAM usage overall.
Here is -Xmx2G and -Xmn256M.
Interesting. We've dropped about 8%-10% of our RAM usage, by only scaling up by 1GB of RAM allocated.
Here is -Xmx3G and -Xmn384M.
Wow. We've dropped another 10% or so down here. Very interesting. Will the scaling continue in this fashion?
Here is -Xmx4G and -Xmn512M.
Hm, I guess not. RAM consumption seems to be about the same here.
Here is -Xmx5g and -Xmn640M.
We seem to have dropped a little bit once again, but having to allocate two more gigabytes of RAM to the program to achieve 4%-5% less RAM usage seems silly.
Now, the main attraction: -Xmx6G and -Xmn768M.
It looks, actually, like RAM usage has gone up. Unfortunately, I cannot see if the relationship between RAM and usage is parabolic (or at least curved) as 6GB is half of the RAM in my PC, and I don't want to choke the rest of the computer for resources.
Now, I was curious. I wanted to see what happened if we went down in RAM allocation. I started with -Xmx512M and -Xmn64M.
VERY interesting. RAM usage is the highest we've seen out of all of it, but it appears to be the same (or close to the same) amount of RAM being used in the 1GB test. Also, if you've been paying attention to the FPS counter, you'll notice the frames are quite a bit higher than the ones in the other test. While every other test ranged between 280 and 200 frames per second, I checked and saw the frames on the 512MB RAM allocation test was consistently higher (lowest I saw was 280 or 285, highest seen was about 350).
I tried with -Xmx128M and -Xmn32M, but the game gave me less than 10 fps and 99% memory usage at that point - it crashed when I tried to take a screenshot.
So, I've come to the conclusion that RAM allocation DOES matter in terms of RAM consumed, but it scales weirdly and at some point begins to double back on itself.
OP, if you're having trouble you could try allocating a little LESS RAM, as 512MB seemed to be fine for me and gave me very nice frames per second, at least on a vanilla, 32x32 pack client. I'm not sure if you have 800 mods installed that that is recommended, but to each their own. I prefer vanilla. You should also make sure you're not allocating too MUCH RAM if you decide to scale it higher than the default - anything higher than about half of your PC's RAM resources may choke out other processes and will definitely affect your gameplay (so, if you have 4GB of RAM you should only allocate 2GB MAX, and 8GB only allocate 4GB MAX, etc. - however, you can see by my tests it's not always beneficial to allocate more RAM). I wish you the best of luck in your problem-solving!
1
RoboShadow
How exactly does memory help compensate for a GPU? Under this logic, I could install more RAM into my computer and play BF4. (I couldn't)
Weaker GPUs don't have their own dedicated VRAM. They are Integrated; they share memory with the main RAM. If you have tons of RAM and use an Integrated card, you will have enough memory for both the game itself and all the graphics processing they have to do. It won't be the same as a dedicated GPU, but adding more RAM in this case will definitely help instead of trying to use like 2GB of RAM for both Minecraft and all the graphic processing. It'll really be belted thin if you do that.
You can actually install more RAM and try to play BF4. You'll run at like 5-10 FPS, but the extra RAM will at least get the game running in the first place, instead of downright crashing due to insufficient memory. So yes, that logic SHOULD work. Unless your comp is wayyyyy too weak.
1
SilverKyttenRoboShadow
So you're saying my RAM can process graphics like a gpu? Sounds legit.
No, I'm saying using an excess of RAM can help compensate for a bad graphics card.
How exactly does memory help compensate for a GPU? Under this logic, I could install more RAM into my computer and play BF4. (I couldn't)
1
David5886In Vanilla Minecraft; I have never seen Minecraft use more than 800 MB of RAM. I have tried putting 6GB of RAM to Minecraft vs. 1 GB of RAM. I lost about 8 FPS on average when using 6GB of RAM, I got more when only using 1 GB of RAM. If you have more than 2GB of RAM to Minecraft, your letting a bunch of it go to "waste"
Woo, benchmarks!
1
In Vanilla Minecraft; I have never seen Minecraft use more than 800 MB of RAM. I have tried putting 6GB of RAM to Minecraft vs. 1 GB of RAM. I lost about 8 FPS on average when using 6GB of RAM, I got more when only using 1 GB of RAM. If you have more than 2GB of RAM to Minecraft, your letting a bunch of it go to "waste"
EDIT: My mom's laptop runs at 150 FPS on average and about half a gig of ram is put to minecraft.
EDIT: My mom's laptop runs at 150 FPS on average and about half a gig of ram is put to minecraft.
1
SilverKyttenTheShadbusherAllocating more RAM to the Java instance actually takes away from the memory that your iGPU can use.
Only if you don't have more than enough for the gpu to use.
Good point.
SilverKyttenRoboShadow
So you're saying my RAM can process graphics like a gpu? Sounds legit.
No, I'm saying using an excess of RAM can help compensate for a bad graphics card.
Not really. If you give Minecraft 8 gigs of RAM to work with and it never uses over 2, that extra 6 gigs is useless.
1
you should try that to
1
and I get 100 fps
1
i only allocate 1G of ram
1
If you can, you should try 2gb. You might get a better boost. My minecraft uses 1.4gb with no texturepacks or mods at all.
1
TheShadbusherAllocating more RAM to the Java instance actually takes away from the memory that your iGPU can use.
Only if you don't have more than enough for the gpu to use.
RoboShadow
So you're saying my RAM can process graphics like a gpu? Sounds legit.
No, I'm saying using an excess of RAM can help compensate for a bad graphics card.
1
SilverKyttenTheShadbusherIf you allocate a ton of memory to Minecraft, it won't end up using it and the rest of your system will suffer from not having enough memory to work with.
When you've got 16gb and only use 30%, even while playing Minecraft, I think you're good. ;P
Also, the excess RAM helps compensate for graphics cards that aren't great. [cough]Intel integrated[/cough]
So you're saying my RAM can process graphics like a gpu? Sounds legit.
1
SilverKytten
Also, the excess RAM helps compensate for graphics cards that aren't great. [cough]Intel integrated[/cough]
Allocating more RAM to the Java instance actually takes away from the memory that your iGPU can use.
1
TheShadbusherIf you allocate a ton of memory to Minecraft, it won't end up using it and the rest of your system will suffer from not having enough memory to work with.
When you've got 16gb and only use 30%, even while playing Minecraft, I think you're good. ;P
Also, the excess RAM helps compensate for graphics cards that aren't great. [cough]Intel integrated[/cough]
1
To the people here who give Minecraft a lot of memory:
Unless you're running a crap ton of mods, Minecraft will (like 95% of the time) never need more than 2 GB of memory. Most of the time, it uses less than 1 GB.
If you allocate a ton of memory to Minecraft, it won't end up using it and the rest of your system will suffer from not having enough memory to work with.
OP, what are your computer's specs?
Unless you're running a crap ton of mods, Minecraft will (like 95% of the time) never need more than 2 GB of memory. Most of the time, it uses less than 1 GB.
If you allocate a ton of memory to Minecraft, it won't end up using it and the rest of your system will suffer from not having enough memory to work with.
OP, what are your computer's specs?
1
Snowyfox
Why would you allocate 4GB?
Depends on how much memory you have ... I allocate 6GB, just because I can.
12youri12i usually locate 10gb ram to minecraft (i got 16gb)
Yeah, that's the reason.
That's likely the issue, though. You've probably got too many processes running and your computer can't handle it, though a better assumption could be made if we had your computer's stats.
1
You probably don't have much memory allocated to it then. I usually allocate 4gb but if you can't do that try something at least higher than the default.
1
Why would you allocate 4GB? You're playing modded, aren't you? lol
1
Sometimes I run a 256x texturepack and shaders. It's not always on though so I just keep it at 4gb.
1
i usually locate 10gb ram to minecraft (i got 16gb)
1
How much is "really quickly"? If you mean the fact that Minecraft gobbles on 200MB as soon as possible and then proceeds to take up another 200MB within a minute, I don't think there's much you can do about that. lol.
1
Options > Video Settings > USE VBOs: ON
1
Hm, are you using mods? if so, they could be causing the memory to go.
Maybe uninstall and install minecraft?
Maybe clear some space of unwanted things on your PC. Not sure if these will help, but, give them a try.
Maybe uninstall and install minecraft?
Maybe clear some space of unwanted things on your PC. Not sure if these will help, but, give them a try.