garbage-collection

Full GC (Heap Inspection Initiated GC)

人盡茶涼 提交于 2020-06-27 17:55:06
问题 I am struggling to hunt down the "Full GC" on our production JVM. Every day at around midnight the STW occurs without apparent reason, quite deadly for 10-11 sec. Here is the gc log: Java HotSpot(TM) 64-Bit Server VM (25.131-b11) for windows-amd64 JRE (1.8.0_131-b11), built on Mar 15 2017 01:23:53 by "java_re" with MS VC++ 10.0 (VS2010) Memory: 4k page, physical 16584284k(13074876k free), swap 23137624k(18439472k free) CommandLine flags: -XX:GCLogFileSize=1024000 -XX:InitialHeapSize

GetRef's memory consumption (garbage collection) changed with KB4525236

荒凉一梦 提交于 2020-06-24 22:01:10
问题 We experience out-of-memory issues after installing KB4525236 on our Windows 2016 Servers/Windows 10 Clients. This security fix seems to have changed the moment when memory is garbage collected when calling a function through GetRef . Pré KB4525236 Each instance created in a function called through GetRef got garbage collected as soon as the instance variable was set to nothing Post KB4525236 Each instance created in a function called through GetRef remains in memory and is garbage collected

Times in G1GC logs

我只是一个虾纸丫 提交于 2020-06-23 11:40:45
问题 I've read a few descriptions of different times printed in G1GC logs but couldn't really prove/understand when I produced them locally. For example, following log was produced on my PC with Java 11. I wanted to know, what's the difference between 0.500ms in the first line vs 0.01s in the second? Was the application paused (because of STW) for 0.500ms or for 10ms (0.01s)? I tried tools like GCeasy, it shows max pause time of 10ms, and in cases where Real = 0.00, GCeasy shows min pause of 0ms.

Times in G1GC logs

痞子三分冷 提交于 2020-06-23 11:40:19
问题 I've read a few descriptions of different times printed in G1GC logs but couldn't really prove/understand when I produced them locally. For example, following log was produced on my PC with Java 11. I wanted to know, what's the difference between 0.500ms in the first line vs 0.01s in the second? Was the application paused (because of STW) for 0.500ms or for 10ms (0.01s)? I tried tools like GCeasy, it shows max pause time of 10ms, and in cases where Real = 0.00, GCeasy shows min pause of 0ms.

Times in G1GC logs

孤人 提交于 2020-06-23 11:39:48
问题 I've read a few descriptions of different times printed in G1GC logs but couldn't really prove/understand when I produced them locally. For example, following log was produced on my PC with Java 11. I wanted to know, what's the difference between 0.500ms in the first line vs 0.01s in the second? Was the application paused (because of STW) for 0.500ms or for 10ms (0.01s)? I tried tools like GCeasy, it shows max pause time of 10ms, and in cases where Real = 0.00, GCeasy shows min pause of 0ms.

sun.misc.Perf documentation or alternative

这一生的挚爱 提交于 2020-06-23 07:55:13
问题 I understand that the sun.* packages are not part of the official Java API. However, I need to use some functionality similar to what Perf offers: specifically Basic JVM Metrics (Heap, Threads, PermGen, etc), JvmStat counters to GC, etc. Does anybody know a wrapper library around Perf and PerfInstrumentation which comes with a good documentation. I need to use it as an API so e.g. the VisualVM's Tracer plugin is not good enough. Anybody has a comment on that? 回答1: There are wrapper around JVM

Kivy : Error weakly-referenced object (in a clock function) no longer exists

家住魔仙堡 提交于 2020-06-17 03:53:25
问题 So here is my error code I think there's something hard in this error, i looked on forums but couldn't find out. And ... i have the error on my phone (with kivy launcher python 3 and when i build with buildozer) but not on my computer (ubuntu 18.0.4 and windows 10) The error, from what i understand, comes from the garbage collector that delete a reference and the code try to access the reference after the garbage collector. but i am not sure if I rly understand the garbage collector thing

what are count0, count1 and count2 values returned by the Python gc.get_count()

依然范特西╮ 提交于 2020-06-15 04:13:29
问题 The documentation for python's gc package says this about gc.get_count(): gc.get_count() Return the current collection counts as a tuple of (count0, count1, count2). Here is a sample program: import gc if __name__=="__main__": print("making some data") for k in range(10): root = [range(i,1000) for i in range(1,1000)] print("len(gc.get_objects):",len(gc.get_objects())) print("gc.get_stats:",gc.get_stats()) print("gc.get_count:",gc.get_count()) Here is the output: making some data len(gc.get

How is it decided that how much physical memory is to be allocated to java heap?

对着背影说爱祢 提交于 2020-06-13 00:47:06
问题 I have machine with 16G RAM. I run a java application with arguments -Xms9G -Xmx9G . When I run top command I see that my java process is taking 13.8g VIRT , but only 4.6g of RES . PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 5019 root 20 0 13.8g 4.7g 18m S 0.7 30.7 3:28.39 java On running pmap command, I see that only ~3.9g of heap is present as RES , rest 5.7g is in virtual . Address Kbytes RSS Dirty Mode Mapping 0000000580000000 9452384 4074228 4074228 rw--- [ anon ] Upon

kubernetes pod memory - java gc logs

安稳与你 提交于 2020-06-09 18:42:09
问题 On the kubernetes dashboard, there's a pod wherein the Memory Usage (bytes) is displayed as 904.38Mi . This pod holds the java app that was ran with -Xms512m -Xmx1024m , and on kubernetes deployment file -> requests.memory = 512M , limits.memory = 1.5G . I've enabled gc logs and seeing these on the pod logs: [2020-04-29T15:41:32.051+0000] GC(1533) Phase 1: Mark live objects [2020-04-29T15:41:32.133+0000] GC(1533) Phase 1: Mark live objects 81.782ms [2020-04-29T15:41:32.133+0000] GC(1533)