First off, I would like to say that Minecraft was not created for Linux or Mac. It was developed on Windows for Windows. It just so happens that an App and Jar were developed for we Unix users. Because of this afterthought-appropriation, there are a few performance issues inherent with these ports. I have done a lot of research to improve my person gameplay experience, and I believe you could all benefit from it as I have.
Things Needed
You will need a few things to ensure Minecraft runs smoothly.
1) Sun Java - Latest JRE
This is important, as a lot of Linux distros are shipping with OpenJDK's JRE. This is fine in most situtations, but it actually seems to make Minecraft slower. Sun's JRE is a bit better as far as speed goes.
2) The latest drivers for your graphics card
It should be noted that Linux uses graphics drivers just like Windows. The main difference is how they're installed. Linux is pretty great at automatically detecting and using almost any device you plug into it. However, some mainstream brands have dropped linux support, an example being ATI. They have unfortunately stopped supporting several cards with Linux drivers. You can still download their latest Catalyst Control Center and generic driver, but there are LOTS of compatability issues with the cards they've stopped officially supporting. Here are some resources to help you out:
Probably worth saying that the first place to look for proprietary drivers is via the Distro, ie for ATI/Nvidia under Ubuntu/Mint go to: System->Administration->Additional Drivers
Or for non-legacy ATI/AMD you can try their drivers first rather than bleeding-edge open source: http://support.amd.com/us/gpudownload/l ... linux.aspx
3) Optimine
This was the best and most notable speed improvement out of everything I'd done so far. I went from <1fps in multiplayer towns to about 12fps (which is a huge boost and enough to let me play) plus a major speedboost outside of towns (about 20-30fps).
4) A simple texture pack
I know some people don't like the simplistic, minimal texture packs, but they reduce the amount of work being done by the graphics card. I'm currently using SimpleCraft, but any minimal pack will do. Look for textures that use 1-3 colors per block, at most. Solid colors are best.
5) Use a shell script to add switches
Java lets you use switches to modify the environment variables. This is the shell script I use to launch Minecraft:
The first switch, "-Dsun.java3d.opengl=true", allows Minecraft to use OpenGL for rendering. I think it's enabled by default, but just to be safe.. The next two bump up the amount of memory that Minecraft is going to use. This code (sans the OpenGL switch) can be found on the download page of Minecraft.net :tongue.gif: All you have to do is save that as minecraft.sh (or whatever you want, but always .sh). Then right-click, Properties, Permissions, Mark as executable (Ubuntu) or via terminal:
sudo chmod 755 minecraft.sh
Which is probably more portable between distros.
More switches Thanks ericdjobs!
Quote from ericdjobs »
Anyways, there's a couple other things you can do to optimize the running of the minecraft JAR, by optimizing the java VM, You can also do this with minecraft server for a notable performance increase...
Here are the current optimized launch options I use
java -Xmx1024M -Xms1024M -XX:+UseFastAccessorMethods -XX:+AggressiveOpts -XX:+DisableExplicitGC -XX:+UseAdaptiveGCBoundary -XX:MaxGCPauseMillis=500 -XX:SurvivorRatio=16 -XX:+UseParallelGC -XX:UseSSE=3 -XX:ParallelGCThreads=(Number of processor cores you have, for me it's 2) -jar /media/storage/minecraft.jar
This uses the aggressive optimizations, parallel garbage collector, and some other tuning options. This will significantly increase performance in linux AND windows. You can adjust the memory to whatever your system is capable of (I'd wager about 33% of ram unless your sole purpose is to be playing minecraft)
Note: Be sure to edit the bolded portions of the code-block immediately above this note to fit your system. The first bolded item is, as explained, the number of cores you have. The second is the path to your minecraft.jar launcher, not the one in your ~/.minecraft/bin folder.
6) Modify the priority
Minecraft runs MUCH better at a higher priority. The easiest way to do this is to use your native "System Monitor" which lists your computer's processes. Find "java" and give it maximum priority (possibly via the right-click menu, I'm only used to Ubuntu..)
You can also do this via the terminal:
sudo pidof java
sudo renice -A -p B
Important: Replace B with the number returned by the first command. Replace A with a number from -11 to -20, -20 being the highest priority. (You can actually use -1 to -20, but anything from 0-20 will take the priority down..) I recommend -20, as it gives the most processing power to Minecraft.
7) Set your CPU to run for performance
You can find utilities for Linux to modify your CPU's running speed. On Ubuntu, there is a pre-installed applet for your panels called "CPU Frequency Scaling Monitor" that allows you to choose your processor's general or specific speed (to a point).
There may be other tools for different distros, but I have no experience with such things.
8) Update libraries - Thanks to misuisum!
Quote from misuisum »
Here is another optimization hint:
I experienced sound issues and fps drops in linux (ubuntu 10.10 x64). However, I was able to fix those problems by replacing the outdated shipped libraries with current ubuntu libraries. The libraries required can be found in ~/.minecraft/bin/natives. I just installed the corresponding packages and set symlinks to /usr/lib/"libname" (Don't forget a backup!).
Afterword
I hope this has helped you in some way. I've been able to enjoy Minecraft much more since making these changes, and I wanted to share these wonderful discoveries with you all. Happy Mining!
Rollback Post to RevisionRollBack
Quote from GodofCheeses »
[Ham] the joke
[Notch] your head
[] [Ham] [Ham] [Ham] []
[Ham] [] [Notch] [] [Ham]
riiiiiiight over it
Quote from SittenSpynne »
Notch could replace Minecraft.net with goatse tomorrow and never publish an update again; the only legal recourse I have is to shake my fist at the screen.
Using official Nvidia drivers.
And, yeah, Minecraft will run slower on Linux than on Windows when using an ATI graphics card. Well, Minecraft and any other game. But not becouse of the game. Because of the drivers. ATI drivers for Linux suck :tongue.gif:
Interesting... Minecraft runs so much smoother for me on Ubuntu 10.10 x64 than Windows 7 x64.
I am using the most up to date drivers for both.
@Neoo: It should help. The drivers should be better on Mac, considering it's more mainstream.
The reason I have problems playing on Linux is because I have an ATI Radeon X1200, which is not supported by the official ATI drivers, plus it's rated for "Light Home or Office Use".. Not exactly a gaming beast =p
Rollback Post to RevisionRollBack
Quote from GodofCheeses »
[Ham] the joke
[Notch] your head
[] [Ham] [Ham] [Ham] []
[Ham] [] [Notch] [] [Ham]
riiiiiiight over it
Quote from SittenSpynne »
Notch could replace Minecraft.net with goatse tomorrow and never publish an update again; the only legal recourse I have is to shake my fist at the screen.
Notch could replace Minecraft.net with goatse tomorrow and never publish an update again; the only legal recourse I have is to shake my fist at the screen.
I'll have to look into that O.o In the meantime, I'll add it to the OP. Thanks for the tip! :smile.gif:
Rollback Post to RevisionRollBack
Quote from GodofCheeses »
[Ham] the joke
[Notch] your head
[] [Ham] [Ham] [Ham] []
[Ham] [] [Notch] [] [Ham]
riiiiiiight over it
Quote from SittenSpynne »
Notch could replace Minecraft.net with goatse tomorrow and never publish an update again; the only legal recourse I have is to shake my fist at the screen.
Minecraft runs better in Fedora 14 than Windows for me...
Anyways, there's a couple other things you can do to optimize the running of the minecraft JAR, by optimizing the java VM, You can also do this with minecraft server for a notable performance increase...
Here are the current optimized launch options I use
java -Xmx1024M -Xms1024M -XX:+UseFastAccessorMethods -XX:+AggressiveOpts -XX:+DisableExplicitGC -XX:+UseAdaptiveGCBoundary -XX:MaxGCPauseMillis=500 -XX:SurvivorRatio=16 -XX:+UseParallelGC -XX:UseSSE=3 -XX:ParallelGCThreads=(Number of processor cores you have, for me it's 2) -jar /media/storage/minecraft.jar
This uses the aggressive optimizations, parallel garbage collector, and some other tuning options. This will significantly increase performance in linux AND windows. You can adjust the memory to whatever your system is capable of (I'd wager about 33% of ram unless your sole purpose is to be playing minecraft)
Thanks epikal and ericdjobs! I'll add your information to the first post as well :smile.gif:
Rollback Post to RevisionRollBack
Quote from GodofCheeses »
[Ham] the joke
[Notch] your head
[] [Ham] [Ham] [Ham] []
[Ham] [] [Notch] [] [Ham]
riiiiiiight over it
Quote from SittenSpynne »
Notch could replace Minecraft.net with goatse tomorrow and never publish an update again; the only legal recourse I have is to shake my fist at the screen.
A niceness of −20 is the highest priority and 19 or 20 is the lowest priority. The default niceness for processes is inherited from its parent process, usually 0.
Scheduling order, not scheduling priority. An order of 19 means that it will get to use the CPU AFTER EVERYTHING ELSE.
an order of 0 means it comes before 1-19, but after -20 - -1.
only negative orders require sudo.
If you double-check my post, you'll see that it's:
sudo renice -A -p -B
Notice the minus sign :smile.gif:
EDIT: I guess the explanation around it was a bit hazy. Fixed :tongue.gif:
Rollback Post to RevisionRollBack
Quote from GodofCheeses »
[Ham] the joke
[Notch] your head
[] [Ham] [Ham] [Ham] []
[Ham] [] [Notch] [] [Ham]
riiiiiiight over it
Quote from SittenSpynne »
Notch could replace Minecraft.net with goatse tomorrow and never publish an update again; the only legal recourse I have is to shake my fist at the screen.
I tried all of these tips and still cannot make minecraft run over 15 fps in linux. I am dual booting Linux Mint 10 and Windows 7. In Windows, I get decent fps on lower settings (around 40 on short/fast) but whenever mobs come near or trees start despawning leaves it starts to lag. I thought I would try running Minecraft in linux to see if I could increase my performance, but didn't have much luck. Is there anything else I can do to try to increase my performance in linux?
Edit: Also my system can run 64 bit, but I chose to install the 32 bit version of Linux Mint. Would installing the 64 bit version help my performance at all?
I don't believe running x64 over x86 would cause any problems, though x64 java isn't officially supported.. (I don't believe), so you're better off running x86 actually.
As far as your CPU, it's running at full capacity. The clock speed isn't the same as your CPU speed, and the size.. not sure what that represents. I do recommend finding an over-clocking utility, or at least a CPU scaling utility to let you control the speed at which your processor is running.
I do have problems with fps (I usually only get about 15 on a good day), but it's better than none.
Rollback Post to RevisionRollBack
Quote from GodofCheeses »
[Ham] the joke
[Notch] your head
[] [Ham] [Ham] [Ham] []
[Ham] [] [Notch] [] [Ham]
riiiiiiight over it
Quote from SittenSpynne »
Notch could replace Minecraft.net with goatse tomorrow and never publish an update again; the only legal recourse I have is to shake my fist at the screen.
I installed something on my panel to control the CPU speed. I can't seem to get anything about 20 consistently in linux. I was just trying some of these things to see if I could get any better performance than in Windows, but maybe I will just stick to Windows for Minecraft.
I'm sorry to hear that. There are probably ways to work around it, but it might just be easier to use Windows in your case.
The only problem with Linux is that workarounds aren't very friendly for less experienced users. Not saying anyone here is a noob, I am still not terribly experienced in Linux. However, half the beauty of Linux is the ability to modify everything.
Rollback Post to RevisionRollBack
Quote from GodofCheeses »
[Ham] the joke
[Notch] your head
[] [Ham] [Ham] [Ham] []
[Ham] [] [Notch] [] [Ham]
riiiiiiight over it
Quote from SittenSpynne »
Notch could replace Minecraft.net with goatse tomorrow and never publish an update again; the only legal recourse I have is to shake my fist at the screen.
You might want to consider linking to a backup script like mine, even though it isn't performance related, it's really important for people on single player.
If you don't, it's fine. :wink.gif:
Introduction
First off, I would like to say that Minecraft was not created for Linux or Mac. It was developed on Windows for Windows. It just so happens that an App and Jar were developed for we Unix users. Because of this afterthought-appropriation, there are a few performance issues inherent with these ports. I have done a lot of research to improve my person gameplay experience, and I believe you could all benefit from it as I have.
Things Needed
You will need a few things to ensure Minecraft runs smoothly.
1) Sun Java - Latest JRE
This is important, as a lot of Linux distros are shipping with OpenJDK's JRE. This is fine in most situtations, but it actually seems to make Minecraft slower. Sun's JRE is a bit better as far as speed goes.
How to Install Sun Java on Linux
2) The latest drivers for your graphics card
It should be noted that Linux uses graphics drivers just like Windows. The main difference is how they're installed. Linux is pretty great at automatically detecting and using almost any device you plug into it. However, some mainstream brands have dropped linux support, an example being ATI. They have unfortunately stopped supporting several cards with Linux drivers. You can still download their latest Catalyst Control Center and generic driver, but there are LOTS of compatability issues with the cards they've stopped officially supporting. Here are some resources to help you out:
Nvidia Drivers
Open-source ATI/Nvidia Drivers (This is pretty much the best for ATI. R200 cards can use the ATI official driver)
Thanks epikal!
3) Optimine
This was the best and most notable speed improvement out of everything I'd done so far. I went from <1fps in multiplayer towns to about 12fps (which is a huge boost and enough to let me play) plus a major speedboost outside of towns (about 20-30fps).
Get Optimine
4) A simple texture pack
I know some people don't like the simplistic, minimal texture packs, but they reduce the amount of work being done by the graphics card. I'm currently using SimpleCraft, but any minimal pack will do. Look for textures that use 1-3 colors per block, at most. Solid colors are best.
SimpleCraft
5) Use a shell script to add switches
Java lets you use switches to modify the environment variables. This is the shell script I use to launch Minecraft:
The first switch, "-Dsun.java3d.opengl=true", allows Minecraft to use OpenGL for rendering. I think it's enabled by default, but just to be safe.. The next two bump up the amount of memory that Minecraft is going to use. This code (sans the OpenGL switch) can be found on the download page of Minecraft.net :tongue.gif: All you have to do is save that as minecraft.sh (or whatever you want, but always .sh). Then right-click, Properties, Permissions, Mark as executable (Ubuntu) or via terminal:
Which is probably more portable between distros.
More switches Thanks ericdjobs!
Note: Be sure to edit the bolded portions of the code-block immediately above this note to fit your system. The first bolded item is, as explained, the number of cores you have. The second is the path to your minecraft.jar launcher, not the one in your ~/.minecraft/bin folder.
6) Modify the priority
Minecraft runs MUCH better at a higher priority. The easiest way to do this is to use your native "System Monitor" which lists your computer's processes. Find "java" and give it maximum priority (possibly via the right-click menu, I'm only used to Ubuntu..)
You can also do this via the terminal:
Important: Replace B with the number returned by the first command. Replace A with a number from -11 to -20, -20 being the highest priority. (You can actually use -1 to -20, but anything from 0-20 will take the priority down..) I recommend -20, as it gives the most processing power to Minecraft.
7) Set your CPU to run for performance
You can find utilities for Linux to modify your CPU's running speed. On Ubuntu, there is a pre-installed applet for your panels called "CPU Frequency Scaling Monitor" that allows you to choose your processor's general or specific speed (to a point).
There may be other tools for different distros, but I have no experience with such things.
8) Update libraries - Thanks to misuisum!
Afterword
I hope this has helped you in some way. I've been able to enjoy Minecraft much more since making these changes, and I wanted to share these wonderful discoveries with you all. Happy Mining!
--Carl Sagan
I am Scjoiner on YouTube. Check out my insane redstone stuff. Scjoiner's Channel
--Carl Sagan
I am Scjoiner on YouTube. Check out my insane redstone stuff. Scjoiner's Channel
Interesting... Minecraft runs so much smoother for me on Ubuntu 10.10 x64 than Windows 7 x64.
I am using the most up to date drivers for both.
@Neoo: It should help. The drivers should be better on Mac, considering it's more mainstream.
The reason I have problems playing on Linux is because I have an ATI Radeon X1200, which is not supported by the official ATI drivers, plus it's rated for "Light Home or Office Use".. Not exactly a gaming beast =p
Anyways, there's a couple other things you can do to optimize the running of the minecraft JAR, by optimizing the java VM, You can also do this with minecraft server for a notable performance increase...
Here are the current optimized launch options I use
This uses the aggressive optimizations, parallel garbage collector, and some other tuning options. This will significantly increase performance in linux AND windows. You can adjust the memory to whatever your system is capable of (I'd wager about 33% of ram unless your sole purpose is to be playing minecraft)
Always seems to runs faster then when I was using Windows 7.
I never thought of changing the libraries or trying to change priority, might give those a shot. Thanks.
Source Source2 Source3
Scheduling order, not scheduling priority. An order of 19 means that it will get to use the CPU AFTER EVERYTHING ELSE.
an order of 0 means it comes before 1-19, but after -20 - -1.
only negative orders require sudo.
[FAQ] Extremely Common Problems
[OFFICIAL] Dragon Cave Thread
Notice the minus sign :smile.gif:
EDIT: I guess the explanation around it was a bit hazy. Fixed :tongue.gif:
Edit: Also my system can run 64 bit, but I chose to install the 32 bit version of Linux Mint. Would installing the 64 bit version help my performance at all?
description: CPU
product: AMD Turion Dual-Core RM-70
vendor: Advanced Micro Devices [AMD]
physical id: 3
bus info: cpu@0
version: 15.3.1
slot: Socket A
size: 500MHz
capacity: 2GHz
width: 64 bits
clock: 133MHz
Is my CPU not running at its full capacity?
As far as your CPU, it's running at full capacity. The clock speed isn't the same as your CPU speed, and the size.. not sure what that represents. I do recommend finding an over-clocking utility, or at least a CPU scaling utility to let you control the speed at which your processor is running.
I do have problems with fps (I usually only get about 15 on a good day), but it's better than none.
The only problem with Linux is that workarounds aren't very friendly for less experienced users. Not saying anyone here is a noob, I am still not terribly experienced in Linux. However, half the beauty of Linux is the ability to modify everything.
You might want to consider linking to a backup script like mine, even though it isn't performance related, it's really important for people on single player.
If you don't, it's fine. :wink.gif:
The windows .exe executes the .jar
On linux you can execute the .jar yourself, without an .exe