https://blog.csdn.net/xujiamin0022016/article/details/88142973
tomcat8启动时SessionIdGeneratorBase.createSecureRandom耗时
14-Jul-2016 04:14:22.900 INFO [localhost-startStop-1] org.apache.catalina.util.SessionIdGenerator.createSecureRandom Creation of SecureRa
ndom instance for session ID generation using [SHA1PRNG] took [142,673] milliseconds.
在apache-tomcat官方文档:如何让tomcat启动更快 里面提到了一些启动时的优化项,其中一项是关于随机数生成时,采用的“熵源”(entropy source)的策略。
他提到tomcat7的session id的生成主要通过java.security.SecureRandom生成随机数来实现,随机数算法使用的是”SHA1PRNG”private String secureRandomAlgorithm = "SHA1PRNG";
在sun/oracle的jdk里,这个算法的提供者在底层依赖到操作系统提供的随机数据,在linux上,与之相关的是/dev/random和/dev/urandom,对于这