Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

How much ram does a server actually need ?


  • Please log in to reply
16 replies to this topic

#1

Umcookies
  • Location: Australia
  • Minecraft: umcookies

Posted 19 April 2012 - 08:47 AM

Hello all, something has been bothering me as of late.

There's the more or less general rule of 75-100mb of ram per player for a decent server. What I dont understand is why so much ram is needed per player. I can create a map 1280X1280 and its file size doesn't reach 50 mb alone.

Is the server decompressing the chunk data before sending to the client ? In which case why on earth would they be putting such a high CPU task to the server ?
When i see people ask "Will this be added to Minecraft ?"
My magic eight ball says
"Please try again later".

Register or log in to remove.

#2

Infallible_
  • Location: @root
  • Minecraft: Inhale_

Posted 19 April 2012 - 12:13 PM

Well, it depends on the amount of players the server would need. Per player? You can't tell. Say they travel for 4 days in 1 direction - that's loading more chunks, and using up more RAM. Though, another player could just be a normal player, build his house, etc and not use as much RAM.

Infallible - The inability to be wrong.


#3

Umcookies
  • Location: Australia
  • Minecraft: umcookies

Posted 19 April 2012 - 01:54 PM

View PostInfallible_, on 19 April 2012 - 12:13 PM, said:

Well, it depends on the amount of players the server would need. Per player? You can't tell. Say they travel for 4 days in 1 direction - that's loading more chunks, and using up more RAM. Though, another player could just be a normal player, build his house, etc and not use as much RAM.

But only the chunks around the player when their logged in are loaded, having a map 5000X5000 or a map that is freshly created will use identical amounts of ram.
When i see people ask "Will this be added to Minecraft ?"
My magic eight ball says
"Please try again later".

#4

gerbil
    gerbil

    Support Guru

  • Members
  • 4908 posts

Posted 19 April 2012 - 02:20 PM

There's a lot more state in the running map than is stored on disk.
Each entitiy has a position, a direction, which way their head is turned, etc
Dynamic Lighting and light levels,  etc...

#5

Umcookies
  • Location: Australia
  • Minecraft: umcookies

Posted 20 April 2012 - 02:39 AM

View Postgerbil, on 19 April 2012 - 02:20 PM, said:

There's a lot more state in the running map than is stored on disk.
Each entitiy has a position, a direction, which way their head is turned, etc
Dynamic Lighting and light levels,  etc...

I was unaware that the server did all the lighting, that was another thing I assumed would be left to the client to save on bandwidth and CPU.

And the entity's are simply strings of numbers and so wouldn't take up more than a few bytes each object.
When i see people ask "Will this be added to Minecraft ?"
My magic eight ball says
"Please try again later".

#6

gerbil
    gerbil

    Support Guru

  • Members
  • 4908 posts

Posted 20 April 2012 - 03:45 PM

Actually you reminded me, the lighting is something that recently was pushed to the client from the server.
But it used to be handled in the server.  I don't know if the memory recommendations have been adjusted.

But my point was the the size of the world on disk is not the same as what is required when a chunk is loaded in memory.
Plus I would assume that loaded chunks also need additional data structures to locate various kinds of objects quickly.
All entities that need to be checked for growth, for decay, for spreading, for movement, etc.

How much overhead I'm not trying to predict, just pointing out that there is overhead for loaded objects more than just their persisted definition

#7

lizardbones

Posted 20 April 2012 - 06:11 PM

