Other Java Optimizations

Discussion in 'Bukkit Discussion' started by Derjyn, Jul 18, 2012.

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

    Derjyn

    Greetings,

    I am going to admit, I didn't do a search on this subject. I did previously some time ago, and found the typical "-Xms" and "-Xmx" arguments. Boring. I recently read a white paper, and several various pages on the subject of fine-tuning Java performance. I'm wondering if anyone else has gone deeper than the "typical" command line arguments as well.

    I've gone through seven different configurations thus far- doing 3 runs each, noting the server start times and checking performance in-game. 1 configuration stands out to be certain, as the mean start time beat out the other configurations by a margin. There are many more configuration variations, and in order to better hone in on the best setup, I'm trying to understand each of the settings a bit more. Some of them make sense, some not-so-much.

    I'd love to brain-storm with others who have attacked this as well. I don't want to just spill this stuff out yet, as I know it gives my server a bit of an edge, not to mention all the variables can have the opposite effect on a server and slow it down. So people need to really understand this a little more than "copy/paste".

    Perhaps a good write-up will be done on the wiki, or somewhere at least- once the subject has been beaten into submission a little more. Until then, some keywords so those that HAVE indeed tinkered around with this know I'm not mucking about: AgressiveOpts, LargePageSizeInBytes, Xss... those are just a few.

    Another thing to note is, I want to do better profiling of each of the setups. It's just a rough run right now, but to really do this right, proper profiling needs to be done. Any suggestions here would be useful.
     
  2. Offline

    TnT

    If you aren't going to read up on each optimization and how it will affect your server, you are best off sticking with -Xmx and -Xms values.

    Most of the other flags will be server dependent. Aka, a server running one set of flags will have different effect than another server running a different set of flags - mostly due to how your plugins make use of Java.
     
  3. Offline

    Derjyn

    I just stated... I read a freaking white paper and several pages on the subject. I do understand each of the flags and settings somewhat, but want to start a dialogue with others that have ventured into this realm. Those -Xmx/-Xms flags are pretty old, and while still relevant, many new optimization possibilities have been added since Java 5.

    Yes, the settings are server environment dependent. Hence why I want to get a pool of settings, profile them across different setups, and share results. In my humble opinion, the confines of "stick to -Xmx" are passe. Somebody, eventually, has to delve into the more advanced.

    I agree that those with no understanding should stick to the basics. But if someone can get as far as setting up a CraftBukkit server and several plugins, I don't see why they can't tinker with some advanced Java flags.
     
  4. Offline

    TheBeast808

    Most of the newer optimizations won't work well for MC servers. Many that you see in people's startup scripts, like -XX:+UseParallelGC, won't benefit their server at all. UseParallelGC may benefit some servers, but as Oracle stated, it's meant to benefit servers with multiple processors and a giant 10GB+ heap. For 99% of Minecraft servers, the basic -Xincgc that is recommended will be the best. As for others, like caching and optimizing strings, the results are either small or nonexistent. Both of those two options make tradeoffs to try and get better performance. I think it's good that the only recommended options are the default options because that's all that you can really guarantee will work for the server.
     
  5. Offline

    Derjyn

    Sorry for the delayed response... so then, those various flags (such as UseParallelGC) would be beneficial to a server running say, an Intel Core i7 with 32GB of RAM (24 of that allotted to Java)?
     
  6. Offline

    TnT

    Perhaps, depending entirely on your server setup and plugins used.
     
  7. Offline

    Derjyn

    Well I am running ~40 plugins. Some of the standard ones- such as permissions, economy, region, etc. plugins. Various "fun" plugins, and a few utility. Going to be trimming the fat soon, though only a few plugins will be going.

    Everyone keeps saying "depending on the plugins used", but I have yet to see any sort of documentation on what plugin setups do what as far as performance is concerned. I've only been able to roughly stress test and do performance comparisons... I am assuming there is no clear and concise answer as to plugin performance based on "setup"?
     
  8. Offline

    TnT

    Mostly because its up to each plugin dev to write that, and that's not likely to happen any time soon. There is no clear and concise answer, which is why you get told exactly what I stated above. Best to just go and test different flags and see how they effect your server with your current setup.
     
  9. Offline

    ZachBora

    I know my host did some different flags because we had memory issues with WorldEdit. But I don't know what they put there.
     
  10. Offline

    Derjyn

    Hey- thanks TnT. I kind of figured this was the case... but a bit of me hoped there was a standard or an effort to document performance issues in some sort of organized manner. I guess it's just a jumbled mess of wires then, heh. As I get used to the myriad of plugins running on the server, I start to see which plugins suck up the juice and which ones play nice.

    I'd love to see some database, where many servers can contribute performance stats of each plugin combined with their setup- both in hardware and other various specs... but at the same time I like having in edge in being able to offer performance to my members. Nearly everyone that joins comments on how smooth everything runs! So those aforementioned Java tweaks aren't needed- but I am the type who likes to squeeze every bit of horsepower I can out of a machine :cool:
     
Thread Status:
Not open for further replies.

Share This Page