This is one reason why you should use Linux for your Minecraft server

Discussion in 'Bukkit Help' started by Toasty, Feb 17, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Toasty

    http://mojang.com/2011/02/16/minecraft-save-file-format-in-beta-1-3/

    Windows is quite prone to file fragmentation, and having all of those files being written and rewritten so often can seriously fragment your drive.

    Linux handles file storage differently, and isn't prone to this problem.

    Let the flaming commence!
     
  2. Offline

    Padeius Etoh

    and i thought running a server on linux was just better because its not windows.
     
  3. Offline

    Toasty

    Well, there's that too of course.
     
  4. Offline

    croxis

    Well, if you want to be nitpicky, this is largely a result of the differences between NTFS/FAT and the various filesystems that linux uses. If windows used ext3 (and there is a "plugin" for windows that can), then I'd wager a lot of the speed issues on windows will be alleviated.
     
  5. Offline

    Timothy_Riches

    I would switch to Linux in a hot minute if I could figure out how to get anything done in it. If it was like running a Windows install I'd be fine but Linux is NOT a newb-friendly OS, KDE or otherwise. Even Grandma can figure a windows box out.
     
  6. Offline

    DerpinLlama

  7. Offline

    Toasty

    My mom is 55 years old and she has absolutely no problems with Ubuntu 10.04.

    I used to feel the same way towards Linux as you, but back then, I only had Ubuntu 8.04 and Fedora 9 available to try.

    Even installing Ubuntu 10.04 is pretty straight forward, and 10.10 is even easier.


    CentOS (which I would suggest for running an MC server) is obviously more complicated, as it's an enterprise-grade OS, but Ubuntu will work fine for a minecraft server.

    I would honestly suggest burning a disc or making a bootable flash drive and testing Ubuntu out that way to get the hang of it.

    @croxis Not true. Windows and Linux, at an OS level, handle file management differently. Even if you used ext3 with Windows (the driver, by the way, refuses to work with Windows 7 because of how Windows 7 handles drivers), you would still have the same fragmentation problems.
     
  8. Offline

    Timothy_Riches

  9. Offline

    TnT

  10. Offline

    bag

    For lazyness a lot of instructions for linux tend to just be commands, as u can just paste em in to the terminal. The downside is everything looks far more complicated that it needs to be.

    My install proccess basically went:
    1)Install ubuntu
    2)Install java from software center (think its included with restricted extras)
    3)Make folder on desktop, Add craftbukket
    4) Create sh script to run it (more aless the same as a bat) mine is:
    Code:
    #!/bin/sh
    java -Xmx1024M -Xms1024M -jar craftbukkit-0.0.1-SNAPSHOT.jar
    (right click, property's, permissions, tick executable)
    5)Run in terminal & ya done.

    In reality i already had ubuntu and java installed, so adding it was basically the effort needed to download bukket and create a folder :p
     
  11. Offline

    Padeius Etoh

    Go to ubuntu download the desktop version on the live cd, play with it, or if you have an old windows machine around just install the ubuntu desktop version on that and start to play with it. Ubuntu has done a great job of creating an easy and nice interface with gnome that is actually as easy if not easier to deal with than win 7. Try it, its not hard but follow the ubuntu help and support stuff, it can be more clear and easier to understand, mainly because they are not trying to make the system work with any one program.
     
  12. Offline

    nerdnosyd

    I run my server off of an SSD, do I still need to switch to Linux?[​IMG]
     
  13. Offline

    Toasty

    Yes, because using an SSD doesn't compensate for all of the rest of Windows' failures.

    Also, Ubuntu 10.10 has full TRIM support, so your SSD should work fine with that.

    The hardest step in that process is getting Sun Java, which you don't need to do because OpenJDK comes pre-installed and works just fine.

    And if you think the rest of it is difficult, then I'd be surprised if you could install bukkit on Windows, because doing that is actually harder than completing the rest of the setup in TnT's guide.


    And I only gave one, very simple reason why Linux would be a better choice. I won't list the rest of them because then it'd take you a half hour to scroll down this page. :O
     
  14. Offline

    Plague

    Well how many years have you worked on windows and how long did it take to get to know them, this is just to be expected
    This is just plainly false.
    No, she cannot. If she can use it now it' because someone helped her, not like she just sat in front of it and got to work. And just the same will be for Linux/KDE.
    I have seen a bunch of seniors using KDE with ease and not even knowing it was linux, why would they.
     
  15. Offline

    nerdnosyd

    The rest of Windows' failures?!?!?! That reason, it's so technical and unbaised! I'll go out and switch right away!!!!!

    A reason I just blew a hole in larger than crater that wiped out the dinosaurs. Not everyone has SSDs, however, so let me blow a hole in your reason that is applicable to the everyday user. Windows 7, by default, automatically defragments itself. In the two years I've been running Windows 7 on this box, I have never once had to manually defragment.

    Your argument that people should use Linux simply because of fragmentation is: invalid.

    The amount of technical expertise in this thread is astounding. So let me try to root myself in reason rather than fantacism.

    If you're more comfortable with bash scripting, terminals and the unix architecture in general, you probably already know to use unix for a server.

    If you're more comfortable with batch scripting, Windows' command line, and its architecture in general, use Windows for your server.

    If you're not comfortable with either of these, your server probably will not optimize and potentially vulnerable to attacks. I wrote a batch script that grabs the latest Bukkit build (or if it 404s, uses the one it already has) and launches the server. I also wrote a vb script to save and restart the server twice daily. I finally wrote a backup batch script that zips up the entire server directory and stores it on a different harddrive and it runs every half hour.

    My friend hosted a server on Ubuntu server edition. I wrote him a bash launcher that does the same as my batch script and a backup script. Then he decided to get cute and host the whole thing in ramdisk and lost it all because he couldn't figure out how to get cron to work.

    This thread is: invalid.
     
  16. Offline

    TnT

    No, this thread is filled with people saying which operating system they are more familiar and comfortable with, and that OS is clearly better. Its not invalid is the slightest, its just more of the same arguments that have been around the net since the net existed.

    As for your friend losing all his shit because he put it into a ramdisk - that's not a Linux problem. That's an admin problem. Had he done the same thing on Windows, he would be in the same position - screwed.

    Now, I'm a Windows admin by trade. I get paid a decent wage to administrate Windows systems - both desktop and server. I get zero money to work on Linux. I still chose Linux to use as the server, because I had more flexibility and less licensing hindrance. Want to run a ramdisk? No need to hunt for other utilities to do it - its built in. Want to do backups? Sure, with W7 or Server 2008, you can do that easily, but XP? Yes, you have ntbackup, but that's barely adequate. Ever use SimpleBackup in Ubuntu? That is so easy anyone can use it. Running an Rsync command is pretty easy too, and there are GUI's available. Same with cron scheduling. It is only has hard as you want to make it.

    To run any Windows OS, you should pay for it. So Windows 7 costs you rougly $150 for an upgrade license. Server 2008 costs roughly $800. Running almost any flavor of Linux is free - legitimately free. If you aren't willing to pay for it, you should not use it. Any idiot can pirate it, but why pirate when you don't need to?

    I started running my MC server on a Windows box. I wanted to setup a server very quickly, easily, and without spending any money. I quickly moved to Ubuntu because it was just easier for me to get what I wanted accomplished - backups, ramdisk, automation, free, etc. I say this as a Windows admin who does that on a daily basis (besides using ramdisks). I am exceedingly good at what I do, better at using Windows than Linux by a long shot. I STILL found it easier to use Linux (specifically Ubuntu in my case). It is really only my opinion, but I stand by my statement.

    Not to mention, I see a lot of Windows specific problems on these forums - Not able to bind to port is one of them - this happens because Windows hasn't properly let go of the Java process. While its simple enough to fix (reboot/kill java processes), the fact remains that it still happens. The only times I've seen this on Linux is when the admin accidentally runs a second instance of the server. Then there is the Windows firewall - numerous posts on here about it causing peoples problems.

    Use what works best for you. That's all that matters.
     
  17. Offline

    Timothy_Riches

    Thanks for all the encouragement despite my flippant attitude. :/

    I think my issue is summed up rather nicely by TNT: "It is only has hard as you want to make it." :)
     
  18. Offline

    Toasty

    You are so, so silly.

    Like I said before, I only gave one reason. If you want more reasons, go to http://www.whylinuxisbetter.net/ as previously suggested.

    Also, a harddrive shouldn't need defragging in the first place. The operating system should be smart enough to handle files in such a way the prevents fragmentation without decreasing performance in the process. Something linux does quite handily.

    Also, congrats on the new position TnT.
     
  19. Offline

    Afforess

    This is one thousand reasons and counting why you should use windows: Steam.
     
  20. Offline

    dark navi

    I would use Linux, but I like having a system that works with everything I own.
     
  21. Offline

    M1sT3rM4n

    Check and mate!
     
  22. Offline

    Shade

    Seriously hope your not trying to play steam games on the same rig your MC Server is on . . .
     
  23. Offline

    Afforess

    My server is just an 8 man server, and I have plenty of ram, so it's not an issue. But yes, if I had a larger server, it would be a problem.
     
  24. Offline

    Xon

    Windows stores files smaller than ~4kb in the MFT which is a single continuous file at the start of the drive. Most Minecraft chunk's are generally under 4kb or so inside, so you literally can not fragment them on common file systems on Linux and Windows.

    Minecraft is fucking horrible at IO because it throws lots of tiny little writes to lots of tiny little files with lots of rename of temp files to atomically replace changed chunks. Linux is more willing to keep the entire file and a sequence of changes to it's metadata in memory, even when a rename being an implicit write barrier in the POSIX spec. This was actually the cause of EXT4 eating files resulting in zero-length files on power loss. Because every sanely designed application expected the write-to-temp-file, followed by deleting the old file and then renaming in place to actually occur in that order.

    Windows just treats a rename as hard write barrier, which causes meta-data to be flushed to disk. Under Linux it tends to be more of a strong suggestion. This type of differences in how IO is handled is one of the reasons Linux was historically shit at handling power cuts which resulted in the potentially for massive data loss. Where as with Windows, you just loss whatever was in the air at the time.

    SATA spinning disks are rated a a few dozen random input/output operations per second at most. Higher rotation speeds than 7200rpm do better, but not by much. Worse, because Minecraft world data isn't closely packed together correctly the fact that the world data tends to be accessed in spatially is lost. It doesn't matter if one chunk is touched there is a good chance the chunks around it will be touched soon, if that information is not preserved.

    TL;DR; the Minecraft world format was always the result of programmer who never really thought about what his design's meant for scalability and never really considered what would happen when you put multiple players in the same world.

    </rant>
     
  25. Offline

    TnT

    I use Windows to play the game, but Linux to host the server. Linux is better at hosting the MC server, Windows is better at playing games. I don't run steam on my craftbukkit server - its a single purpose machine. If I wanted a multipurpose machine that can play games as well as serve them, I'd likely run a Windows server too.

    Pretty much, but how many indie devs program their games with the foresight that they will become the next biggest thing in gaming? If you sell 10,000 games as an indie dev you're doing great. Now Mojang is spending the time and energy fixing the mistakes, so it will get better, sooner or later.
     
  26. Offline

    Toasty

    Steam works fine in Ubuntu for me. I've been able to play L4D2 and a number of other games without any problems. Granted, not all of them work, but enough of the ones that I care about do.

    Besides, I don't play games that often anymore (aside from minecraft, but even then, it's only a few times a week), and if I really wanted 100% steam compatibility, I'd dual boot Ubuntu and Windows.

    Also, interesting insight there Xon.
     
Thread Status:
Not open for further replies.

Share This Page