0

On a normal hardware today this likely does not hurt ever, but on a Raspberry PI it is a bit annoying that the CPU is woken up every 50 milliseconds even for a java application which currently does absolutely nothing.

I verify with strace, that the "VM Periodic Task Thread" is active every 50 milliseconds. A rough answer of what it does is given here, but can I tune the 50 milliseconds somehow?

Community
  • 1
  • 1
Harald
  • 4,113
  • 3
  • 29
  • 61
  • Looks like you aren't running Java SE Embedded which is designed exactly for these kind of devices. Embedded version reduces some VM background activites, e.g. `UsePerfData`, `GuaranteedSafepointInterval`, `CleanChunkPoolAsync` etc. – apangin Jul 09 '15 at 18:06
  • Indeed not, just the plain jvm. – Harald Jul 09 '15 at 20:30

1 Answers1

2

try setting -XX:PerfDataSamplingInterval=xxx, the default is 50 and performance sampling matches the description you linked, so that might be it.

the8472
  • 37,986
  • 4
  • 66
  • 115
  • Looks like this did the trick. Looks like I need to read more about this sampling to figure out how high I can put the interval. – Harald Jul 09 '15 at 20:31