Java and the 1 CPU issue

Discussion in 'Bukkit Help' started by ChadTheDJ, Dec 27, 2011.

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

    ChadTheDJ

    I know this may have been stated somewhere here but I couldn't find the forum searching for it.

    So I have a 64bit server that uses a 6 core processor. So, I found out recently that java is only using one of my cores and the other 5 are not even touched. This to me is crazy as I am paying for so much power but MC can only utilize 1/6th of the processing capabilities of my server.

    I read this forum post about putting flags to add garbage collection but still only uses one core:

    http://www.minecraftforum.net/topic/63836-making-your-server-lag-less-by-tuning-java-settings

    Is there a workaround for this? Is there a way to make java multi-threaded?

    Actually this is more meant for the bukkit help forum, whoops

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 22, 2016
  2. Offline

    NuclearW

    And off to the Bukkit Help forum it goes.
     
  3. Offline

    ChadTheDJ

  4. Offline

    pyraetos

    First off, the same thing happened to me. Right before I made my server I bought a 6core CPU but ended up selling it and buying a higher speed 4core, which hasn't failed me yet.

    As for Java, the programmer of the application decides how multithreaded it will be. Both the client and server of Minecraft have a few threads for different purposes, but the main one is huge and you cannot do anything about it. On the bright side, I run different types of servers on my machine which obviously use different threads than the Minecraft server. But in the end, 6 cores would be useless for me.
     
  5. Offline

    ChadTheDJ

    So my question after reading all of the tweaks on the thread I posted, there is no way to really utilize all 6 cores? How are people getting around this when they host 500 people like super earth? Do they get a large server and virtualize a machine with a large single core processor? It seems silly that java doesn't just by default take advantage of the power of the machine without first adding all of the advanced tweaking.
     
  6. Offline

    pyraetos

    Well, my processor is FAST. I don't think it would be the limiting factor as far as players go on my server.
     
  7. Offline

    ChadTheDJ

    What processor do you have if you don't mind me asking?
     
  8. Offline

    pyraetos

    I originally bought a Phenom X6 2.6GHz but sold it and bought a Phenom X4 3.5GHz factory speed (it comes with a bad fan)
     
  9. Offline

    ChadTheDJ

    So really in renting minecraft servers, the clock of the single core of the processor is the selling point. Now I only assume the larger servers have even more of a bigger processor to utilize. I see some servers hosting their maps on separate java server instances and I guess that is how they work around that because they can get each server to use 1/4th of the processing power (or whatever they use). This makes me even more want cross server teleportation but I would assume this will not happen (via vanilla client)
     
  10. Offline

    moose517

    just wait for spout, it will be natively multithreaded.
     
  11. Offline

    Nathan C

    The big servers use the best server grade Intel CPU's on the market, that is how. The one's they use are 4 core Sandy Bridge based E3 processors.

    For example LegendaryCraft, which has around 250+ on at any given time uses a Intel E3-1290.

    You won't be able to host that much on a AMD processor, they are just too weak core for core, compared to Intel.
     
  12. Offline

    ChadTheDJ

    @moose517 I really don't like the use of mods much as my thought is that the more mods you have, the more chances to have issues of things breaking. I would like to see bukkit explore the possibilities of making their server platform take advantage of the hardware BUT that's the downfall of java for you.

    I guess I will be looking into more i5 sandy bridge dual core servers rather then dish the money out for a quad-core by wasting cores.
     
  13. Offline

    JohnTheRipper

    Sandy bridge at high clock speeds (i7-2600 or E3-1275). 3.4GHz per core is about the fastest you'll see, and it's fast enough for well over 100 slots, maybe over 200. And they of course store everything on a SSD/RAMdisk/RAID 10 array (with 10k RPM or 15k RPM drives). And they have ridiculous amounts of RAM. And a fast enough network to withstand both player traffic load and network attacks.
     
  14. Offline

    Daniel Heppner

    You can overclock an i5 to 5ghz. It's been done. :)
     
  15. Offline

    JohnTheRipper

    Yeah, and you can do the same with a i7 (I think they hit 4.9GHz on air alone).
     
  16. Offline

    Bertware

    I have an Intel Core I7-2600K
    Bought a €37 fan (Scythe Mugen Rev. B)
    flawlessly works at 4.5GHz.
    Intel Speedstap causes the CPU to clock at 1.6GHz when there is nothing to do, so it stays cool.
    When I get 100%CPU, it works at 8 threads at 4.5GHz
    I also clocked it to 4.6GHz, but when you go higher then 4.5 temperatures are raising very fast compared to the speed.
    I7-2600 Should get 5.2Ghz at 2 cores.

    4.5GHz - 100% load - 60 to 65°C - 4Cores 8 Threads
    4.6GHz - 100% load - 70 to 75°C - 4Cores 8 Threads

    For Java you just need one, fast core.

    In fact for java it doesn't matter if you get a I5-2500K or a I7-2600K
    I7 only adds HT and some other extra's, but I5 can reach 4.5GHz too
     
  17. Offline

    ChadTheDJ

    Yeah I was going to overclock the i5 safely enough to I can collocate the box at a datacenter. I personally haven't seen really any servers out there for rent that have i5s (Mostly i7s and Xeon).

    Have you had more heating issues with i5s rather then i7s for overclocking?
     
  18. Offline

    Evenprime

    Why do people keep saying it's Java's fault for not utilizing more cores? This has nothing to do with Java, and everything with the Minecraft server not being a (well) multithreaded program. Java can utilize as many cores as it wants, if the application is written to do so. Take any old computer game (10 years or older) that's a .exe (written in C++ most likely). It will only utilize one core, no matter how many you have available.
     
  19. Offline

    Bertware

    I think there shouldn't be a real difference in temperature between a core I5 and a core I7 (If you turn HyperThreading off)
    Note that every CPU is different, so every CPU will have different limits.
    I noticed that Temperature began to Increase very steep from about 4.4 - 4.5GHz.
    Just make sure you DON'T overclock with Stock cooler, get a better cooler for less then €50, you'll be glad to have another cooler later.

    I'ld really recommend scythe mugen Rev.B., as it's keeping my CPU very cool (massive cooling block, about 11*13*15 cm with 120mm fan) Or liquid cooling.

    Note that you also have to watch for a good MotherBoard, as it has to keep track of the voltages, temperatures, speeds,... (I'm very satisfied of my Asus P67 Mobo)

    greets, hope this helped you a bit out on choosing your server setup.
     
Thread Status:
Not open for further replies.

Share This Page