4 ms·
My first suggestion would to see if the lag corresponds to a full GC. Google can tell you the proper incantation to log GC events. If it is caused by a full GC
by pirocks 6y ago
My first suggestion would to see if the lag corresponds to a full GC. Google can tell you the proper incantation to log GC events. If it is caused by a full GC you probably have some kind pathological behavior causing it . Allocating more RAM or changing GC args may help. Otherwise I would recommend profiling. You can use visualvm which should come with your jdk for that.
- jzer0cool 6y agoIf given a mac binary (and only that, only see it as a mac app and unsure here if there is a wrapper around it to make it so), is there a typical way to run it like pure java binary so I can add any xarg params for running it? I'll probably need to due a quick check on how a wrapper might have been created as it looks like a mac app so I can separate out the pure java binary. Memory: As far as I see, there is a built-in profiler within the app showing the memory usage. It has a high limit to 1gb and I see it rise quickly to about third of the way and repeated (quickly, about every 2 seconds) garbage collect down to 200mb. So it appears memory consumed very fast and than it garbage collects. Then repeats.
- Someone 6y agoChances are that your Mac binary is a MacOS package (https://en.m.wikipedia.org/wiki/Package_(macOS) https://en.m.wikipedia.org/wiki/Package_(macOS): “In the Apple macOS operating system, a package is a file system directory that is normally displayed to the user by the Finder as if it were a single file”) Right-click the binary and select “Show package contents” to peek inside. Chances are you’ll find a code signature, an icon, various support files, one or more jars and an executable that launches the main jar. Figuring out what the main jar is typically is easy. You may have to experiment to find out what the current directory has to be when launching it.
- jzer0cool 6y agoAppreciate pointing me in the right direction! Show package contents is exactly what I was looking for. I was looking in the wrong spot before with App Info (cntr + i). Thought I share where I am at: I think I'm in the right direction now. There are log files associated with previous crashes due to out of mem errors. The app here also includes a java vm_param file so I can maybe experiment with a few settings here and hoping here by decreasing the GC recycling time maybe things improve. Also, I will be looking whether the app may have somehow embedded a jvm (possible?) rather than using the one I have provided.