Showing posts from April, 2020

Is this Dependency hell or story about CodeCache?

  Today, I want to share my opinion about some improvements in the plugins directory, it’s continued article of   OWASP dependencies checks   ( link ).  As we know last time Atlassian start by design to request CodeCache 512M in ( )  So based on that general picture we can find the code cache one of the main areas of memory. Simply put,  JVM Code Cache is an area where JVM stores its bytecode compiled into native code . We call each block of the executable native code a  nmethod . The  nmethod  might be a complete or inlined Java method. The just-in-time (JIT) compiler is the biggest consumer of the code cache area. That's why some developers call this memory a JIT code cache.    Just to be clear, why do most of apps are a huge memory and time consumers? Most of answer is new functionality, but functionality is not growing exponentially, as a codebase.   Based on that hypothesis, I investigated the pom.xml in-house apps i

So time to reduce latency using JVM option, or history about random vs urandom differences

  Hi,   Sometimes, I need to reduce latency of Java app, especially, of Atlassian Suite.  As we know Jira, use UUID generation for many approaches, like integration with other Atlassian products. as example, I made grepping for the 7.13.x release sources for the UUID references So we can optimize a small option in the,  which is located in Java 8. $JAVA_HOME/lib/security/ for Java 11:  $JAVA_HOME/conf/security/   We can change  to  securerandom.source=file:/dev/urandom instead of  securerandom.source=file:/dev/random I do recommend you to read pages linked in References.   Benchmarks Before making change, let’s do a few  benchmarks.  I used that one ( ) on the  Linux version 3.10.0-1127.el7.x86_64 ( (gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) ) #1 SMP Tue Feb 18 16:39:12 EST 2020   Results : /dev/random - jdk8u242-b08 # Run complete. Total time

Let's customize logging of reverse proxy or time to check response time of application in real time

  Hi wonderful community!   So at the moment, a lot of companies understood WFH (working from home) is efficient for the productivity and services should much faster. Hence I will share typical use cases for investigating the slowness because the first thing is to measure the response time: Today I would like to share some easy trick related to the configuration related to the reverse proxy which is used by the mostly on-premises setup of Atlassian product.   Let’s start from popular  nginx :               $upstream_response_time  - keeps time spent on receiving the response from the upstream server; the time is kept in seconds with millisecond resolution. Times of several responses are separated by commas and colons like addresses in the  $upstream_addr  variable.  Detailed info:               $request_time  - request processing time in seconds with a milliseconds resolution; time elapsed between the first bytes were read f