{"id":179309,"date":"2013-05-11T12:13:06","date_gmt":"2013-05-11T08:13:06","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=179309"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=179309","title":{"rendered":"<span class=\"post_title\">\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u043e\u0434\u043d\u043e\u0433\u043e garbage collection&#8217;\u0430<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t\u042d\u0442\u0430 \u043f\u043e\u0443\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043f\u043e\u0432\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0432\u0430\u0436\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0442\u044c \u043d\u0430\u0432\u044b\u043a\u0438 \u0433\u0443\u0433\u043b\u0435\u043d\u0438\u044f, \u0438 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u044f \u0431\u043e\u0440\u043e\u043b\u0441\u044f \u0441 \u0435\u0436\u0435\u0447\u0430\u0441\u043d\u044b\u043c \u043f\u043e\u043b\u043d\u044b\u043c Garbage collection.<\/p>\n<h3>\u041a\u0440\u0430\u0442\u043a\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b<\/h3>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u044b \u043c\u0438\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435 \u043e\u0434\u0438\u043d \u0438\u0437 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b (\u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043d\u0430 Tomcat) \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0442\u043e\u043c\u043a\u0430\u0442\u0430, \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e \u0441\u0430\u043f\u043f\u043e\u0440\u0442 \u0437\u0430\u043f\u0430\u043d\u0438\u043a\u043e\u0432\u0430\u043b, \u0443\u0432\u0438\u0434\u0435\u0432 \u0432 \u043b\u043e\u0433\u0430\u0445 \u043f\u043e\u043b\u0443\u0442\u043e\u0440\u0430\u0441\u0435\u043a\u0443\u043d\u0434\u043d\u044b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0438 GC.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0412\u043e\u043e\u0431\u0449\u0435, \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 (FX trading platform \u0432 \u0438\u043d\u0432\u0435\u0441\u0442\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0431\u0430\u043d\u043a\u0435) \u043b\u044e\u0431\u043e\u0439 \u0437\u0430\u043f\u0443\u0441\u043a GC \u0431\u043e\u043b\u044c\u0448\u0435 50 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434 (ms) \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0439\u0441\u0442\u0432\u043e \u0441\u0430\u043f\u043f\u043e\u0440\u0442\u0430, \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u044f\u0449\u0435\u0433\u043e, \u043a\u0440\u043e\u043c\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0447\u0435\u0433\u043e, \u043b\u043e\u0433\u0438 GC, \u0430 GC \u0431\u043e\u043b\u044c\u0448\u0435 100 ms \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442 \u0438\u0441\u0442\u0435\u0440\u0438\u043a\u0443. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0443\u0432\u0438\u0434\u0435\u0432 \u0432 \u043b\u043e\u0433\u0430\u0445 1.45 \u0441\u0435\u043a\u0443\u043d\u0434, \u043e\u043d\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u0430\u043d\u0438\u043a\u043e\u0432\u0430\u043b\u0438. \u041c\u043d\u0435 \u043f\u043e\u0432\u0435\u0437\u043b\u043e \u0431\u044b\u0442\u044c \u043d\u0430 \u00ab\u0432\u0442\u043e\u0440\u043e\u0439 \u043b\u0438\u043d\u0438\u0438 \u043e\u0431\u043e\u0440\u043e\u043d\u044b\u00bb \u0432 \u0442\u043e\u0442 \u0434\u0435\u043d\u044c, \u0438 \u044f \u043d\u0430\u0447\u0430\u043b \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f, \u0432 \u0447\u0435\u043c \u0436\u0435 \u0434\u0435\u043b\u043e.<\/p>\n<h3>\u0425\u043e\u0434 \u0440\u0430\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f<\/h3>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u043f\u043e\u043b\u0435\u0437 \u0432 \u043b\u043e\u0433\u0438. \u0418 \u0443\u0432\u0438\u0434\u0435\u043b:<br \/>  <code>[Full GC (System) 25.575: [CMS: 20700K-&gt;22393K(655360K) &lt;...&gt;<\/code><\/p>\n<p>  \u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0437\u0434\u0435\u0441\u044c \u2014 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u044d\u0442\u043e System \u2014 \u0442.\u0435. \u043f\u043e\u043b\u043d\u0430\u044f \u0441\u0431\u043e\u0440\u043a\u0430 \u043c\u0443\u0441\u043e\u0440\u0430 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u043c <code>System.gc()<\/code>. \u0414\u0443\u043c\u0430\u044e, \u0431\u0443\u0434\u0435\u0442 \u043b\u0438\u0448\u043d\u0438\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0432 \u043a\u043e\u0434\u0435 \u044d\u0442\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041b\u0438\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0442\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/b><\/p>\n<div class=\"spoiler_text\">\u0415\u0441\u043b\u0438 \u0431\u044b\u0442\u044c \u0441\u043e\u0432\u0441\u0435\u043c \u0447\u0435\u0441\u0442\u043d\u044b\u043c, \u0442\u043e \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u0430\u0432\u0434\u0430 \u2014 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432\u044b\u0437\u043e\u0432 <code>System.gc()<\/code>, \u0441\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0431\u043b\u0430\u0433\u043e\u0439 \u0446\u0435\u043b\u044c\u044e. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0441\u0442\u0430\u0440\u0442\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u0440\u0435-\u043a\u0435\u0448\u0438\u0440\u0443\u0435\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u00abstatic data\u00bb \u2014 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u0445, \u0432\u0430\u043b\u044e\u0442\u0430\u0445 \u0438 \u0442.\u043f., \u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u044d\u0442\u043e\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u043c\u0443\u0441\u043e\u0440\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438 \u0432\u0441\u0435 \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044f, \u0438 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u043c\u044b \u043e\u0442\u0440\u0430\u043f\u043e\u0440\u0442\u0443\u0435\u043c, \u0447\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0430\u0441\u044c, \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c <code>System.gc()<\/code>, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043e\u0434\u043d\u043e \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u043b\u0438\u0448\u043d\u0435\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u0430\u043c\u044f\u0442\u0438. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u043a\u0430\u0436\u0434\u0443\u044e \u043d\u043e\u0447\u044c \u0432 17:00 \u043f\u043e \u041d\u044c\u044e-\u0419\u043e\u0440\u043a\u0441\u043a\u043e\u043c\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0439 \u0434\u0435\u043d\u044c, \u0438 \u0432\u0441\u044f \u043d\u0430\u0448\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0443\u0445\u043e\u0434\u0438\u0442 \u0432 \u043e\u0444\u0444\u043b\u0430\u0439\u043d \u043d\u0430 5 \u043c\u0438\u043d\u0443\u0442 (maintenance mode), \u0441 \u0446\u0435\u043b\u044c\u044e \u0443\u0431\u0440\u0430\u0442\u044c \u043d\u0430\u043a\u043e\u043f\u0438\u0432\u0448\u0438\u0439\u0441\u044f \u0437\u0430 \u0434\u0435\u043d\u044c \u043c\u0443\u0441\u043e\u0440 \u0438 \u0434\u0435\u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c. \u0412 \u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u0432\u0440\u0435\u043c\u044f, \u043c\u044b \u0441\u0442\u0430\u0440\u0430\u0435\u043c\u0441\u044f \u0438\u0437\u0431\u0435\u0433\u0430\u0442\u044c old-gen collection, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u0430\u0436\u0435 ParNew-\u0441\u0431\u043e\u0440\u043a\u0438, \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0449\u0438\u0435 20-40 ms, \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u043f\u043e\u0440\u043e\u0439 \u043d\u0435\u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438.<\/div>\n<\/div>\n<p>  \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c, \u043f\u043e \u0441\u0442\u0430\u0440\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u0431\u044b\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d <a href=\"http:\/\/publib.boulder.ibm.com\/infocenter\/javasdk\/v5r0\/index.jsp?topic=%2Fcom.ibm.java.doc.diagnostics.50%2Fdiag%2Funderstanding%2Frmi_dgc.html\">DGC<\/a> (\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0430\u043d\u0442\u0438\u043c\u043e\u043d\u0433\u043e\u043b\u044c\u0441\u043a\u043e\u043c, \u043a\u0440\u0430\u0442\u043a\u043e \u2014 \u0441\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430, \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 RMI). \u041a\u043e\u0433\u0434\u0430-\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d \u0431\u044b\u043b \u043f\u0440\u0438\u0447\u0438\u043d\u043e\u0439 \u043f\u043e\u043b\u043d\u044b\u0445 \u0441\u0431\u043e\u0440\u043e\u043a \u043a\u0430\u0436\u0434\u044b\u0439 \u0447\u0430\u0441 \u043d\u0430 \u043c\u043d\u043e\u0433\u0438\u0445 \u043d\u0430\u0448\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445, \u043f\u043e \u0442\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435, \u0447\u0442\u043e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c RMI \u0434\u043b\u044f JMX. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043e\u0434\u0438\u043d \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0434\u0435\u043d\u044c, \u043c\u043d\u043e\u0433\u043e \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434, \u043c\u044b \u043d\u0430 \u0432\u0441\u0435\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430 JVM \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"bash\">-Dsun.rmi.dgc.server.gcInterval=0x7FFFFFFFFFFFFFFE -Dsun.rmi.dgc.client.gcInterval=0x7FFFFFFFFFFFFFFE <\/code><\/pre>\n<p>  \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 \u0441\u0438\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a: <a href=\"http:\/\/www.oracle.com\/technetwork\/java\/javase\/gc-tuning-6-140523.html#other_considerations\">[1]<\/a>, <a href=\"http:\/\/docs.oracle.com\/javase\/6\/docs\/technotes\/guides\/rmi\/sunrmiproperties.html\">[2]<\/a>. \u0412\u0441\u0435, \u0447\u0442\u043e \u043e\u043d\u0438 \u043f\u0440\u0438\u0437\u0432\u0430\u043d\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u2014 \u0441\u043a\u0430\u0437\u0430\u0442\u044c DGC, \u0447\u0442\u043e \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u0437 \u0432 <code>0x7FFFFFFFFFFFFFFE<\/code> \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434 (\u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0440\u0430\u0437 \u0432 292471208 \u043b\u0435\u0442).<\/p>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0432 \u0441\u0442\u0430\u0440\u0442-\u0441\u043a\u0440\u0438\u043f\u0442 \u0442\u043e\u043c\u043a\u0430\u0442\u0430, \u044f \u0443\u0432\u0438\u0434\u0435\u043b, \u0447\u0442\u043e \u0442\u0430\u043c \u0435\u0441\u0442\u044c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430, \u0438 \u0432\u043c\u0435\u0441\u0442\u043e <code>0x7FFFFFFFFFFFFFFE<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <code>0x7FFFFFFFFFFFFFFF<\/code>. \u0413\u0440\u0430\u043d\u0438\u0447\u043d\u043e\u0435 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 <code>IllegalArgumentException<\/code> (\u043a\u043e\u0434 \u0438\u0437 <code>sun.misc.GC<\/code> \u043a\u043b\u0430\u0441\u0441\u0430):  <\/p>\n<pre><code class=\"java\">if (this.latency == 9223372036854775807L) {     throw new IllegalStateException(&quot;Request already cancelled&quot;); } <\/code><\/pre>\n<p>  <\/p>\n<h4>We need to go deeper!<\/h4>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e, \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0432 \u044d\u0442\u043e \u043d\u0435\u0434\u043e\u0440\u0430\u0437\u0443\u043c\u0435\u043d\u0438\u0435, \u044f \u0431\u044b\u043b \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u0438\u0432\u043b\u0435\u043d, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u043e\u043c\u043a\u0430\u0442\u043e\u0432 \u043c\u044b \u0441\u043d\u043e\u0432\u0430 \u0443\u0432\u0438\u0434\u0435\u043b\u0438 \u0432\u0441\u0435 \u0442\u0435 \u0436\u0435 \u0435\u0436\u0435\u0447\u0430\u0441\u043d\u044b\u0435 <code>Full GC (System)<\/code>! \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043d\u0430\u043f\u0440\u044f\u0447\u044c \u0441\u043e\u043e\u0431\u0440\u0430\u0436\u0430\u043b\u043a\u0443. \u0427\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c, \u043a\u0442\u043e \u0436\u0435 \u0432\u0438\u043d\u043e\u0432\u0430\u0442 \u0432 \u0432\u044b\u0437\u043e\u0432\u0435 <code>System.gc()<\/code>, \u044f \u0431\u044b\u0441\u0442\u0440\u0435\u043d\u044c\u043a\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0441\u0432\u043e\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043a\u043b\u0430\u0441\u0441\u0430 <code>java.lang.Runtime<\/code>, \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0432 \u0443 \u043d\u0435\u0433\u043e \u043c\u0435\u0442\u043e\u0434 <code>gc()<\/code> (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 <code>System.gc()<\/code>). <br \/>  \u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434:  <\/p>\n<pre><code class=\"java\">public native void gc(); <\/code><\/pre>\n<p>  \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434:  <\/p>\n<pre><code class=\"java\">public void gc() {     Thread.dumpStack(); } <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u0432\u0441\u0435, \u0447\u0442\u043e \u043c\u044b \u0437\u0434\u0435\u0441\u044c \u0434\u0435\u043b\u0430\u0435\u043c \u2014 \u0443\u0437\u043d\u0430\u0435\u043c, \u043a\u0442\u043e \u0436\u0435 \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u043d\u0430\u0441 \u0432\u044b\u0437\u0432\u0430\u043b, \u043f\u0443\u0442\u0435\u043c \u0432\u044b\u0432\u043e\u0434\u0430 \u0432 <code>stdout<\/code> \u0441\u0442\u0435\u043a\u0442\u0440\u0435\u0439\u0441\u0430, \u0442.\u043a. \u0432\u0441\u0435, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 <code>Thread.dumpStack()<\/code> \u2014 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0435\u0433\u043e \u0441\u0442\u0435\u043a\u0442\u0440\u0435\u0439\u0441:  <\/p>\n<pre><code class=\"java\">    \/**      * Prints a stack trace of the current thread to the standard error stream.      * This method is used only for debugging.      *      * @see     Throwable#printStackTrace()      *\/     public static void dumpStack() {         new Exception(&quot;Stack trace&quot;).printStackTrace();     } <\/code><\/pre>\n<p>  \u041f\u043e\u0434\u043c\u0435\u043d\u044f\u0435\u043c <code>java.lang.Runtime<\/code> \u043a\u043b\u0430\u0441\u0441 \u0432 \u043d\u0430\u0448\u0435\u0439 \u0434\u0436\u0430\u0432\u0430-\u043c\u0430\u0448\u0438\u043d\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>-Xbootclasspath\/p:\/tmp\/runtime<\/code>, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u2026 \u0418 \u0447\u0442\u043e \u0436\u0435 \u043c\u044b \u0432\u0438\u0434\u0438\u043c?<\/p>\n<pre><code class=\"java\">java.lang.Exception: Stack trace         at java.lang.Thread.dumpStack(Thread.java:1249)         at java.lang.Runtime.gc(Runtime.java:689)         at java.lang.System.gc(System.java:926)         at sun.misc.GC$Daemon.run(GC.java:92) <\/code><\/pre>\n<p>  \u0422\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 DGC! \u041d\u043e \u043a\u0430\u043a? \u041c\u044b \u0436\u0435 \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043c\u0435\u0436\u0434\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043c\u0438 DGC? \u0412\u043e\u0442 \u0442\u0443\u0442 \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043d\u0430\u043f\u0440\u044f\u0447\u044c \u0432\u0441\u0435 \u043c\u043e\u0438 \u0441\u043a\u0438\u043b\u043b\u044b \u0433\u0443\u0433\u043b\u0435\u043d\u0438\u044f. \u0418 \u0442\u0430\u043a \u044f \u0438\u0441\u043a\u0430\u043b, \u0438 \u044d\u0442\u0430\u043a \u2014 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043c\u043e\u0433 \u043d\u0430\u0439\u0442\u0438. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043b, \u043d\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043b\u0438 \u043a\u0442\u043e \u043c\u043e\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0434\u043b\u044f DGC \u2014 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043a \u043c\u043e\u043c\u0435\u043d\u0442\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 GC \u0432\u0441\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u044e\u0442 \u0442\u0430\u043a\u0438\u0435 \u0436\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u0430\u043a \u044f \u0438 \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u043b. \u0421\u044e\u0440\u043f\u0440\u0438\u0437\u2026<br \/>  <img decoding=\"async\" src=\"http:\/\/www.thehiredguns.com\/blogs\/files\/2012\/10\/omg.jpeg\" alt=\"image\"\/><\/p>\n<h4>&#8230;Deeper!<\/h4>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u043c\u043e\u0435 \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u043d\u0438\u0435 \u043f\u0430\u043b\u043e \u043d\u0430 \u0442\u043e\u043c\u043a\u0430\u0442. \u0418 \u0432\u043e\u0442, \u0441\u0447\u0430\u0441\u0442\u043b\u0438\u0432\u0430\u044f \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f \u0441\u043b\u043e\u0432 \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043a \u0433\u0443\u0433\u043b\u0443 \u0434\u0430\u043b\u0430-\u0442\u0430\u043a\u0438 \u043c\u043d\u0435 \u043e\u0434\u043d\u0443-\u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u043b\u0430 \u043c\u0435\u043d\u044f \u043f\u0440\u043e\u0438\u0437\u043d\u0435\u0441\u0442\u0438 \u0442\u043e, \u0447\u0442\u043e \u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c \u0437\u0434\u0435\u0441\u044c \u043c\u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0441\u0442\u044b\u0434\u043d\u043e, \u0438 \u043c\u043e\u0438 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u0435 \u043a\u043e\u043b\u043b\u0435\u0433\u0438 (\u043f\u043e\u043c\u043e\u0433\u0430\u0432\u0448\u0438\u0435 \u043c\u043d\u0435, \u043f\u043e \u043c\u0435\u0440\u0435 \u0441\u0438\u043b, \u0432 \u0440\u0430\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438, \u043f\u0443\u0442\u0435\u043c \u0437\u0430\u0434\u0430\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0432\u043e\u0434\u044f\u0449\u0438\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0442\u0438\u043f\u0430 \u00ab\u0410 \u0433\u0443\u0433\u043b\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b?\u00bb) \u043e\u0447\u0435\u043d\u044c \u043d\u0435\u043e\u0434\u043e\u0431\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430 \u043c\u0435\u043d\u044f \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438\u2026 \u041f\u043e\u0442\u043e\u043c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u2014 \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u043b\u0438 \u043c\u043e\u0438 \u0440\u0443\u0433\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430.<br \/>  \u0418\u0442\u0430\u043a, \u0432\u043e\u0442 \u043e\u043d\u0430, <a href=\"http:\/\/stackoverflow.com\/questions\/14902928\/why-does-the-jvm-of-these-tomcat-servers-perform-a-full-gc-hourly\">\u0441\u0441\u044b\u043b\u043a\u0430<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0432\u0435\u0434\u0435\u0442 \u043d\u0430 \u0431\u0430\u0433\u0437\u0438\u043b\u043b\u0443 \u0442\u043e\u043c\u043a\u0430\u0442\u0430: <a href=\"https:\/\/issues.apache.org\/bugzilla\/show_bug.cgi?id=53267\">\u0442\u044b\u043d\u0446<\/a>. \u0412\u043a\u0440\u0430\u0442\u0446\u0435, \u044d\u0442\u0438 \u0433\u0435\u043d\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u0431\u044f\u0442\u0430 \u0438\u0437 \u0430\u043f\u0430\u0447\u0430 \u0447\u0435\u0440\u0435\u0437 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u044e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f DGC, \u043f\u0440\u044f\u043c\u043e \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 <code>sun.rmi.GC<\/code>, \u0438 \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043c\u044b \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0441\u0432\u043e\u0438 <code>-Dsun.rmi.dgc.*<\/code> \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u043e\u043d\u0438 \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0430! \u0418\u0431\u043e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0442\u043e\u043c\u043a\u0430\u0442 6.0.35, \u0430 \u0431\u0430\u0433 \u044d\u0442\u043e\u0442 \u0431\u044b\u043b \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438, 6.0.36.<\/p>\n<p>  \u0412\u043e\u0442 \u043a\u043e\u0434 \u0438\u0437 \u0442\u043e\u043c\u043a\u0430\u0442\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 <code>JreMemoryLeakPreventionListener<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u0435\u043d \u0437\u0430 \u044d\u0442\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435:  <\/p>\n<pre><code class=\"java\">\/*  * Several components end up calling:  * sun.misc.GC.requestLatency(long)  *   * Those libraries \/ components known to trigger memory leaks  * due to eventual calls to requestLatency(long) are:  * - javax.management.remote.rmi.RMIConnectorServer.start()  *\/ if (gcDaemonProtection) {     try {         Class&lt;?&gt; clazz = Class.forName(&quot;sun.misc.GC&quot;);         Method method = clazz.getDeclaredMethod(&quot;requestLatency&quot;, new Class[] {long.class});         method.invoke(null, Long.valueOf(3600000));     } catch (...) {         ...     } } <\/code><\/pre>\n<p>  \u0422\u0430\u043c \u0436\u0435, \u043d\u0430 SO, \u044f \u043d\u0430\u0448\u0435\u043b \u0438 workaround:  <\/p>\n<blockquote><p>set <code>&lt;Listener className=&quot;org.apache.catalina.core.JreMemoryLeakPreventionListener&quot; gcDaemonProtection=&quot;false&quot;\/&gt;<\/code><\/p><\/blockquote>\n<p>  \u0418\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u044f \u0438 \u0441\u0434\u0435\u043b\u0430\u043b. \u041a\u0430\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u0434\u0435\u0442\u044c \u0438\u0437 \u043a\u043e\u0434\u0430 \u0432\u044b\u0448\u0435, \u0444\u043b\u0430\u0433 <code>gcDaemonProtection<\/code> \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u044d\u0442\u043e\u0442 \u0431\u043b\u043e\u043a \u043a\u043e\u0434\u0430, \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0437\u0430 \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435. \u0418 \u2014 \u043e, \u0447\u0443\u0434\u043e! \u2014 \u044d\u0442\u043e \u043f\u043e\u043c\u043e\u0433\u043b\u043e! \u0415\u0436\u0435\u0447\u0430\u0441\u043d\u044b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u043c\u0443\u0441\u043e\u0440\u0430 \u0438\u0441\u0447\u0435\u0437\u043b\u0438 \u0432 \u043d\u0435\u0431\u044b\u0442\u0438\u0435, \u0441\u0430\u043f\u043f\u043e\u0440\u0442 \u0441\u0447\u0430\u0441\u0442\u043b\u0438\u0432, \u044f \u043f\u043e\u0448\u0435\u043b \u043f\u0438\u0442\u044c \u0447\u0430\u0439.<\/p>\n<h3>\u0412\u044b\u0432\u043e\u0434\u044b<\/h3>\n<p>  \u0410 \u0432\u044b\u0432\u043e\u0434\u043e\u0432, \u0432 \u043e\u0431\u0449\u0435\u043c-\u0442\u043e, \u043d\u0435\u043c\u043d\u043e\u0433\u043e:  <\/p>\n<ol>\n<li>\u0421\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u2014 \u0443\u0447\u0438\u0442\u0435\u0441\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a \u0433\u0443\u0433\u043b\u0443! \u042f \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0441 \u0434\u0435\u0441\u044f\u0442\u043e\u043a \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439, \u043f\u043e\u043a\u0430 \u043d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e \u043d\u0435 \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 <code>tomcat hourly full GC<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u0432\u044b\u0434\u0430\u043b \u043c\u043d\u0435 \u0438\u0441\u043a\u043e\u043c\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443.<\/li>\n<li>\u041d\u0435 \u043d\u0430\u0434\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0439, \u043f\u0443\u0441\u0442\u044c \u0434\u0430\u0436\u0435 \u043e\u0447\u0435\u043d\u044c \u0438\u0437\u0432\u0435\u0441\u0442\u044b\u0439 \u0441\u043e\u0444\u0442, \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0431\u0430\u0433\u043e\u0432 \u2014 \u043e\u0447\u0435\u043d\u044c \u0434\u0430\u0436\u0435 \u0438\u043c\u0435\u0435\u0442! \u0418 \u044d\u0442\u043e \u0443\u0436\u0443 \u043d\u0435 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043d\u0430\u0440\u044b\u0432\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u0431\u0430\u0433\u0438. \u0412 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437 \u044d\u0442\u043e \u0431\u044b\u043b \u0431\u0430\u0433 \u0432 Hotspot CMS, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0447\u0435\u043d\u044c \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u043e\u0440\u0442\u0438\u043b \u043d\u0430\u043c \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0441\u0431\u043e\u0440\u043a\u0443 \u043c\u0443\u0441\u043e\u0440\u0430. \u0420\u0435\u0448\u0438\u043b\u0441\u044f \u0430\u043f\u0433\u0440\u0435\u0439\u0434\u043e\u043c \u043d\u0430 \u043d\u043e\u0432\u0443\u044e JVM.<\/li>\n<li>\u041d\u0443 \u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u044f \u2014 \u0437\u043b\u043e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u2014 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0438\u043b\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0438 \u043b\u0435\u0437\u0435\u0442\u0435 <s>\u0433\u0440\u044f\u0437\u043d\u044b\u043c\u0438 \u0440\u0443\u043a\u0430\u043c\u0438<\/s> \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0435\u0439 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b.  <\/li>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u043a\u043e\u043c\u0443-\u0442\u043e \u043c\u043e\u0439 \u043e\u043f\u044b\u0442 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0435\u0437\u0435\u043d.<\/p>\n<p>  PS \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0438\u043d\u0432\u0430\u0439\u0442, \u043e \u0412\u0435\u043b\u0438\u043a\u043e\u0435 \u041d\u041b\u041e!<\/ol>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/179309\/\"> http:\/\/habrahabr.ru\/post\/179309\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t\u042d\u0442\u0430 \u043f\u043e\u0443\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043f\u043e\u0432\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0432\u0430\u0436\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0442\u044c \u043d\u0430\u0432\u044b\u043a\u0438 \u0433\u0443\u0433\u043b\u0435\u043d\u0438\u044f, \u0438 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u044f \u0431\u043e\u0440\u043e\u043b\u0441\u044f \u0441 \u0435\u0436\u0435\u0447\u0430\u0441\u043d\u044b\u043c \u043f\u043e\u043b\u043d\u044b\u043c Garbage collection.<\/p>\n<h3>\u041a\u0440\u0430\u0442\u043a\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b<\/h3>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u044b \u043c\u0438\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435 \u043e\u0434\u0438\u043d \u0438\u0437 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b (\u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043d\u0430 Tomcat) \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0442\u043e\u043c\u043a\u0430\u0442\u0430, \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e \u0441\u0430\u043f\u043f\u043e\u0440\u0442 \u0437\u0430\u043f\u0430\u043d\u0438\u043a\u043e\u0432\u0430\u043b, \u0443\u0432\u0438\u0434\u0435\u0432 \u0432 \u043b\u043e\u0433\u0430\u0445 \u043f\u043e\u043b\u0443\u0442\u043e\u0440\u0430\u0441\u0435\u043a\u0443\u043d\u0434\u043d\u044b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0438 GC.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-179309","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/179309","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=179309"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/179309\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=179309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=179309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=179309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}