Forum: gaming.stackexchange.com
Tags: <minecraft-java-edition>
Title: Any benefits to running minecraft in a 64bit environment?
Question: I'm wondering if I was to run minecraft in a 32bit or 64bit ubuntu server; would there be a benefit (speed improvements) or something else, or just the same?  Downsides?

Answers:
sents: text: Minecraft is written in Java, so it should "adapt" itself to both 32-bit and 64-bit systems (depending if you have a 32-bit or 64-bit Java runtime).
text: While Minecraft itself is not optimized for 64-bit, it will take advantage of JVM optimizations for 64-bit processors .
text: Basically, this means more general-purpose registers available ( 16 in 64-bit against 8 in 32-bit , which means better machine code and less RAM access, improving performance) and larger addressable memory.
text: On the other hand, since now pointers take up twice as much space, there is a little extra overhead for using 64-bit.
text: But you should also think about the operating system, as it will also take advantage of 64-bit improvements.
text: If you have more than 2GB or 3GB of RAM, your operating system should be 64-bit, else it won't access all RAM (or will have a considerable overhead doing so).
text: And if you have a 64-bit operating system, you should also go with a 64-bit Java Runtime for better performance (as other users already commented).
text: By the way, in my opinion, you should always go to 64-bit unless you have a very good reason to avoid it, like compatibility reasons (which is not this case).
text: Related question on StackOverflow: Does Java 64bit perform better than the 32bit version?
text: Wait a minute!
text: I talked code written in Java, but how about native libraries?
text: Like OpenGL support and OpenAL?
text: They are available on both 32-bit and 64-bit versions, and the correct version will be loaded.
text: And I can confirm that on my Linux 64-bit system, it loads the 64-bit version of those native Java libraries.
text: (as an experiment, I've deleted the 32-bit versions and Minecraft still runs fine)
answer_details: author: gaming.stackexchange.com/users/1552/Denilson Sá Maia
score: 19
sents: text: Minecraft is not designed as a 64-bit application, and thus, while usable on a 64-bit OS, won't see any sorts of improvements from a technical standpoint.
text: However, if you also install the 64-bit java runtime environment, you may notice some slight performance optimization, but a 64-bit OS on its own will not have much of an effect.
answer_details: author: gaming.stackexchange.com/users/336/Raven Dreamer
score: 4
sents: text: I'm running my server on a 64 CentOs server and it doesn't seem to have improved anything.
text: Minecraft only records the movements X,Y,Z of the players with items and block placed in the world.
text: So running it on a 32 or 64 bit OS won't change anything.
text: For better performance of the game you need lots of RAM and fast HDD maybe a 10k RPM or 15 RPM on the server.
text: That way you ensure faster loading and higher efficiency.
text: I have 8GB RAM on a Quad core system with 2 HDD 10k RPM, and I haven't noticed any lag with 20
text: + players online.
answer_details: author: gaming.stackexchange.com/users/11188/Warface
score: 2
sents: text: CPU-bound Java apps will almost always run slower on 64-bit JVM, and Minecraft is no exception.
text: To quote Oracle , the benefits of being able to address larger amounts of memory come with a small performance loss in 64-bit VMs versus running the same application on a 32-bit VM.
text: This is due to the fact that every native pointer in the system takes up 8 bytes instead of 4.
text: The fact that 64-bit JVM features more registers alleviates that performance loss, but does not out-weight it.
text: According to Oracle, Java applications on x86 lose 0 to 15% of their original performance when migrated to 64 bit.
text: Another point to consider is that 64 bit JVM is more memory-hungry: because of those 64-bit pointers, so you'll have to give it 30% more RAM just to match the storage space you had on 32 bits.
text: Another quote from Oracle FAQ:
text: We have adjusted the defaults for 64-bit implementations to be 30% larger in order to make up for the increased size of Java objects due to larger native pointers.
text: Remember that Java objects contain class and lock pointers so even if you create Java objects which contain only integers, each object takes up additional memory.
text: Of course, things turn over when you're giving Minecraft lots of RAM, since it will be able to run GC less frequently and keep more chunks in the memory.
text: To sum up , upgrading is only worth it when you're planning to give it 4 GB or more.
answer_details: author: gaming.stackexchange.com/users/187915/Dmitry Grigoryev
score: 1
sents: text: Using a 32-bit Java Runtime Environment, you may run into errors giving it 2 GB of memory or more: "%programfiles(x86)%\Java\jre1.8.0_201\bin\java.exe" -Xms2
text: G -Xmx2
text: G -jar
text: server.jar Error occurred during initialization of VM Could not reserve enough space for 2097152KB object heap And for 4 GB and up: java -d32 -Xms4
text: G
text: -Xmx4
text: G -jar
text: server.jar Invalid initial heap size:
text: -Xms4G
text: The specified size exceeds the maximum representable size.
text: Error: Could not create the Java Virtual Machine.
text: Error: A fatal exception has occurred.
text: Program will exit.
text: It works with a 64-bit Java: %programfiles%\Java\jre1.8.0_201\bin\java.exe -Xms4
text: G
text: -Xmx4
text: G -jar
text: server.jar [main/INFO]:
text: Loaded 0 recipes [main/INFO]:
text: Loaded 0 advancements [Server thread/INFO]:
text: Starting minecraft server version 1.13.2 ...
text: Minecraft also seems to come with its own 64-bit JRE which you may use: "%programfiles(x86)%\Minecraft\runtime\jre-x64\bin\java.exe" -Xms4
text: G
text: -Xmx4
text: G -jar
text: server.jar Note that the flags -d32 and -d64 don't let you choose an installed 32- or 64-bit JRE (at least on Windows), but rather define the bitness you require.
text: If java is a 64-bit Java, then -d32 will make it fail because the 64-bit executable does not support 32-bit.
answer_details: author: gaming.stackexchange.com/users/125920/CodeManX
score: 1
sents: text: For me, I have got a weird solutions I have a 64-bit Processor and OS, but the game was unplayable, I then decided to try out the x86 version (32-bit).
text: I know this normally doesn't improve anything, but when I did I have a decent framerate of 60fps WHEN RECORDING!
text: The performance dramatically improved with 32-bit for me.
text: However, if your machine is 64-bit, I would recommend using the 64-bit version first, then use the 32-bit.
text: After that you can decide which to use.
text: My system infoATI Radeon X1200 GraphicsAMD Turion
text: 64X2Dolby Sound RoomAtheros WirelessWindows 7 Professional x64
text: SP1/
text: Ubuntu 13.10 x64
answer_details: author: gaming.stackexchange.com/users/58964/WxD311
score: 0

Summary of the answers:
Minecraft is not designed for 64-bit so you won't see any improvements from a technical standpoint. 
There are benefits in running Minecraft in 64bit  OS. However it is argued that there will be no difference