Ok so I used to run minecraft just fine but recently I can't do anything. I have an i5-2500k at 3.5ghz that boosts to 4.2, 16gb of ddr3 1600mhz ram and a gtx 770 2gb gpu. I jump between 0-a few hundred fps i have it running with 4 gigs of ram to the game and i'm running java 64-bit(i have a 64-bit os). It says that i'm using 100% allocated and the mem percent jumps around. Here is a video of my issue sorry it is long. I'm not sure what my issue is and how to fix it! I would love to be able to play, record, and stream minecraft but right now I can't do any of those things.
Minecraft should never need 4GB of RAM. Allocating that much is probably the issue.
Quote from sensi277go-next
On the topic of RAM usage, you should only ever allocate 350-512 MB to Minecraft, as it never really needs more than that (unless you're using an excessive amount of mods). Use more than that, and the other programs on your computer (including Windows itself) run really slowly. The reason behind this is that when Windows has free memory, it fills that memory up with a cache containing some commonly accessed files or programs. It does this so that if you launch Google Chrome, that program is (at least partially) already in memory. It doesn't have to go to the hard drive to access it, as it's already right there in memory. But when you use up more memory, the cache gets smaller, and eventually disappears if there isn't enough room. At this point, the processes running in the background are already using up all the memory. So what happens when the amount of available RAM goes down still? What happens is that Windows takes the programs that are doing the least stuff, suspends them and puts those processes into a "page file". A page file is essentially a file that Windows puts suspended processes in when there isn't enough RAM to keep them running. The programs sit there on the Hard Drive while your computer is doing other stuff, and when the processes are needed, it just loads them back into RAM. The reason it does this is because processes have to be in RAM to be able to function. Anyways, Windows wants to put the process back into RAM, but it has a problem. There isn't enough spare RAM to copy the process to. So what Windows does is it takes another program that isn't doing very much, suspends it, and puts it in the page file. It can now put the original process back into RAM.
This whole process takes a relatively long time for the computer to execute, simply because hard drives are really slow. It takes time to write a process to the hard drive, then to read it and erase it from the hard drive, especially when RAM is low and it the computer has to do this many times a second. Meanwhile, Minecraft is running, and it's suffering performance issues because the computer is constantly reading and writing to the disk. This wouldn't be happening, though, if Minecraft hadn't took so much memory for itself. Even if Minecraft isn't actually using much of that memory, no other processes can use it because it belongs to Minecraft.
TL;DR: Only allocate about 350MB-512MB to Minecraft, or your performance will likely suffer.
Do what sensi277 said but, also open the Minecraft Launcher, go to Edit Profile, click on Arguments (You may have to check the box to edit it) add -Xmn200M to the end of the arugments line, click Save Profile and try running Minecraft and hopefully it won't fluctuate that much, it seems to be the RAM that is the issue.
With a GTX 770, you should be able to get 150fps without Optifine easily. It seems the problem may be due to throttling. When a GPU gets too hot, you will see lag spikes like that. The problem is most likely that your computer doesn't have enough air circulation. For a more detailed description of this, check out this video:
e