{"id":2175,"date":"2022-08-30T15:22:40","date_gmt":"2022-08-30T15:22:40","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/01\/04\/cpu-profiling-for-restful-server-to-avoid-slow-process-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:22:40","modified_gmt":"2022-08-30T15:22:40","slug":"cpu-profiling-for-restful-server-to-avoid-slow-process-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/cpu-profiling-for-restful-server-to-avoid-slow-process-collection-of-common-programming-errors\/","title":{"rendered":"CPU profiling for RESTful server to avoid slow process-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;ve a RESTful server and it crashes pretty often. So, I&#8217;m profiling it to check what processes are consuming most of CPU. After quite a time of profiling, I find org.restlet.engine.http.connector.BaseHelper.isWorkingServiceFull has maximum CPU usage on Runnable thread.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/fMm8Z.jpg\" \/><\/p>\n<p>Is there any way to enhance the performance? When I change Thread Status to &#8216;All State&#8217; form &#8216;Runnable&#8217; java.net.ServerSocket.accept(50%) and java.lang.Thread.sleep(49%) has the maximum CPU usage. What does the sleeping thread and socket has to do with the performance?<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/2FZ3I.jpg\" \/><\/p>\n<p id=\"rop\"><small>Originally posted 2014-01-04 02:51:25. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve a RESTful server and it crashes pretty often. So, I&#8217;m profiling it to check what processes are consuming most of CPU. After quite a time of profiling, I find org.restlet.engine.http.connector.BaseHelper.isWorkingServiceFull has maximum CPU usage on Runnable thread. Is there any way to enhance the performance? When I change Thread Status to &#8216;All State&#8217; form [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2175","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2175","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2175"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2175\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2175"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}