Forum Stats

  • 3,873,719 Users
  • 2,266,633 Discussions


Why a simple Java RMI call is causing CPU spike and GC?

I created a simple RMI server and client using the steps and programs mentioned at

When I profile (using YourKit) the client program (, I see a spike in CPU (around 10% usage) and I also see a GC. I am curious about why this simple program is causing a GC. There is plenty of heap memory still available.

I can see "RMI RenewClean" and "RMI Scheduler" threads in the profiler. Are these threads causing the GC? I am wondering why a simple RMI call is causing GC. Could someone please provide some input? I attached YourKit snapshot here:

I tried searching on internet but couldn't find anything related.