How To Improve Minecraft Server Performance

Discussion in 'Bukkit Help' started by TnT, Jan 15, 2011.

Thread Status:
Not open for further replies.
  1. Ithas 1Gbit onboard with a 100Mbit connection. Sry that I reply so late but I was on vacation! Strangely the server peaks at approx 30 players. The full server has hardly an upstream of 400kbyte/sec. (a dedicated i7 950 with 12gb)
     
  2. Offline

    mahari3

    The only time I get this message is ONCE after reloading. Although my server has only had a max of 5 people on at once so far since I'm still writing permissions, configuring plugins and so on. All I have is 4GB of ram, and a 1.58GB world, along with two 2.58MB nether worlds, and 63.4MB world. (totaling 2 worlds and 2 nethers and 1.648GB).

    I do have one question however, If I use a plugin that will keep my worlds loaded so that they will never unload, would that increase or decrease server performance?:eek:
     
  3. Offline

    Nathan C

    It will increase performance, although you will be using lots more RAM.
     
  4. Offline

    mahari3

    That makes it a tough choice...
     
  5. Offline

    medge

    Trying to follow your guide, ramdisk is a unknown command. Using Ubuntu 10.04.4 64bit.

    root@mcpvp /bukkit # ramdisk
    ramdisk: command not found
     
  6. Offline

    fffizzz

    http://bit.ly/xmYqQ5
     
  7. Offline

    medge


    thanks, or faster reference... for sake of finding it easy in the thread..

    mkdir -p /tmp/ram
    sudo mount -t tmpfs -o size=512M tmpfs /tmp/ram
     
  8. Offline

    ray landers

    i have not seen any mention of using disk caching to improve performance.
    it seems that you could allocate the ram you would be using for the ram disk to be used as a cache and regulate the size of the units in the cache to be optimized for minecraft chunks.
    and further optimization would be the time to live for those units in the cache so that parts used frequently would stay in ram, and parts not as often needed could be flushed to disk and recycled in the cache.
    then limit it to only write to disk at most every 30 seconds and for the backup situation force write to the disk every 300 seconds.
     
  9. Offline

    $p!k3

    Can you make a Mac Os Help? That would be nice :p
     
  10. Offline

    zipron

    yea because mac is the #1 platform to host servers on, you paid way to much for it, so you would expect it to being able to do things good.. Linux my friend: free, open-source, easy to install, way faster because of no stupid gui's and so on.

    Of course, I don't mean this so hard, but I'm not a mac lover =)
    zip
     
  11. Offline

    $p!k3

    oh lol. i host from home and it lags abit from times to times, and when more people come=disaster
     
  12. Offline

    4am

    Mac OS X is based on BSD with a Mach microkernel (you can download an run Darwin for free from Apple). This is the base system for Mac OS X and it's just as good as Linux, although it doesn't have as much driver support for stuff like SSDs, etc (they'll work, but perhaps not as well if Mac OS X doesn't specifically support them).

    I am a former huge Mac guy, and I used to run my entire server on OS X, but my hardware is old and so I got cheap and bought a PC and put Linux in a VM, which works just fine.

    Mac will give you less trouble than Windows, for sure, and the setup is very similar to Linux (they both use bash shell, etc).
     
  13. Offline

    zipron

    ok =)
     
  14. Offline

    4am

    I have zero time for even simple tutorial writing, but for Mac you'll want to either use Apple's Java (apparently they still released one for OS X Lion?) or install the OS X port of OpenJDK 7. Next, you'll want to look into working with launchd for stuff like automated backups, and starting/stopping the server automatically on startup/shutdown. You can also install MySQL fairly easily, but your best resource might be MacPorts, which is a project to help you install *NIX-style software easily on the Mac (the file structure and available libraries varies from most GNU- or other BSD-based systems; MacPorts is an installer of software which has been adapted); If MacPorts isn't to your liking, Fink might be an alternative.

    Hope that gets you started!
     
  15. Offline

    zipron

    lol I don't have a mac, I host on linux =D
     
  16. Offline

    guyag

    I don't suppose it's possible to put just the /plugins folder for example in a RAMDisk? Equally things like just server.log. My only issue is that my world file is 10GB large, leaving 6GB to share for java & the OS which seems somewhat counterproductive.
     
  17. Offline

    fredghostkyle1

    will this work on MAC? i have 1 runing my 10 slot server (NOT LIVE) for the users who ave ite dedicating it on a .... but i will be dedicating in on a PC, but for now i have a MAC. will it work, i will not ty it becuas i don't need my mac crashing or loosing ALL of my plugins/files.... can you let me know?
     
  18. Offline

    TnT

    It should work, you can probably use similar commands, but you'll want to google setting up a ramdisk on a Mac.
     
  19. Offline

    fredghostkyle1

    k
    kk, thanks!
     
  20. Offline

    tajak10

    So just google ramdisk mac ?
    Could you make a separte simpler version for mac to?
    I am kind of new to craftbukki,
    Cheers. Tajak10
     
  21. Offline

    Nathan C

    You shouldn't be using Mac OS to host a server...

    Use Linux...........
     
  22. Offline

    tajak10

    Why should i buy a separate computer to run my minecraft
     
  23. Offline

    Cirno

    .........................
    Mac was not meant to be a server hosting operating system. It's simplicity makes it too hard to actually do something complicated.

    Do a duel boot, if that's even possible on a mac, and install a linux distro on a seperate partition.
    If you don't understand the above, I suggest you just move on and keep using Mac...
     
  24. Offline

    Shukaku

    This is possible using Bootcamp.
     
  25. Offline

    tajak10

    10,6 or do i need 10.7 lion
     
  26. Offline

    fffizzz

  27. Offline

    tajak10

    Tried but did not work :( :(
     
  28. Offline

    munymuny200

    I got 8gb Corsair RAM from Amazon for ~$20.
     
  29. Offline

    zaq_hack

    Is there a summary of performance tricks, here? I'm slogging through this thread, but some parts of it are a little murky. How about a "top 10" optimizations? I'll start, if we think these are inarguable ...

    1 - Use Linux
    2 - Use Java 7
    3 - Run your world files from RAMdisk
    4 - SSD is good for worlds too large for RAM (but RAM is cheap)
    5 - Using random Java options posted here without understanding them is likely to do more harm than good.
    6 - ???

    More suggestions, please?

    I'm not going to run a 100 person server (at least, I don't think so). However, it would be helpful to me to get the most out of my hardware since it seems to struggle getting past 5-6 people at a time. I don't want to have to lay out money for a new server just to support "friends and family" and a max of 12 or so people at a time with maybe 20-30 total accounts.

    Presently, I'm wondering if a virtual machine running on my i7 desktop would work better than an old server ...
     
  30. Offline

    4am

    These three options right here got me the most performance, especially the RAM Disk. When you use a RAM Disk, you must be sure that you set u a script with cron which periodically backs up the worlds to disk; it will need to turn off the save on the server so running your server in screen or tmux so that commands can be injected into the console is a must. I use rdiff-backup for this, which only saves changes to the world files instead of backing up everything over and over (the downside being you need to wait for the world files to rebuild in the RAM Disk after rebooting - a small price to pay for the performance gains). Then your script can turn saving back on and things will work as normal.

    Also, bandwidth is key - I have a 25mbit up/25mbit down connection and it works great (i've only tested about 7 players at once, but with a bunch of plugins; no lag!). If you are renting a VPS then then bandwidth shouldn't be a problem (unless your hosting company is not that great); if you are running from home then a strong upload speed is necessary - the server spews much more data to the clients than they do to the server, and slowness here will cause lag regardless of how fast your machine can actually handle things (not to mention slow upload can lag your server as it waits for buffers to clear before sending out more data).

    Last thing, although Bukkit (and the Minecraft Server code itself) is not multi-threaded (mostly), a multicore CPU at a high clock rate is also quite helpful, as it will allow the OS to delegate other tasks across other cores and leave more "room" for the Java VM to do its thing.

    Hope that helps a bit.

    Edit: Two projects you might want to check out are MineOS and Craftbukkit++. MineOS is a complete Linux OS distro designed for the sole purpose of running a Minecraft server, and comes with Apache and MySQL, among other things. It has a RAM Disk option built in (using rdiff-backup) and you can just turn it on as part of the config. Craftbukkit++ is an unofficial build of CraftBukkit (and therefore you won't get any community support on Bukkit.org) with performance optimizations built into it. I've never used it myself but some people swear by it when beefier hardware isn't an option.
     
Thread Status:
Not open for further replies.

Share This Page