5 ms·
"As such, it is supposed to require fewer CPU and memory resources, provide better startup times, and be easier and cheaper to deploy." So we don't even know i
by Thaxll 4y ago
"As such, it is supposed to require fewer CPU and memory resources, provide better startup times, and be easier and cheaper to deploy."
So we don't even know if it actually makes things faster? Startup are a none issue, CPU / memory is but you need proof for that.
Graal does not support ZGC or Shenandoah so it's hard to say if the G1 version from Graal is up to speed.
- vips7L 4y agoAre they using Graal enterprise? Last I checked Community Edition of native image uses the serial collector not G1.
- fniephaus 4y agoThe students used both, the community and enterprise editions of GraalVM. Indeed, G1 is an enterprise feature: https://www.graalvm.org/22.2/reference-manual/native-image/optimizations-and-performance/MemoryManagement/ https://www.graalvm.org/22.2/reference-manual/native-image/o...
- majidazimi 4y ago>Startup are a none issue Yes it is. Developing any short term job -- that runs multiple seconds and goes away -- like lambda or k8s jobs with Java is meaningless for exactly this reason. The startup time is longer than the run time.
- HideousKojima 4y agoA Minecraft server is not a short term job.
- vgalin 4y agoI guess it can be in a specific case: minigames servers (such as Hypixel), which are just a bunch of servers "connected" together. Players start into a "lobby" server, where they can choose a minigame, and are then sent to another server where they spend a few minutes.
- curtainsforus 4y agoThe game servers don't restart after the end of a round, though, do they? I'd imagine they kick the players back to the lobby, reset the in-server game, and then tell the lobby to send the next batch of players.
- solarkraft 4y agoThis is fairly certainly how it used to be done. Besides, you can have the server idle a good bit before actually letting players in.
- terafo 4y agoYou assume that load is constant, it isn't. And load varies not only with amount of players on minigames server, but with changes in distribution of players between minigames also.
- curtainsforus 4y agoThere's usually more than one server per minigame. You could see it in the url you were redirected to; they had more servers running the more popular minigames. Each minigame has a player limit, so the maximum load on any given minigame server is known (within the bounds of the minecraft sub-superset that makes up that minigame- but usually the minigames are deliberately limited/bounded in how much computation they need, as opposed to vanilla Minecraft). Extra players get sent to the next available server. If there's consistent overflow, at that point you might turn on a whole new server, or change a server's gamemode (I don't know to what degree Hypixel actually did/does this, or how often it's actually necessary).
- antome 4y agoThis is a Minecraft server, so it's going to be running 24/7.
- terafo 4y agoI see you aren't familiar with modern state of Minecraft servers. Due to Minecraft being limited to a one core big servers actually aren't a single instance. They use proxy servers(such as BungeeCord and it's forks) which distributes load between several lobby servers and from there people join one of custom gamemodes(Skyblock, Bedwars, etc). This allows for tens of thousands of people to play simultaneously, but not in the single world, while SMP(Survival Multiplayer) servers can run couple of hundreds at most. These giant servers are heavily containerized and automatically scale under load, so spinning up and shutting down servers is a pretty normal thing. And there have been some attempts to make Minecraft to run a single world on multiple instances(MultiPaper and some private ones), so even for usual SMP server it can be a commonplace soon as player join and leave.
- doodlesdev 4y ago> And there have been some attempts to make Minecraft to run a single world on multiple instances(MultiPaper and some private ones) First time I hear about MultiPaper, another idea I had which I din't know someone was already working on LOL. It's a pretty promising idea considering the current performance problems of the game. This could possibly allow thousands of players in the same server which would be AMAZING, almost a completely different game. Imagine if MultiPaper was compiled to native using GraalVM.
- mcculley 4y agoI encourage my competitors to keep thinking this.
- kaba0 4y agoThe JVM can start up in less than 0.1 seconds. Depending on the amount of classes being loaded it is not an issue even for lambda and k8s jobs.
- CSDude 4y agoYou clearly did not deploy enough classes on Lambda to have more than 10 seconds warmup on a trivial Java based Lambda function.
- bitcharmer 4y agoWarm-up is more a function of invocation count rather than time as you seem to be suggesting here
- vips7L 4y agoThe VM starts up plenty fast. The slow part is when people use reflective dependency injection containers that take seconds to scan the class path before before executing.
- imtringued 4y agoThis is why frameworks like Micronaut exist.
- vips7L 4y agoMicronaut, Quarkus, Avaje Inject, CDI Lite. Plenty of solutions if people would stop reaching for Spring.
- deleted 4y ago[deleted]
- fniephaus 4y agoDisclaimer: I work on the GraalVM team. The students "measured noticeable reductions in terms of memory footprint of up to 43%" [1] in some preliminary experiments. More from the accompanying blog post: "We also hope that the Minecraft community builds on our work and helps benchmark different configurations for native Minecraft servers in more detail and in larger settings." Please feel free to share any numbers on CPU/memory usage with us! [1] https://medium.com/graalvm/native-minecraft-servers-with-graalvm-native-image-1a3f6a92eb48 https://medium.com/graalvm/native-minecraft-servers-with-gra...
- solarkraft 4y agoWhy is this? I thought the JVM already did somewhat decent JIT compilation ... If I understand the article correctly, you're preempting all possibly unoptimized/expensive code paths (reflection) by attempting to literally execute all of them? While it's a cool experiment, isn't it a bit error-prone (besides being a lot of effort of course, but playing Minecraft on the side does sound pretty fun!)?
- kaba0 4y agoThe JVM is likely to beat AOT compiled java code in almost all cases - but due to Graal having a closed-world assumption (e.g. no unknown class can be loaded, so a non-final class knows that it won’t be overridden allowing for better optimizations, limited reflection allows for storing less metadata on classes, etc) it does allow for significant memory reduction. Also, escape analysis is easier in an offline manner.
- pvillano 4y agocan't that all be done speculatively with de-optimization /s
- fniephaus 4y agoJIT compilation requires additional CPU and memory resources at run-time, which AOT compilation can avoid. This also means that for a native executable, the compilation work only needs to be done once at build-time and not per process.
- spullara 4y agoIt is much worse than this because the free version of graalvm only supports the serial garbage collector. Minecraft servers and clients should be using ZGC to get rid of garbage collection pauses.
- Kukumber 4y agostartup time is SUPER important lets you spawn new game instances on the fly, reduce time spent loading the chunks and game data you save a lot of money when you scale, and you improve latency, people don't complain with huge loading time and stutters for fresh servers ask anybody working on the industry fun fact, that's the first thing Riot did when they acquired Hytale They rewrote their C# client to C++ for portability And they rewrote their Java server to C++ for performance (and cost saving) Tech Change: https://hytale.com/news/2022/7/summer-2022-development-update https://hytale.com/news/2022/7/summer-2022-development-updat...