Cuberite Forum
Best way to profile on raspi - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Discussion (https://forum.cuberite.org/forum-5.html)
+--- Thread: Best way to profile on raspi (/thread-1517.html)

Pages: 1 2


Best way to profile on raspi - ThuGie - 07-04-2014

Hey guys,

So i have been running mcserver on my pi with a plugin called skyblocks.
Works kinda ok, plugin still has a few bugs but thats it.

Now. i did notice when even if we did nothing and we just stand at spawn.
The cpu will stil be around 99% and random we even get delays in chat.

This should not be happening right ? we got no mobs spawned at the time.
Just 2 players @ same chunk, doing nothing.
No world generation what so ever, yet its @ 99%

Is there a way i can find out what of mcserver is using it ? profile it or something ?


RE: Best way to profile on raspi - worktycho - 07-04-2014

gprof or callgrind. gprof is faster but the info is not as good. callgrind has better info but is slooow.


RE: Best way to profile on raspi - ThuGie - 07-04-2014

I just need to know what is using it up, and those work on the raspberry pi ?
Do you have a command i could run, as im quite a linux noob.


RE: Best way to profile on raspi - worktycho - 07-04-2014

You'll need a profile build. gprof is slightly easier to use so is probably your best bet. After executing the profile build as normal you then run gprof in the folder to show what was executed. But if you just want to see whats using the CPU you can just use GDB. Break repeatedly and the thing that keeps coming up is what is using the most CPU.


RE: Best way to profile on raspi - ThuGie - 07-04-2014

Yeah.. i think its best i simply, find somebody that wants to play/test on a raspi do that if needed..

Anyway.. am i the only having these huge cpu spikes ? on the raspi ?


RE: Best way to profile on raspi - Seadragon91 - 07-04-2014

(07-04-2014, 04:02 AM)ThuGie Wrote: Yeah.. i think its best i simply, find somebody that wants to play/test on a raspi do that if needed..

Anyway.. am i the only having these huge cpu spikes ? on the raspi ?

I'm on your server.


RE: Best way to profile on raspi - xoft - 07-04-2014

I'm running the Gallery server on a RasPi, it has a lot of things disabled, so the results might be a bit different. It spikes to 100 % CPU when I log in, and then stays at about 10 % CPU for a stationary single player. Of course, when moving across chunk borders, the CPU goes up again since the new chunks need to be compressed and sent to the client.


RE: Best way to profile on raspi - ThuGie - 07-04-2014

Uhm, i notice that default CompressionFactor = 0 ?
So that means the chunks are not compressed at all ? or does it default to i think it was 6 ?


RE: Best way to profile on raspi - worktycho - 07-04-2014

Default to 0 on a pi and 6 everywhere else. pis tend to have faster storage (SD) but slower CPU so xoft decided to disable compression by default on pis.


RE: Best way to profile on raspi - ThuGie - 07-04-2014

Ah i see, then i will keep it that way, i thought it might have defaulted back to 6 if 0.