Help with java arguments

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here
  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Cosmology27

New Member
Jul 29, 2019
297
0
1
So I admit I have no understanding of java arguments. Here's what I'm currently using.
-Xmx4G -Xms2G -XX:MaxPermSize=1G

I have heard that Java actually can't do more than 4gig, is this true?
I know I need permgen, but what does it actually do?
Can my permgen be that high?

Basically, my problem is that I have a massive modpack, but it still runs a little choppy, no matter what I do, and I'd like to keep all the mods, so I'm wondering if there is a fix?

Thanks!
 

Wagon153

New Member
Jul 29, 2019
3,148
-3
1
It can do more then 4 gig, but it is REALLY not reccomended. The more RAM dedicated, the harder the garbage collector has to work when it's cleaning time, and the more stress is put on your processor.
Also -XX:MaxPermSize=1G, change 1G to 256m. You are giving Java a heap size of 1 gigabyte. Not even a pack of 300 mods needs a gigabyte.
 
  • Like
Reactions: Cosmology27

Wagon153

New Member
Jul 29, 2019
3,148
-3
1
Permgen is the space given to the mods during loadup time to do all their hooks, ASM, reflection, and interaction with Forge.
 
  • Like
Reactions: Cosmology27

Cosmology27

New Member
Jul 29, 2019
297
0
1
Awesome thank for the info!
So is there no way to fix the choppiness of an overloaded modpack for me then?
 

Cosmology27

New Member
Jul 29, 2019
297
0
1
It's pretty much just a constant state, and it starts the moment I load a world.
It's showing it's using roughly 1500m memory all the time, and I'm getting roughly 9fps (so quite choppy). I have 10 gig RAM on my computer.

This is not during chunk generation or anything. It's just regular game play, and it's constant.
 

Wagon153

New Member
Jul 29, 2019
3,148
-3
1
It's pretty much just a constant state, and it starts the moment I load a world.
It's showing it's using roughly 1500m memory all the time, and I'm getting roughly 9fps (so quite choppy). I have 10 gig RAM on my computer.

This is not during chunk generation or anything. It's just regular game play, and it's constant.
Have you tried adding Fastcraft?
 
  • Like
Reactions: Cosmology27

Cptqrk

Popular Member
Aug 24, 2013
1,420
646
138
Have you tried adding Fastcraft?

Yes, Fastcraft does more than just chunk loading fixes. If you are trying to play 1.7 modded MC, Fastcraft is basically essential.

To the OP. Your thought on java not doing more than 4gigs ram is still true, if you are using 32bit java. I think that's what you were thinking of.
How much ram are you allocating to the game?
Are you playing SSP? Or are you hosting a server and trying to play?
Sadly, you may need to look at removing some mods (if the pack is as massive as you let on).
 
  • Like
Reactions: Cosmology27

Cosmology27

New Member
Jul 29, 2019
297
0
1
Fastcraft is increasing performance a decent bit. Went from roughly 1500mb to about 11-1200 mb, and from about 9fps to about 15fps.
That's a good improvement! Thanks for the advice, I hadn't heard of Fastcraft before. Too bad it's not Open, even for private third party packs...

I "believe" I'm using 64 bit java. As I said, I don't know too much. I believe I have both installed on the machine, but how do I tell MC to use 64 bit? Will that improve anything? (Sorry if the question is even too stupid to answer, lol)
I'm testing out the modpack in SSP right now, but my plan is to run it on a small server.
 

Wagon153

New Member
Jul 29, 2019
3,148
-3
1
Fastcraft is increasing performance a decent bit. Went from roughly 1500mb to about 11-1200 mb, and from about 9fps to about 15fps.
That's a good improvement! Thanks for the advice, I hadn't heard of Fastcraft before. Too bad it's not Open, even for private third party packs...

I "believe" I'm using 64 bit java. As I said, I don't know too much. I believe I have both installed on the machine, but how do I tell MC to use 64 bit? Will that improve anything? (Sorry if the question is even too stupid to answer, lol)
I'm testing out the modpack in SSP right now, but my plan is to run it on a small server.
You can safely uninstall 32 bit Java, unless you develop with it.
 

tarzan1376

Active Member
Jul 7, 2013
110
18
44
You can safely uninstall 32 bit Java, unless you develop with it.
32bit java is needed if you have a 32bit operating system, but I say put more ram into your ram, cause what ram does is speed up how fast something is processed, your processor is the main part but ram is second to process something. I always have to use 3Gigs for the beta testing of FTB Ressurection and I run smoothly than I would with 512mB
 

Cptqrk

Popular Member
Aug 24, 2013
1,420
646
138
32bit java is needed if you have a 32bit operating system, but I say put more ram into your ram, cause what ram does is speed up how fast something is processed, your processor is the main part but ram is second to process something. I always have to use 3Gigs for the beta testing of FTB Ressurection and I run smoothly than I would with 512mB

Just remember the opposite is true as well.. Too much ram = lag as the garbage collection gets intensive. Stick around 3-4 gigs and you should be fine.
 

GreenZombie

New Member
Jul 29, 2019
2,402
-1
0
1. If its choppy its likely because your video card is not up to the task. Have you tried turning graphics to Fast rather than Fancy and lowering the view distance?
2. PermGen (set by -XX:MaxPermSize=256m) by default is 64m, and most small packs don't need more than 128m. If its too small then minecraft will simply crash on load. Once its big enough there is no benefit to making it larger, in fact larger sizes will likely reduce the amount of useable memory Java has to take advantage of and thus slow things down.
3. Xmx4G, as a rule of thumb, should be about 2X the "used" memory reported by minecraft. It needs (obviously) to be larger than the amount of memory used as being smaller will cause minecraft to run out of memory and fail. The larger it is, the less frequently Java will have to garbage collect - but the more work it will have to do during a garbage collection. Hence the 2X max-used memory rule of thumb. Again, for most reasonable sized modpacks this is close to about 4G.

As 32bit processes don't have access to more than about 1G of memory to dedicate to the Java heap, the mere fact that minecraft loads with these parameters means you are on 64bit.
 
  • Like
Reactions: Cosmology27

Cptqrk

Popular Member
Aug 24, 2013
1,420
646
138
Not wanting to overtake the topic, but does this work with ftb single player? As i understand it generates a "server" to play on...

Sent in the bar having a beer with tapasomething...

I can't see why not. Wouldn't hurt to give it a shot!
 

Cosmology27

New Member
Jul 29, 2019
297
0
1
Not wanting to overtake the topic, but does this work with ftb single player? As i understand it generates a "server" to play on...

From what I understand about MC, even single player is technically running a server. The arguments definitely do work for single player. My game crashes on start up if I don't have these arguments.
 

Vogon

New Member
Jul 29, 2019
51
0
1
From what I understand about MC, even single player is technically running a server. The arguments definitely do work for single player. My game crashes on start up if I don't have these arguments.
You are talking about the OP java arguments? Yes these work and I was not referring to them, I was talking about the pre-generation of terrain with the admin thing mod.
 

tedyhere

New Member
Jul 29, 2019
1,286
0
0
You are talking about the OP java arguments? Yes these work and I was not referring to them, I was talking about the pre-generation of terrain with the admin thing mod.
Works perfectly fine in SSP since SSP is still on a server, just a local server.