My minecraft lags a lot, and I don't know why. Sometimes when I log on, I get a decent 80 fps. But other times I'm getting like(most recently, like in the past week), 1, or 2 fps. Also, when I have low fps, the pause menu, when I'm on it, the game runs 50 fps in the background. When I switch worlds, I either get high or low fps(not as low, but like 15 fps) with no pattern indicating what it'll be. In addition, when I try to add more ram to minecraft (usually 2 GB), since my computer has 10 GB of ram, an error message comes up saying
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap
When I log back onto the laggy world, it stays the same fps (about 4 fps).
I've tried changing the game difficulty, smooth lighting, particles, clouds, max framerate, and almost every other video setting, but nothing's worked.