3 ms·
Absolutely nothing sarcastic about it. RE: Log4j. I haven't written Java professionally in almost a decade, so my mind substitude "something similar to log4j"
by iheartmemcache 11y ago
Absolutely nothing sarcastic about it.
RE: Log4j. I haven't written Java professionally in almost a decade, so my mind substitude "something similar to log4j" in. Slf4j, log4j 2.0, both libs serve (as I understand it, am I horribly off base here?) the same purpose -- your kernel will be forced to make a syscall to write, in this case to his stdout, introducing unnecessary variance when your goal is to contrast two states of GC.
RE: Dtrace is a fantastic tool for making granular benchmarks. Again, theres nothing sarcastic about it. As I previously mentioned here JMH would be ideal, confirmed by Oracle[1] as the method to use. (Read the second section, starting with a few paragraphs up from Listing 6.) He basically gives a prescriptive method by which one can use the same tool I mentioned to combat the same issues I brought up, especially for situations like this (micro-benching). DTrace would take it one step further (again, assuming you're skilled enough to use it appropriately) -- you'd end up getting effectively a caliber of measurements on par with Intel PIN. I suppose drastic overkill for this situation, but no, there was nothing sarcastic (nor incorrect, as far as I can tell) about anything I said.
Edit: As I re-read my response to him, I'm baffled as how you can even think this was some sort of sarcastic jab. The dude made an awful post, and I tried to diplomatically raise a few of _many_ issues with his method. I guess I was being a bit of a dick to him by just hammering him away. He's probably just some 19 year old and I should have been constructive instead by spending 15 seconds to search for one of the plethora of sources available on how to properly benchmark the variance of different styles of garbage collection on stack-based VMs. I suppose my foul mood and an easy blog post as a target will yield make for poor manners. Apologies, OP
[1] http://www.oracle.com/technetwork/articles/java/architect-benchmarking-2266277.html http://www.oracle.com/technetwork/articles/java/architect-be...
- hyperpape 11y agoSorry for the bit about sarcasm, I was just really confused by some things, and said something silly and obnoxious. The native GC logging is way better than using log4j (which is great for logging, but abymsal in situations like this for obvious reasons...) He's using the native GC logging. The log4j clone is application level logging, which is what originally confused me. I see you're worried about variance, but I'm not sure a super synthetic benchmark is better. With GC measurement, you're concerned about how an actual application produces garbage--unlike writing a controlled benchmark with JMH. I'd rather see an actual Dropwizard app/servlet hit with JMeter or something like that, and enough runs to smooth the variance--the opposite of tearing out the logging. he would have used Dtrace and probed a few application runs with appropriately placed probes. Still confused by this. Hotspot does GC logging. How do you propose he improve on that with DTrace?