The development of the collection of vehicle data program ran for 3-5 hours, the following results will appear
The Discovery program runs the memory in these several red dots fluctuation, in the cpu100% appears for a period of time the program will automatically end.
Later, the use of tool commands to analyze the problem is due to insufficient memory leading to the GC because GC Task thread occupies a higher CPU.
The specific steps are as follows
PS-MP 16991-o thread,tid,time |sort-rn print CPU highest thread
printf "%x\n" 17864 converts the thread ID to 16
Jstack 16991 |grep 42b2-a 30 Print stack information
This phenomenon is found to be due to memory problems, dump at the peak of memory
jmap-dump:live,format=b,file=xxx.xxx [PID]/path
Then there are a number of tools to analyze the dump memory, such as JPROFILER,JVISUALVM. But the recommended use of Jprofiler
This has a little trick with Jprofiler, the dump suffix to be changed to. Hprof can be opened by Jprofiler.