Cuberite Forum
Profiling MCServer - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Development (https://forum.cuberite.org/forum-13.html)
+--- Thread: Profiling MCServer (/thread-1315.html)

Pages: 1 2


Profiling MCServer - bearbin - 01-15-2014

Here are some profiles of MCServer. Please add any if you have some, along with a description.

My two are made by callgrind, on x86_64 Linux Ubuntu.

Loading and Sitting
Generating a new World


RE: Profiling MCServer - tigerw - 01-15-2014

It's not meant to be human-readable, is it?


RE: Profiling MCServer - worktycho - 01-15-2014

No, you need kcachegrind

Looks like Compression is one of the biggest single things in these profiles. It might be worth tuning the compression value a little.


RE: Profiling MCServer - tigerw - 01-15-2014

Okay, thanks.

How does the redstone simulator perform, could I ask?


RE: Profiling MCServer - xoft - 01-15-2014

I have no idea how to interpret those.

Tigerw, if you want easy-to-get, easy-to-interpret results on Windows, try compiling the solution in ReleaseProfile mode and then using the $/MCServer/run_profile.cmd script. Have a look inside the script, first, it will point you to the tools you need to install. You may need to run the script elevated (as admin) on WinVista+.

It produces results like these:
[Image: profiler_gen.png]


RE: Profiling MCServer - worktycho - 01-16-2014

@tiger. The readstone simulator isn't coming up on the traces much so its very fast when not being used.


RE: Profiling MCServer - tigerw - 01-16-2014

Thanks xoft and tycho.

I'll have a look at profiling on windows soon.


RE: Profiling MCServer - xoft - 01-16-2014

Currently the biggest CPU eater for me is the mob processing - it allocates and deallocates several structures for all mobs every tick; the allocations are killing everything.


RE: Profiling MCServer - worktycho - 01-17-2014

For me mobs are using about a third of cpu but there spread over a lot of functions so its hard to find somewhere worth optimising. For me the big cpu killer is compression, consistently using a third of cpu regardless of load. It might be worth tuning the compression parameters or looking at why so many chunks are being saved.


RE: Profiling MCServer - NiLSPACE - 01-17-2014

(01-17-2014, 02:34 AM)worktycho Wrote: For me mobs are using about a third of cpu but there spread over a lot of functions so its hard to find somewhere worth optimising. For me the big cpu killer is compression, consistently using a third of cpu regardless of load. It might be worth tuning the compression parameters or looking at why so many chunks are being saved.

I think the mob code was slow because it had to gather all the mobs each tick or something, but that might already have changed.