Shared host - allocated memory incorrect?

Discussion in 'Systems Administration' started by DeletedAccount, Jan 31, 2015.

  1. I haven't really had time to read through the thread, but let me explain what "Allocated memory" is:

    "Max memory" is your -Xmx value - spigot can not allocate more than this at any given moment.
    "Allocated memory" is the amount of memory currently allocated. If spigot needs more, it'll allocate more, with an upper limit of -Xmx.
    • Agree Agree x 1
    • Informative Informative x 1
  2. I was right (*dances*).

    Anyway, @frash23 could you take a look at the timing differences between the Nitrous server and OVH one? @EvenSafe is have a lot of lag on Nitrous and we can't find the problem.
  3. The timings of the nitrous server are way better than the ones on the OVH server.

    I would assume the lag is either latency or very unstable connections.

    Digging a little deeper, these plugins seem to be causing lag:
    • CommandSpy (mostly this one, why not just use essentials?)
    • Multiverse-Inventories

    The command /tpo is sucking up a lot of CPU as well.
  4. Lag started again, running timings.
  5. The bungee proxy is on ovh, and it's connecting to a Nitrous server - if that makes any difference.

    The commandspy plugin runs on all of my servers, never had a problem - I will get new timings in a moment.
    Again, multiverse-inventories is usually ok.

    With /tpo - I was using it lots when the lag was happening.
  6. The lag has now stopped, it kicked some players out then after a few seconds it was fine.

    When the server is lagging, I can still use console commands perfectly fine. I wouldn't understand if it was a bungee connection problem, as the lag stops after using stoplag and /lagg commands (at least what I see).

    Recent timings:
  7. Commandspy is the only CPU sucking plugin.

    Are you sure the latency between your OVH server and your nitrous server isn't huge?
  8. Weird - never had that before, I run the same version on all servers. @korikisulda is the dev, maybe they could make a comment on it.

    Well, how would I check that? (the latency)
  9. From your OVH server:

    # ping <your nitrous ip>
  10. [​IMG]
  11. That's pretty slow.

    What's your ping to the OVH machine?
  12. Pinging from where?

    EDIT: There are some weird issues with bungee and my nitrous server.. for example, if a user gets kicked on my nitrous server, they get kicked to one of my ovh servers.. when I kick from a ovh server, they get kicked out of the game.
  13. From your own computer.
  14. Well my internet is awful but here is the ping:

    EDIT: Now with the lag.. users get randomly timed out and sent to my fallback server, but the server is still online and they can reconnect.
    EDIT2: My chat network (using xserver that opens a connection between the nitrous server and ovh) is now lagging on the nitrous server.
  15. I don't know why. <300ms should be decent.

    I can only assume OVH's network doesn't like Nitrous' network.
  16. I guess so, what could I do to improve this? :/
  17. Move all your servers to the one network? Seems like the only option.
  18. Ok well, @EvenSafe do you want to go onto ts soon and have a chat about it :confused:
  19. This post is embedded in Google searches and the misinformation needs to be corrected. Thus the reply to this old thread. Hopefully people will read this and not stop at page one.

    Please do not spread mis-information like this when you do not have the experience or knowledge to back it up. You're talking about over-subscription, which has nothing to do with the allocated vs maximum memory that is being discussed here.

    Allocating MORE memory to Java than is being USED will actually DECREASE performance. Yes, that's completely counter-intuitive. There's something called Garbage Collection (GC) that has to take place at regular intervals. Most of those "Minecraft Server Tweaks" you see at forums like this have to do with speeding up and minimizing the amount of garbage collection that takes place. That's because everything else has to stop while the garbage collection takes place. More memory to search for garbage means MORE time the server is "locked" up until GC finishes.

    On a shared host, the things to be concerned with to ensure a lag-free experience for EVERYONE on the server:
    1. Fast Hard Drive Access
      This is CRITICAL to a shared host. I've personally seen a host use 8 x 150GB 5000 RPM drives in a RAID 10 array that were CRUSHED under the load of a handful extremely active/heavy servers. Desktop-grade drives will be the death of any shared hosting service, regardless of how cheap they offer their services or how fast their CPU's are. SSD or die.

    2. Cache and Buffers
      Google "Help! Linux Ate My RAM" for a fantastic article on this subject. The short of it is that Linux will allocate currently unallocated memory for cache and buffers, then give it back when needed. Cache and buffers are used for speeding up hard drive access (see #1 above) as well as many I/O related operations.

      If you "steal" all of the memory for Minecraft servers by pre-allocating the maximum RAM purchased for every customer, that leaves little to nothing for cache and buffers. That means you end up with 30 servers that have every single byte of memory allocated that they paid for (even servers with NOBODY PLAYING), even though only 1/10th of it was actually needed at any given time. That's a horrible waste of memory that could be used to speed up all the other servers that are actually active and in use by letting Linux allocate that unused memory to cache and buffers. Simply pre-allocate 1/3 to 1/4 and let Java/Minecraft decide when it needs more, up to the maximum paid for.
    This is all the difference between knowledge (what you read on the internet) and experience, BTW. Common knowledge is that more memory = more performance, when in reality you learn from experience that lean and conservative is better for everyone. Source: I've personally been a Linux admin for over 25 years, and hosting Minecraft servers for 5 years.

    This post is embedded in Google searches and the misinformation needs to be corrected. Thus the reply to this old thread. Hopefully people will read this and not stop at page one.