New hardware for smp1-4 is ready!

Discussion in 'Empire News' started by JustinGuy, Mar 8, 2012.

  1. Depends. Bukkit makes it easy for plugin developers offload stuff into threads that can be run by another core than the main thread. However, most of the interactions with the server core (e.g. finding out what type of block the block at 17/42/999 is, sending a player a chat message, killing a spy chicken) only work in the main thread. Also all work that has to respond to something (e.g. deciding if a player is allowed to break/place a block) must be run in the main thread, too.

    So a plugin that'll grow trees in letter shape can compute the shape on a second thread and then tell the main thread to final pattern. But the main thread then must change the actual blocks.

    A plugin that kills spy chickens when they enter your town lot has to run in the main thread, because "reacting to mob movement" and "killing an entity" as well as "looking at an entity's data" as bound to it. Only "calculating if it's your lot" could be done in a second thread. Very little gain here.
  2. We run sandy bridge xeons on the new game servers ;).

    No it would not crash other game servers on the same hardware. What it does it maxes out the thread the server is using, so at the most it "locks" up one core, the other servers have many other cores they can use :)

    Nope, it requires a huge amount of development work to write a multi-threaded application of this size. The only way to do it is starting from the core of the application, we can't "rig" it to work or anything like that :) Hopefully with Mojang stealing the Bukkit team we will start to see some of these improvements. Until then I think our solution of multiple integrated servers works great for distributing load, I mean even if we could have 400 players on one server we would have to separate the chat and other things even more :)
    nnnnmc1 and konglooey84 like this.
  3. I lost you at plugin developers and got the idea from the end, 'Very little gain here'. I know a bit about computers but not how processors and stuff compute, In my mind aslong as it does it Idm :p
  4. Yes this is correct, you can leverage multi-threading through Bukkit, we do this with a bunch of things on EMC, but at the end of the day all the main heavy stuff is still stuck in one thread :(
  5. Now if only you could get a 20ghz single core for servers
    nnnnmc1 likes this.
  6. Think of it as making a quilt, you have one person sitting at a table sewing. Then you decide to make it faster you are going to add 3 more chairs to the table. At any give time the quilter can sit in any of these chairs (cores) to work on the quilt. You could sit two quilters in two different chairs easily if they are working on separate projects (separate applications). But if you want them working on the same project you will have to have some sort of communication and planning between them so they can work on it at the same time (a multi-threaded application).
    nmanley, ignoramoose and Yukon1200 like this.
  7. Ahh, Ok. I get it now, So me buying a hex incase I ever needed to host a server was useless and I should have just gone with a higher clock dual/quad?
  8. Wow I knew nothing about any of this, but now I think I actually get it 0.0 well said good sir.
  9. Not crash, but lag to death. However, the operating system's job is to protect programs from each other.

    There are several ways for processes on a computer to have a bad effect on other running processes:

    * Hogging all HDD I/O. That is reading or writing so much from/to a hard disk that all other programs have to wait ages when they try to read some data. Big problem on windows, not so bad on Linux. Not really a problem for Minecraft as the server already rate-limits chunk loading and saving.

    * Hogging all CPU cores. Was a big problems in the single core CPU times, nowadays a program has to try really hard to use more than one core. Also, any server operating system has a process scheduler that will prevent programs from eating all CPU time when there are other programs that also need some. Not a problem for minecraft, as it will do 95% of it's processing in one thread and so can use up only about 1.1 cores.

    * Hogging all network I/O. Flooding your network cable with more data or connections than it can transport. Again server operating systems are quite good at managing that. Minecraft could do that---if the server had some bugs in its networking code.

    * Hogging all GPU. No GPU involved here. ;)

    * Hogging all thread handles, or process handles or other limited operating system resources. You can do that easily on a desktop Windows, but any kind of server operating system has very good protection measures in this field.
    konglooey84 likes this.
  10. Just to build on that:

    The main reason you need the communication and planning is because you can't really predict when a thread will run or the order they'll run in (the operating system's scheduler picks what runs next on a context change) because you can't predict this, any data you share between them needs to be accessed in a way that will ensure that it's accessed at the right time. For example the the first thread says quilter one pick up sissors and cut material, and the second thread says quilter two pick up sissors and cut material, but the program fails because quilter one is using the sissors when quilter two is attempting to pick them up. So you protect the method using locks, so basically, you would say, quilter 1 check if sissors are being used, if not pick up scissors.

    i'm not sure why i needed to tell you this, but i enjoyed the quilting metaphore and wanted to be a part if it :p
  11. so because of the awesome server upgrades and because i was gonna anyway, i am now a diamond supporter

    a.k.a. the addict GF ignoramoose has in his signature =D
    nmanley, JustinGuy and apamment like this.
  12. This is because it is one heck of a metaphor haha
  13. I'm still waiting for the developer who tackles the server dispatcher solution. The one where you put every world on a different server and have a proxy the user connects to. It's not that hard, but moving the (server-side representation of the) player from one world-server to another each time he uses a portal sure is bound to be tricky.
  14. lol

    *meanwhile in quilting class*

    So, in order to make a quilt, Imagine you're writing a multi-threaded java application...
  15. Honestly I think that if a quilting teacher tried to teach quilting that way, their students would probably gouge their own eyes out with their needles :confused:
  16. In our company we have this number guy. Man, he's like the boss of numbers! He sits in his office all day with his big book of numbers. And every time you need one, you go to his office, sit down in his single visitor's chair and ask him about that number. He'll then look it up in his big book and give you an answer. Even more awesome, you can tell him about changed numbers, too!

    So yesterday I went to work. I had to clock in at the gate, so I needed the current time. The clerk at the gate asked me to wait a sec and went to the number guy. He sat down and asked the number guy for the time. Then he came back and gave me the time. I put it down on my time sheet. To make it permanent, I want to the number guy and told him the change for the numbers on my time sheet. Had to wait 10 minutes, there was a long queue of people with time sheets.

    Then I went to the cafeteria to get some coffee. Took quite some time because the clerk at the coffee maker had to check the amount of coffee left with the numbers guy. And he had to tell him, that now there's one less coffee. Then I had to go to the number guy to get by balance. Then the cashier had to go to him to ask for the price of the coffee and then to register the sales.

    Man, our company really lagged yesterday. The management is talking about adding a second number guy. But they are afraid that ever employee will have 2 time sheets and 2 account balances, and that the coffee maker will have 2 amounts of coffee left. That might not work out very well...
    apamment, JustinGuy and Yukon1200 like this.
  17. Needs more quilts.
    darkmoor360, Yukon1200 and Crazy1080 like this.
  18. What if I prefer a sleeping bag?
  19. Guys, Your getting off-topic now.
    apamment likes this.
  20. Upon common customer request our company added a quilting workshop to the factory. I have no idea what they are doing there, but the management says it's good for business. So now there are 10 new guys working there. As I said, I don't know what they are doing, but it seems they are using some kind needles. Different ones. In numbered sizes. So every one of these clown go to the number guy every couple of minutes to get his new number for the needle size. That might not be that bad, but it seems they are also using different colored threads. And guess what? The colors are numbered!

    I'll quite and sue the company for mental damage. But first I'll call my layer. Hey number guy, what's the number for my layer?

    ("quilting workshop"="fancy new server-side mod")
    apamment likes this.