McRegion: better performance through optimized save files.
minecraftforum.net/viewtopic.php?f=25&t=1...Posted Jan 4, 2011, 1:42 PM UTC
Posted Jan 4, 2011, 1:42 PM UTC
I will be really dissapoint if notch doesn't include these optimisations into MC and reward scaelvolous for his/her effort.
It always annoys me how this game doesn't have great performance and I hope there are many more optimisations to come!
Good work and UPVOTE!
Not gonna happen. Notch hires friends. Modders are "tolerated".
Who said anything about hiring?
And he "tolerates" the modders because they are tiptoeing around his intellectual property protection by actually modifying his binary files. He plans to have robust mod support, he just doesn't like how people are currently doing it.
Who said anything about hiring?
I did.
because they are tiptoeing around his intellectual property protection
Modders fixed leaf degeneration months prior to Notch's fix. His current fix is still inferior to the mod patch. He was given the code but chose to ignore it. That is his "tolerance" to modders. Look up "Not Invented Here" in Wikipedia for more detail.
I dunno, this strikes me as a good bit of caution on his part. Couldn't someone give him some code for "free", and then sue him for using it, citing some license agreement they never mentioned? A freshly minted rich man is a good target for scammers of all stripes; if I was him, I'd primarily be working with friends as well.
just to clarify, what do you mean by "given the code"? Do you mean someone emailed it to notch, or there was actually a dialogue between notch and the modder? The chances of a payment issue email being read is low enough (something I don't have any sympathy with, now that Notch has staff), let alone some random code dump.
If, of course, there was a dialogue, then you may have a point ;)
I see your point, Notch does seem to suffer from NIH. I suspect that Minecraft is his baby, and he doesn't want code contributed to it that didn't come from him or his creative input.
After all, before Mojang he was a game developer at a larger studio. If I remember correctly, he left because of creative differences, or something like that.
I would be really surprised if he does include these optimizations into MC. Even if the modders (scaelvolous in this case) gives him the code and the rights to it for free.
Two performance fixes brought up in two days. (I know it took longer than two days to develop these)
Hey Markus, if you're still hanging around reddit I hope you're paying attention.
"Premature optimization is the root of all evil."
In context:
We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%. A good programmer will not be lulled into complacency by such reasoning, he will be wise to look carefully at the critical code; but only after that code has been identified.
The code has been identified. He can consider it.
Perhaps he hasn't decided that the save file format etc are done. In that case optimizing them now could be a waste of time and possibly make it harder to add new features.
"Sticking to general mantras is stupid."
I don't think you understand the quote fully. While you're writing code, it's pointless to optimize every little thing since you don't know where your bottlenecks are. You need to finish and then analyze it to identify where they are.
The rendering code is likely pretty static at this point and Scaevolus has not only identified some bottlenecks but also fixed them…
Minecraft is in beta... optimization isn't premature at this point.
That's arguable, since he's still implementing new features and bugfixes. I'd say in general that those should have higher priority than optimization.
And optimisation should take place when? After the game leaves beta?
I love how that apng avatar shows in chrome. Not sure what it has to do with spinning balls.
That was fun to make. I managed to fit something like 60 frames of animation into 30KB. :D
Well, that's how it showed up in Opera as well. Strange.
Edit: And Firefox. Interesting, must just be the thumbnail snapshot they took.
iEdit 2.0: It occurs to me that I'm a silly and you're talking about his forum avatar, not the reddit thumbnail. Nevermind me.
Firefox is the only browser to support APNG, mainly because it was created by one of the Firefox devs. What's interesting though is that Reddit is itself hosting a copy of that thumbnail, also as PNG, but for some reason it's not an APNG anymore. Probably broke it while resizing it.
I don't know about the entire spec, but this particular APNG renders fine in opera.
This is fantastic, but you really have the worst possible timing.
I must have spent at least 4 hours yesterday working on a video of my minecart railway. I couldn't get it to load smoothly, it kept hitting patches where it would pause for 10 seconds as it loaded.. So, I kept trying to move my save files to faster and faster storage. I started off with 3 500gb drives in RAID5, didn't help. I tried 2 WD Raptor's in RAID0, not much better. I tried different cluster sizes, but no luck. I even tried creating a ram drive, but got nowhere. I eventually gave up, set the render distance to tiny, and recorded 4gb worth of movie. It's currently transcoding. Now when I get home I get to do it all over again!
I was literally thinking about this very thing, just yesterday. Get out of my head!
I ran into the same problem that minecraft has storing paged data a while ago with a project I was working on, and ended up making a fairly complete "key value store" for large blocks of data based on an on disk B+ tree. I was dissatisfied with other key value stores for storing large values for things like game paging, so I ended up making my own library.
I have a fairly complete solution for the storage part in java, but I wish that I had actually taken the next step of making an actual minecraft mod, because it never got any traction.
Here's the original discussion I had here.
Here's another person tackling the same problem here.
I also have a bitbucket project for the database library here. (README) It contains no actual minecraft related code, it is just a key value store for large values (and constant length keys).
I guess I'm mentioning this in case anything I've done would be of use to you, or if you're at all interested in cooperating. If not, I'd still like to finish the actual mod part, since the storage part is as complete as it is.
Edit: I did a bit more research, and I think I have a (vague) understanding of how our approaches differ. By the way I like the approach you took (much better than MCFS).
How do you handle drastic changes in chunk size? What happens when a chunk update causes the chunk to outgrow its initial number of sectors? Chunks can't be fragmented, so I'm fuzzy on how this works.
I like your approach, but I would still prefer a single file solution. I think if we combined forces we could easily come up with a fast true single file solution.
Edit2: Also, since I was a meanie and didn't mention it before: Thank you, Keep up the good work!
Edit3: I also bothered you about this on the minecraft forums
I replied to you in the thread, but I'll address some of these questions here as well.
Essentially, I don't feel single-file saves have enough of an advantage to merit the complexity of writing a complete filesystem.
Chunk sector allocation is quite simple. When it first loads a region file (they're cached afterwards), it reads the locations and sector counts of each chunk stored in the file and creates a bitmap representing sector usage.
When a chunk is saved, it calculates how many sectors it requires. If the chunk is already stored in the region file and the old version used the same number of sectors, it simply overwrites it. Otherwise, it scans the free sector bitmap to find a large enough space to store it and writes it there. If there's not enough free space available, it increases the region file size to the number of sectors needed and writes it there.
It's a very simple system, and you could construct pathological sequences of reads and writes that would cause considerable numbers of sectors to go unused, but in practice the wasted space is at most a few sectors.
Thank you for your reply!
Essentially, I don't feel single-file saves have enough of an advantage to merit the complexity of writing a complete filesystem.
I promise you that what I wrote isn't a reimplementation of a filesystem, it's not that complicated :). All it is is a pure java implementation of a B+ tree. In fact, it is actually quite similar to the method you chose, except that of course instead of static headers with static sizes and a tree that is one layer "deep", it is an n-layer tree of "header blocks". That's basically it.
Records, instead of having to be contiguous, are written as linked lists of blocks (which are most of the time contiguous anyway) so overwriting values does not have to waste space.
That being said, if you prioritize speed, your solution is probably at least as fast as mine, and much simpler. Also drastically cutting the number of files down and having, for most worlds, relatively small numbers of files is still a huge, huge improvement.
It's a very simple system, and you could construct pathological sequences of reads and writes that would cause considerable numbers of sectors to go unused, but in practice the wasted space is at most a few sectors.
I agree, but storing them in linked lists of blocks might work also.
Anyway, thanks for listening to me, your design is very sound, and I didn't want to sound like I was competing or complaining or anything. Your design is simple and works well.
I have an idle hope that maybe Notch will consider adding this to vanilla Minecraft someday. While B+ trees with linked blocks have nice properties, I feel the complexity makes it less likely to be integrated.
Also, lots of people write tools to read and write Minecraft chunks. A more complex format means fewer people will write tools for it, and I wanted to minimize this.
The simplicity also makes reasoning about behavior if Minecraft crashes easier. In the worst case, at most one chunk is lost. Those statements are harder to make with more complex datastructures.
You make trade-offs depending on your situation. I'm happy with the ones I chose. :-)
I have an idle hope that maybe Notch will consider adding this to vanilla Minecraft someday
He didn't seem to be too receptive to my gentle emailing (no response at all), but he probably gets so flooded with information that I really don't blame him. To tell you the truth all I wanted to do was approach Notch with my method, and to have him use it as a MIT licensed library (he already does this with several other java libs), because I actually sort of feel uncomfortable with the reverse engineering modding approach. This is actually mostly why I haven't written a mod yet, but I guess that's the best way to get noticed, though :)
Also, lots of people write tools to read and write Minecraft chunks. A more complex format means fewer people will write tools for it, and I wanted to minimize this.
My ideal scenario was that Notch would adopt some kind of open source library for doing minecraft file io, and then that would be available to everyone. That might have been a bit unrealistic.
The simplicity also makes reasoning about behavior if Minecraft crashes easier. In the worst case, at most one chunk is lost. Those statements are harder to make with more complex datastructures.
Oh God Yes. Writing a B+ tree store is not actually hard. Making anything that complex resistant to crashing is very hard. Everything like that is hard, though... for you, what happens when a disk write fails while writing the chunk count in a sector? As in, in the middle of the 4 byte write, or out of order and before the actual new chunk is written? Writing that library, and reading documents like this have made me ungodly paranoid.
You make trade-offs depending on your situation. I'm happy with the ones I chose. :-)
I can understand why you chose the way you did. Most of the time, after everything is done, I wish I had chosen the simpler solution.
Scaevolus, I don't know your take on licensing, but I would encourage you to offer these to Notch free of charge, or in some sort of trade. He probably can't even look at them without an agreement of some sort, in case you turn out to be sue happy when similar code shows up in Minecraft.
Has there ever been another closed source video game where people are openly decompiling it, making changes, and redistributing them with the consent of the developer? It's a pretty unusual situation, hopefully Notch capitalizes on it and folds changes like these in.
It's not actually with the consent of the developer, it's just that the platform he chose to code in (Java) makes it very easy to reverse engineer. Notch has said he doesn't really approve of the mods and wishes people would wait until he came out with an official API.
Ah, I didn't know he had said that.
I guess I just assumed that since the forums he links to treats notch as a bit of a.. cherished.. celebrity.. if he had said he was against decompiled code based mods that they would have banned the distribution of them there. It's a bit of cognitive dissonance.
It's interesting if you trace the person who asked him about the mods at that time, it then got back to the forum and that one person discontinued their mod at what they felt was notch's request.
It is kinda funny. I think the thing is that mods are so cool and useful that they're willing to override him on this one issue. It would be like if he said, "Look, I know I put stone in and gave you the ability to make tools out of it, but I really don't like people making stone tools." How may of us would really stop using them? Notch is a great guy, but nobody's right about everything.
Yea, and just as importantly he's not fighting the issue, he just gave his opinion when asked. I would probably feel the same way if I were him, and not just because it's an unauthorized redistribution of copyrighted works.
It's seriously risky because it's natively executing strange code from a lot of anonymous sources, no sane developer would endorse that, and I think it's a risk many people don't understand that they're taking, but right now the barrier to modding is high enough that it probably isn't a particularly enticing intrusion vector.
There's a possibility (see this comment) that he has to take this stance for legal reasons. If you're sitting on a pile of money and everyone knows you're sitting on a pile of money, there's going to be people scheming to sue you for some. I'm not saying scaevolus isn't legit but how can Notch be sure?
IANAL, but that comment got me thinking.
As long as people distribute the mods as patches against official releases and don't redistribute Notch's code, I see no problem with it and frankly neither should Notch.
perhaps, but there isn't a single mod that does this, so it's a moot point.
I don't think he does consent. He obfuscates the code so people don't do this. He just has better things to do than to chase people for it.
Super Mario Brothers? There's a billion and half romhacks for that, the one that include code changes are basically the same as this. (Mario Adventure, for example)
Personally I've done this sort of thing for Microsoft applications (they "forgot" to include a decompressor for one of their compressed formats, so I pulled apart the EXE file and extracted the decompression code into a DLL) but that's not really videogames.
The distinction is that I thought notch was consenting to this, which apparently he isn't, but the primary forums continue regardless, which.. is well, interesting in and of itself. I think it's a mostly good thing, but quite dangerous (people are running strange native code directly on their systems with this mod approach).
He's definitely not approving of it (he's said as much on his twitter) but at the same time I think he's not trying to stop it.
Probably because he realizes how futile an attempt that'd be. If he removed the mod-related threads on the official forum, they'd just be recreated on forums he doesn't control. If he added code to stop mods from loading, that'd be the first thing modded around.
I don't know of any games where the creator is fine with people making binary mods to it, probably because if they were fine with it, they'd open the source or build some kind of plugin API. (Which Notch says he plans to do at some point)
And yes, loading these mods is just as dangerous as running EXEs from random people on the internet. It's only a matter of time before it gets used as a malware/virus vector.
Could someone please explain how to do this on a mac? Zipeg won't let me delete the META-INF folder...
Alright, here's how I got it going:
Open up Terminal (/Applications/Utilities/Terminal)
Run the following code: (creates a temporary folder, then unjars your minecraft jar into it)
cd ~
mkdir mcregion
cd mcregion
jar xf ~/Library/Application\ Support/minecraft/bin/minecraft.jar
Download the client files zip and extract them.
EDIT: 3.5 - create a backup of your minecraft jar to your home directory, as recommended in the forum post.
cp ~/Library/Application\ Support/minecraft/bin/minecraft.jar ~/minecraft-backup.jar
In Finder (or Finder analogue), copy the files into the folder you created (mcregion in your home directory), replacing any files if it asks you to.
Go back to Terminal and run the following commands: (deleted META-INF, repacks the jar and removes the temporary folder - if something fails, put sudo in front of it, enter your password and run again)
rm -rf META-INF
jar uf ~/Library/Application\ Support/minecraft/bin/minecraft.jar ./
cd ..
rm -rf mcregion
Play Minecraft faster!
Let me know how it works out for ya :)
I don't even know if this worked for me or not. It was the 2nd or 3rd time I'd been into Terminal. I wanted to do it withouth using Terminal but I could never find anything related to Minecraft in my Library, or anything related to Minecraft except the application itself. So, I had to use Terminal. Again, don't even know if it worked, I just have a couple of random folders on my desktop. The game still works but it actually seems slower, I love this game so much, but just can't play it when I can't even look around without lagging.
The problem with being able to do it without Terminal is that, as far as I know, there isn't an inbuilt JAR explorer. You can unjar files with Archive Utility but I don't think there's a way to re-jarify it. You can do everything up until that point by going into Finder, navigating to the minecraft bin/ directory, right-clicking minecraft.jar and opening with Archive Utility. From there, just copy the files into the minecraft folder that appears, and run the following two commands in Terminal:
~/Library/Application\ Support/minecraft/bin/
jar uf minecraft.jar minecraft/
That just rejars it and pops it back in place of your minecraft.jar file.
Not actually being too familiar with McRegion, I can't help you when it comes to performance issues, but if there's something wrong you can always just replace the minecraft.jar file with the backup you made in Step 3.5. Don't forget to convert/revert your save files as appropriate :)
Thank you, big help. Now I have to wait all day before I can do this again. I almost want to delete everything and re-download Minecraft without this MCRegion, cause I'm convinced it's not doing anything for me.
Well I screwed it up and now minecraft wont run at all. I tried redownloading it, same problem. :(
How do I fix it? and is there a GUI method of applying these mods? terminal scares me...
:(((
Parallels/VMWare + 7-zip
Not to knock it too much, but VMware has enough problems, not to mention how much power that would take to run, then run the game.
I work with VMware a lot and aside from how practical an awesome it can be it can be a pain in the ass.
If you backed up your minecraft.jar like you were supposed to, just delete the new one you just made and replace it with your backup. Should run fine.
You could unzip minecraft.jar to a new directory, delete minecraft.jar, and rename the directory with the unzipped files minecraft.jar.
Alright, so I got my copy of minecraft up and running again, and followed your directions to the tee, but it just crashes whenever I try to start up single-player.
Two quick questions which might have some relevance:
Was your copy of Minecraft up to date when you installed the mod?
Did you have any other mods installed before installing this one?
Not sure
No
I moved my minecraft.jar to a windows pc and used 7-zip to follow the original instructions. I never seem to have very good luck with unix commands...
But I appreciate the help anyway!
Will this increase memory use?
From your explanation of the region files, it is essentially 32x32 chunks stored in a single file, so in a situation where only 1 chunk from a region is needed, 1023 others would have to be.
EDIT:
Perhaps I should pay more attention
"90% of Minecraft chunks are smaller than 4KB. 99% are smaller than 8KB."
So only in exceptional circumstances would the extra memory be more than about 4MB.
No.
Only the necessary chunks are read into memory. It keeps a small amount of information about the region file in memory to make it faster to read adjacent chunks. The total overhead per loaded region file is <8KB.
What if updates break this? Will my save be screwed?
Nope, there's a save conversion utility right there.
As far as I saw, conversion is one-way (TO McRegion format) and you can't convert any new McRegion chunks back to original format, meaning you would revert back to your pre-conversion world.
From the forum post:
To extract all the chunks from the region files, do something like this:
java -jar RegionTool.jar unpack ~/.minecraft/saves/World1
Thanks for clarifying that, looks like I misunderstood the NOTES part below it.
nice! I hope notch (and the guy from better light) copy both of your mods into vanilla minecraft, they are great.
Notch has said at least once that the effect from Better Light doesn't match his ideas for Minecraft. It will almost certainly never make it into the vanilla game, but supposedly a better mod/plugin system will be available.
I'd like some sauce with that please.
[deleted]
I wonder what his "style" entails. Thanks for the sauce.
I meant the performance mods by scaevolus should be copied into vanilla minecraft, not betterlight. Betterlight would benefit from copying too, since the render list thing and bettelight are kind of incompatible as mods.
Is Notch aware of these fixes? He should totaly add them in the game.
Running Win7 x64 here. This mod actually dropped my average fps by about 5-7, putting me below 30 fps. MC also hung when I hit "save and quit" from the menu. Had to revert back to my old minecraft.jar. Oh well, glad other people are getting improvements from it.
You might notice a slight initial performance hit if you're loading an old world.
I'd use this, but it sounds like it'll screw up c10t. Would be nice if you could add a save-chunks command that syncs up the normal datafiles (probably easier than convincing every other tool author to support the new format...)
If you read the thread, he's created a conversion utility that will do the batch chunk conversion, so you can run that to convert from his "region" files to normal chunk files, do your mapping, and then convert back:
To put all the old chunks into region files, do something like this:
java -jar RegionTool.jar pack ~/.minecraft/saves/World1
To extract all the chunks from the region files, do something like this:
java -jar RegionTool.jar unpack ~/.minecraft/saves/World1
Right, but then I have to ssh into my server instead of just using an ingame command and letting inotify do the rest.
expand on this? do you run with save-off, and do save-on;save-all to trigger a map render? that's pretty cool, though my method is different (I trigger saves every 5 minutes for safety's sake, and do a savegame copy before doing a map render)
Right now... I'm not actually doing that, just using a cron job every few hours (and some very bad code to skip redoing it if nobody's been on the server). It'd be pretty neat to start a manual render without having to alt-tab out though.
Will this or FastRender work in conjunction with Betterlight?
OP (the mod author) answered this elsewhere in the thread, no, they're incompatible with Betterlight and many other mods.
Although (as mentioned by, iirc, sli), it should be possible to manually combine both mods.
This works fine with BetterLight, but FastRender doesn't.
so i can install this mod, after I have installed BetterLight?
Excellent...I'll give it a try.
Cartograph stopped working for me after adding this mod.
:\
The chunks are stored differently, so that's expected. You can use the conversion tool to extract them into the old format so you can use cartograph.
The instructions tell me to delete the META-INF folder. I can't find this anywhere. Where is it?
in the minecraft.jar, though you may have deleted it before when installing other mods.
Better Light deletes this folder, for example.
Why is it that you have to delete that folder when installing mods?
I'm no expert on this, but what those files in the folder does is checking the content of the .jar and if you add extra files to the .jar, the game wont load. But it will load just fine without the META-INF folder, nothing of value lost.
The minecraft jar is signed to allow it to work as an Applet, the signing means that you can trust all the code came from the same place (Mojang).
Java can run JAR files with or without signing, but if signing is present all files have to be signed. Since you're adding files to Minecraft that don't come from Mojang, signing has to be disabled or Java will refuse to load it.
META-INF is simply where Java keeps the key signatures which are used for signing.
Thanks for explaining; although I researched the META-INF folder, I never came across anything that mentioned signing. Maybe my Google-fu is a little out of whack...
Is there no autosaving? I just had a crash revert a bunch of world progress, while my inventory remained the same so I'd lost what I used.
Yeah your inventory, position, time of day all go in the level.dat file which is the only thing that saves updates on a constant basis. Your world on the other hand has to have the chunks updated on the disk, which happens only when you either save and quit, or just hit ESC and hang out at that screen until "Saving Level..." in the bottom-left corner goes away. If anything interrupts you before one of those two things happens, then those parts of the world that you have modified lose their changes.
I'm assuming chunk unloads also trigger a save to disk, correct?
I could be wrong, but as far as I can tell, they hang out in RAM, they are just not actively being calculated and rendered anymore. So you risk losing their changes in a power failure/crash also. Best thing to do is periodically hit ESC and wait for the "Saving" to go away. Then you know your work is preserved, click Back to Game and carry on. Like a boss.
EDIT: Of course, going to/from the Nether also saves everything as though you quit the game.
This sounds correct. On my first world I created a 2km long tunnel underground. I had used F3 and a screenshot app to record my progress and where I was leaving chests of cobblestone.
At the 1800m mark or so the game crashed. I was in a large cavern at the time. When I returned I was in the dark, I promptly turned off monsters and set a torch down confused at what had just happened.
After some math I figured out where the tunnel should have come out and started back digging. After 20 minutes I decided to surface and run back to where I knew I had saved and quit by a chest.
I dug down and that is where the tunnel ended, at the 1000m-1100m mark. It had wiped about 12 chunks of my trip.
On my third world the same thing happened after I had been branch mining for hours. And was standing over lava recently converted to obsidian. I remembered the cavern and made a backup before reloading my save, sure enough I was plunged into a pool of lava.
I quit and restored from my backup, then downloaded NBT Forge to edit out the lava. What I saw shocked me, my tunnels, 18 in all, had been randomly erased along their lengths. Some entirely, some had pockets where my torches still were. Took me several hours to redraw all the tunnels in the editor.
So it seems random about when a chunk will be flushed to disk, unless you manually switch realms, ESC, or save/quit.
Edit to add:
TL;DR- Chunk saving seems random, not based on time nor distance. Save often, backup your saves. Don't waste hours like I did.
Second edit to add:
From reading the support posts on Facebook and peoples experience with crashing in the Nether it would appear that the client does not save chunks while playing. Once the client "crashes" with a black screen that it begins trying to save chunks to disk. If the client is force quit during this process it will result in a fragmented world like the one I experienced with my tunnels.
TL:DR2- Chunks don't appear to be saved unless; 1 on menu screen, quitting, black screens of death. If you crash leave the client alone for a bit to make sure it can finish writing before killing the process.
This behavior is no different from vanilla minecraft, unfortunately.
it definately speeds up my savetime
This works well in combination with my other optimization mod, FastRender.
These are great mods you're working on, thank you. They prove that much of the slowness of Minecraft is not due to Java, like most people believe, but due to the fact the game is still fairly young, and it's still in the "implement new features first, optimize later" stage.
I just hope the optimize stage does arrive eventually.
Amen to that.
Hell yeah, especially for SMP.
The thing is I never really noticed any slowness with Minecraft.
...Until, of course, I run it on Linux, in which it has a 1/3rd chance of starving every other process on the system of CPU time - I've never successfully recovered from this, as X is too inebriated to accept keyboard input on the terminal I keep open specifically so I can nuke Minecraft. The only option is to REISUB.
Fortunately I moved my world onto a server on another machine, so I don't lose anything other than my time and whatever is in Chrome at the time. It's better than having my network card shut off 100% of the time whenever I play multiplayer on Windows XP.
EDIT: Also, I don't blame Minecraft for these things, I blame Java and Realtek.
It's actually been running much faster for me on Linux than it was on Windows 7 for me. shrug
Ubuntu 64 bit, Maverick.
Are you using drivers with hardware 3D acceleration? I have no resource problems running it here in Ubuntu, with such drivers.
Nvidia drivers, current version.
[deleted]
do the other virtual terminals respond? (ie ctrl-alt-f1 etc.)
I'm assuming you're on a single-core machine? While minecraft is not technically single-threaded, it might as well be for practical purposes.
If you are on a dual-core or higher machine, how much RAM do you have, and what memory settings are you passing to the JVM? Memory starvation is a lot more likely to take down a system than runaway CPU usage.
Dual-core, yes. I have 2GB of RAM, and I just right-click the .jar in Nautilus and select "Open with Sun Java 6 Runtime". No clue what the memory limits are but I haven't seen the process go past 1.0G in top. I'll try VTs next time it happens (I can't believe I forgot about those things) and start Java with a 512M memory limit.
I have 2GB of ram. I just tried setting Java to only use 512 MB. Minecraft started to lag, then the audio cut out immediately. Several seconds later it began to starve other processes of resources; I switched to an empty VT and attempted to login. By the time I entered my password there wasn't enough CPU time left to start bash (i.e., it hanged at the password screen for several minutes) in which time I used REISUB.
I should mention that I use Dropbox and it asks every time I start to increase /proc/sys/fs/inotify/max_user_watches from the normal count of 8,192 to 100,000. I'm going to stop using Dropbox on linux when playing Minecraft (it's only manages my SSP saves, and I only play SMP on Linux) and allow max_user_watches to stay at the default. If this works, then I have some really nasty things to say to the Dropbox people.
I've noticed that if you have something like Docky or Gnome-do the performance and stability will take a serious hit. Have you added the PPA for the latest nvidia drivers? Also, if you are using Compiz/Fusion, turn it off! I use the "compiz fusion icon" utility to make it easy -- or you can throw some quick shell scripts somewhere to "compiz --replace" and "metacity --replace" to quickly turn Compiz/Fusion on/off.
I'll try disabling compiz next, once I can reboot into Ubuntu (encoding a Let's Play at the moment). Not currently using GNOME-Do, I did on my laptop sometimes and I noticed that thing had a tendancy to fail to load anything and subsequently spin at 100% CPU. I did not know there was a special Nvidia PPA, I've just been using the ones in restricted.
For reference, I've tried, in rough order:
[deleted]
There's quite a lot of room for improvement in how Minecraft renders things without doing hidden face removal.
[deleted]
There are at least two threads for networking on the client. If you are curious just use VisualVM to look around.
agree with you on the UDP thing, but the event-driven programming paradigm has at least as much traction as one-thread-per-client, though with the relatively low number of clients a minecraft server has I wouldn't argue against threads either. Using a select/poll loop does have the added advantage of not requiring as much thread syncronisation, though
I do seem to remember that the save format was explicitly mentioned as a target for optimisation, so you'd hope so.
I've never seen modding pull so far ahead of the official development of a game before.
Well 6 people vs 700 thousand addicted and hungry players gets you places lol
900k now i think.
That sounds awesome. I can't live without my BetterLight mod though.
Let's just hope Notch implements it, so we can speed up our map viewers too :)
These two mods in combination make minecraft just about playable on my netbook. You sir, are a gentleman and a scholar.
Agreed. It is almost to the point where I could play it in peaceful on my 10v. Still not quite there yet, esp. on anything other than peaceful. Of course I could spend a bit of coin to upgrade to a moderately powered laptop and be there now. But, alas, I love this teeny box too much. :D
And I will ALSO use this one with my Cr-48. FastRender did not make too much difference unfortunately but it was stupid slow to begin with so it was a shot in the dark. This may help though since chunk loading speed seems slow even on the SSD.
HEY LOOK EVERYBODY, THIS GUY HAS A CR-48!
p.s. you jealous I could use caps lock on that?
Cr-48 has capslock if you desire it.
Are any of the not-saving-issues present with the server version? Anything I can do to make sure it saves consitently?
The not-saving-issue was a bug where I didn't test v1 properly (as in, I didn't test that it saved correctly).
The server version saves as consistently as the vanilla server.
as it's not clear in the post, for SMP is it only the server that needs the mod, or for some reason do clients need it too?
Wow, nice.
OMG I could kiss you! Minecraft is much more playable on my netbook now!
I have a question about this mod because I think I might be confused.
If I'm using this mod and notch releases an update, can I use your conversion tool to pull out the chunks from the region files and still maintain all the changes I made while playing using this mod? The last little bit on your minecraftforum.net post really threw me off. This mod sounds amazing, but I'm reluctant to use it if an update might make me lose all of my progress. :(
[EDIT: After reading a few comments below, it seems I misunderstood the NOTES part like a few other people. It seems I can after all. (an official response would be very reassuring however. :D)