Month: October 2016

Predict full CMS collection

((heap * cms fraction) – current heap used (young and tenured)) / growth rate = prediction Sample data from GC log… : 4499906K->310178K(4718592K), 0.2461130 secs] 10382742K->6214227K(12058624K), 0.2469460 secs] [Times: user=2.77 sys=0.03, real=0.25 secs] 2016-10-25T09:41:02.431-0400: 48708.056: [GC 48708.056: [ParNew48708.198: [SoftReference, 0…

Market Basket Analysis with python

Very elegant example at http://blog.derekfarren.com/2015/02/how-to-implement-large-scale-market.html. What is below is just a complete script with what the link above provides, along with example of our output. Our file was formatted slightly differently, so we had to change the split command. We…

Getting memory by thread

This is not perfect, as the heap is shared. However, the documentation indicates that a ThreadMXBean can calculate how much is in use by each. The idea behind this would be to either instrument your code, or use byte code…

Impact of socket.SO_REUSEADDR

This is often used to get around an “address already in use” error. If you know the previous server program has been shutdown, you can set this socket option prior to the initial server bind, and then restart your program.…