How can I reduce lag on my server?

Discussion in 'Bukkit Discussion' started by AlexCityOfFun, Jun 18, 2012.

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

    AlexCityOfFun

    Hello guys! I have a question: How can I reduce lag on my server? I am hosting my own server on a pc with these features:
    Processor: Dual CPU E2200 @ 2.20GHz 2.20GHz
    RAM:2.00 GB
    OS: Windows 7 Home Premium N SP1
    System type: 32-bit
    HDD: 250GB

    Any suggestion on how to reduce the lag ?
     
  2. Offline

    Ne0nx3r0

    Hardware:
    - More RAM
    - A solid state drive
    - Faster internet connection

    Software:
    - Linux instead of Windows (I prefer Debian, everyone will give you a different answer)
    - Put your world file onto a ramdisk (depending on the size of it/your ram <- hence the more RAM note above)
    - Optimize your startup script to use an appropriate amount of RAM
    - Remove unnecessary plugins
    - Limit how many worlds you have
    - Limit redstone(?)

    I'm not really sure about the last one, but removing plugins/worlds is your most economical option.
     
  3. Offline

    AlexCityOfFun

    I'd have some questions:


    Which is the recomended amount of RAM ?
    "A solid state drive" -What ?? translate please.lol
    Which is the recomended intrenet speed ?

    Why is Linux recomended instead of windows? what are its benefits?
    " Put your world file onto a ramdisk (depending on the size of it/your ram <- hence the more RAM note above)" -?? how can i put my world onto a RAM ?
     
  4. Offline

    nala3

    Anything above 4GB's
    A solid state drive (SSD) is kind of like a hard drive but it does not have any moving parts and is much faster than traditional HDD's
    Linux is much less resource intensive than windows
    A ramdisk is basically storing your entire map in RAM so it can be accessed very quickly. Personally I don't recommend this, especially since you only have 2GB's of RAM.
     
  5. Offline

    Ne0nx3r0

    The recommended amount of RAM will always be "MOAR!!!"; you just can't get enough RAM, seriously. That said, 2GB is probably enough, but you wanted to know how to decrease lag :).

    A solid state drive is a more expensive hard drive that uses something more akin to flash memory instead of physical disks to write on, and is much faster than your average hard drive. This is useful for servers, which read/write to the drive constantly. Before you buy one, be sure it's highly rated and check the reviews for failure rates. If it seems to die a lot, this is not the drive for you. I bought this beauty for my desktop PC, and it's performed wonderfully for $130.

    Linux (without a desktop environment, command line only) uses less resources because Windows 7 comes with a LOT of stuff your server just doesn't need. A properly configured linux box would more less only do the things you ask it to, and not waste time trying to for example update a media player or keep your adobe PDF reader ready to launch at a moment's notice.

    As for a ramdisk, GIYF.
     
  6. I am just wondering - how do you guys get hard numbers about performance ?

    I mean, it would be nice to have something to compare to with every "build".
     
  7. Offline

    AlexCityOfFun

    But i want to use my pc as a Home PC and as a server host in the same time. If a SSD is useful for servers but have low storage space... it is not good for me, and i cant afford one with big storage space...
    The same thing for Linux, it cand be used for usual works (for home) ?

    124$ for a SSD is to expensive for me...what do you say about a RAM (SODIMM DDR2 2GB PC6400 800MHz Elixir Original) at 26$?
     
  8. Offline

    Ne0nx3r0

    Consuela, can you take this one for me?




    Okay seriously... You're basically always going to have some amount of lag on your computer if you run a server and a client on it (especially one as poorly optimized as Minecraft).

    If you want to decrease the lag, then yes. Buying more RAM (as much as you can reasonably afford/your motherboard will support) is your best option. RAM is RAM is RAM for the most part, so buy whatever brand. The only thing that matters is the size (the GB) and the speed (the mhz). Just make sure it's as fast and the same type as your current memory, since RAM will dummy down to whichever stick is the slowest.
     
  9. Offline

    AlexCityOfFun

    Okay, i understood. I need more RAMs, but isn't there any other way to decrease lag? I mean something related to plugins, players limits, GUI, RAM usage, etc...
     
  10. Offline

    Ne0nx3r0

    Also yes, limiting players will limit lag.
     
  11. Offline

    TnT

    You can turn off mobs and animals, or set the limits really low in the bukkit.yml. Mobs are usually a fairly server intensive task.
     
    Ne0nx3r0 likes this.
  12. Offline

    gezahs

    I guess your primary problem is the connection speed your ISP offers.

    - what is your connection speed (while lag occures)? Test it with eg. www.speedtest.net and contact your ISP if its way under the promised values.

    - how many players would you like to support? Here is a usefull calculator: http://canihostaminecraftserver.com/

    - more rum would be great, an SSD is just (very) nice to have. :) It would be a small increase in speed, if you had the server running on any different Sata-hdd with at least 7200rpm (different hdd! not a different partition!). Those are quite cheap.
     
  13. Offline

    AlexCityOfFun

    My internet speed : http://www.speedtest.net/result/2017856255.png
    I'd like to support at least 30 players ...
     
  14. Offline

    gezahs

    For this purposes you should upgrade your internet connection otherwise you can forget it.

    For 30 players you need at least
    - 10Mbit upload stream
    - 5Mbit download stream
    - 4072 MB Ram
    - a better processor and x64 compatible Hardware and OS

    Maybe it is an option to use one of these "rent a server" services found on the internet, but i do not have any experience with that.
     
  15. Offline

    Coelho

    People overestimate RAM. On my server, I can run 150 players just fine on 2gb of DDR3 RAM.
     
  16. Offline

    Ne0nx3r0

    Yeah, as stated that's going to limit you. I used to have 2Mbps and I ran into clear latency issues after ~12 players. You really want at least 3-4, but ideally 10-20Mbps for a small server to run solidly.

    Then you have a much nicer server and Internet connection than I do.
     
  17. Offline

    Lolmewn

    You can't deny it's importance though.
     
  18. Offline

    Coelho

    Well, it is essential to any application, but people seem to think that you need 32gb (or some outrageous amount) of RAM to hold 50 players.
    ...
    Tell me how I am supposed to kindly respond to something that stupid... They're not holding the PLAYERS. They're holding the SHITTY plugins.

    Apologies for my language.
     
  19. Offline

    Lolmewn

    Coelho Servers without plugins use some 20 MB per player, I think. To store player data, cache chunks, that kinda stuff. When adding plugins, this rises quickly to about 50 MB. With outrageous amounts of 32GB of RAM, you can easily hold 200 players, if you don't have too many plugins taking RAM. Of course, Internet connection and CPU also matter at that point.
     
  20. Offline

    Coelho

    Player data is not large at all, and chunks are not cached per the player. They are cached globally. You also can not say that all plugins will use that much memory. Very minimal plugins can use a little over a meg of memory.

    Also, you can not base memory usage off of what another application says (like htop, top, free, or [god forsaken] Windows Task Manager). You have to get the variable within the VM instance, because Java allocates more RAM than it needs.

    In an application like Minecraft, as well, where we are not aware of all the procedural steps it takes, the best way of learning the best optimizations of the software is practice. I've attempted at one point to fit 450 players on 4gb of RAM, with success. and hardly any lag. (other specifications were 1gbit connection, Intel 320 SSD 300gb, Intel E3-1290 3.6ghz with 4 cores [8 with HT processor])
     
  21. Offline

    AlexCityOfFun

    Thanks everyone! I understood which are my deficiencies and what should i upgrade on my PC. Thanks again!
     
Thread Status:
Not open for further replies.

Share This Page