Posts: 372
Threads: 29
Joined: Mar 2011
Thanks: 1
Given 21 thank(s) in 18 post(s)
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 ?
Posts: 783
Threads: 12
Joined: Jan 2014
Thanks: 2
Given 73 thank(s) in 61 post(s)
gprof or callgrind. gprof is faster but the info is not as good. callgrind has better info but is slooow.
Posts: 372
Threads: 29
Joined: Mar 2011
Thanks: 1
Given 21 thank(s) in 18 post(s)
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.
Posts: 783
Threads: 12
Joined: Jan 2014
Thanks: 2
Given 73 thank(s) in 61 post(s)
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.
Posts: 372
Threads: 29
Joined: Mar 2011
Thanks: 1
Given 21 thank(s) in 18 post(s)
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 ?
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1075 thank(s) in 852 post(s)
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.
Posts: 372
Threads: 29
Joined: Mar 2011
Thanks: 1
Given 21 thank(s) in 18 post(s)
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 ?
Posts: 783
Threads: 12
Joined: Jan 2014
Thanks: 2
Given 73 thank(s) in 61 post(s)
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.
Posts: 372
Threads: 29
Joined: Mar 2011
Thanks: 1
Given 21 thank(s) in 18 post(s)
Ah i see, then i will keep it that way, i thought it might have defaulted back to 6 if 0.