{"id":376,"date":"2013-01-17T00:03:04","date_gmt":"2013-01-17T00:03:04","guid":{"rendered":"http:\/\/choudhury.com\/blog\/?p=376"},"modified":"2014-01-17T00:41:44","modified_gmt":"2014-01-17T00:41:44","slug":"securerandom-is-very-slow-when-large-number-of-files-in-java-io-tmpdir","status":"publish","type":"post","link":"https:\/\/choudhury.com\/blog\/2013\/01\/17\/securerandom-is-very-slow-when-large-number-of-files-in-java-io-tmpdir\/","title":{"rendered":"SecureRandom is very slow when large number of files in java.io.tmpdir"},"content":{"rendered":"<p>Working on application that took a long to startup. Upon investigation, it turns out the issue is SecureRandom is using &#8220;java.io.tmp&#8221; directory to set up some entropy (the temp directory on this machine had thousands of files &#8211; no wonder it was slow!!). <\/p>\n<p>Work round for Java 6 was to clear files from the temp directory.<\/p>\n<p><a href=\"http:\/\/bugs.sun.com\/view_bug.do?bug_id=6705872\" title=\"http:\/\/bugs.sun.com\/view_bug.do?bug_id=6705872\">http:\/\/bugs.sun.com\/view_bug.do?bug_id=6705872<br \/>\n<\/a><\/p>\n<p>According to the bug report, this issue is fixed in Java 7 and will at most use 1024 files.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Working on application that took a long to startup. Upon investigation, it turns out the issue is SecureRandom is using &#8220;java.io.tmp&#8221; directory to set up some entropy (the temp directory on this machine had thousands of files &#8211; no wonder it was slow!!). Work round for Java 6 was to clear files from the temp &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/choudhury.com\/blog\/2013\/01\/17\/securerandom-is-very-slow-when-large-number-of-files-in-java-io-tmpdir\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;SecureRandom is very slow when large number of files in java.io.tmpdir&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-376","post","type-post","status-publish","format-standard","hentry","category-java"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/posts\/376","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/comments?post=376"}],"version-history":[{"count":4,"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/posts\/376\/revisions"}],"predecessor-version":[{"id":580,"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/posts\/376\/revisions\/580"}],"wp:attachment":[{"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/media?parent=376"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/categories?post=376"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/tags?post=376"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}