Every block around the player is loaded in memory.  That means for every active chunk around the player, there's potentially 65,536 objects held in memory.  The only mitigating factor is how many of those blocks are AIR, and so don't take up any memory space.  Around the player, there are at least 6 chunks active (1 in each of the 8 directions away from the player.  However, active chunks are more than 1 chunk away from the player.  Even with a 'Normal' view distance, the player can see 128 meters.  That's 8 chunks active in any direction.  With a 'Far' view distance, that's 16 chunks active in any direction.  That's 256 chunks, each with potentially 65k memory addresses, all loaded in memory for each player.  I don't know how much memory each block and each entity takes up, but even with each item taking up a tiny amount of space, you have something like 16 million possible objects referenced.  It adds up.

http://www.minecraft...net/wiki/Chunks

By default, all chunks within 10 chunks of the player are loaded.  So something like 6.5 million objects are possible, but it's probably more like 1.5 to 2.5 million objects are loaded in memory at any given time.  It still adds up.

#8

crafter200

Posted 20 April 2012 - 11:21 PM

Also, no one mentioned that mods and plugins could potentially have a huge impact on how much RAM the server needs

#9

wacossusca34
  • Location: Canada, BC
  • Minecraft: Jarcode

Posted 21 April 2012 - 06:24 AM

I have a decent understand the mechanics of how the minecraft server loads data to the client(s), but I found 2GB of RAM was adequate enough for hosting around 25 people on a CLI linux server. If your using Windows, you should probably rethink your choice of operating systems, since Windows XP or 7 do not make stable hosts. The UI that is constantly running can be CPU sucking, and there's quite a few other processes that can swallow up a good 5 players worth of performance, at least.
You are one person in a planet of seven billion people, on one of eight planets in a solar system, in one of millions of solar systems, in one of millions of galaxies. You're pretty insignificant.

#10

Charly_ZA1022093

Posted 15 July 2012 - 10:17 AM

How much RAM will I need for a 2 player vanilla server? I need it to record videos for my YouTube channel.

#11

Sumith41ith

Posted 15 July 2012 - 10:49 AM

View PostCharly_ZA1022093, on 15 July 2012 - 10:17 AM, said:

How much RAM will I need for a 2 player vanilla server? I nee d it to record videos for my YouTube channel.
2gb would be more then fine. Also one thing you have to consider is your internet speed which also plays a part in overall speed and connection.

#12

Charly_ZA1022093

Posted 15 July 2012 - 10:51 AM

View PostSumith41ith, on 15 July 2012 - 10:49 AM, said:

2gb would be more then fine. Also one thing you have to consider is your internet speed which also plays a part in overall speed and connection.
Our server will be hosted by a minecraft server host not on my PC. I just wanted to know how much RAM I should order.

#13

Stealthy_Thinking
  • Location: Magical land, filled with so many wonders.
  • Minecraft: StealthyThinking

Posted 15 July 2012 - 10:54 AM

View PostCharly_ZA1022093, on 15 July 2012 - 10:51 AM, said:


Our server will be hosted by a minecraft server host not on my PC. I just wanted to know how much RAM I should order.
I used to rent a server for 5 people and 756MB of RAM was doing fine for that amount.
So if I was you I would get that or 512MB if you're looking to save a bit.


#14

Maxadax
    Maxadax

    Tree Puncher

  • Members
  • 31 posts
  • Location: London
  • Minecraft: Maxadax

Posted 15 July 2012 - 11:02 AM



My server has 1GB of RAM and it's running without lag. It also doesn't experience much lag when WorldEdit is being used.

My server has 20 slots too.

Posted Image

#15

Berwout
    Berwout

    Nether Resident

  • Members
  • 2440 posts
  • Location: The Netherlands
  • Minecraft: AngelsDustz

Posted 15 July 2012 - 06:21 PM

I got 512MB (that can go up to 1024MB) for 20 players no lagg :)
Got my GTS 450 running at 900 MHz core (http://www.ozone3d.n...0.php?id=114106)
[Computer Specifications]

#16

Trusebruse

Posted 15 July 2012 - 08:03 PM

I have also been wondering about this.
If we say i have a server with 64gb ram and want to host a really big server. How many players can be online at the same time then?
And if i host the server at home, how good must my internet be? 200mb sec?
please reply! :)

#17

brickmaster32000

Posted 30 July 2012 - 09:51 PM

Keep in mind that the OS uses up some ram and if you don't have a 64 bit system it is kind of a moot point as java won't allocate more than a gig.