🔗 Change Your Git User Depending on the Current Directory with Conditional Includes

git terminal tooling .

Git 2.13+ introduced Conditional Includes which allow to set the Git user name depending on the Git repo directory (and much more):

[includeIf "gitdir:~/code/"]
  path = .gitconfig-personal
[includeIf "gitdir:~/code/work/"]
  path = .gitconfig-work

— Example from Eric William

+UseContainerSupport to the Rescue

java jvm docker

TL;DR: How the JVM Finally Plays Nice with Containers

Java 10 introduced +UseContainerSupport (enabled by default) which makes the JVM use sane defaults in a container environment. This feature is backported to Java 8 since 8u191, potentially allowing a huge percentage of Java deployments in the wild to properly configure their memory.


JVM Memory Settings in a Container Environment

java jvm docker

TL;DR: The Bare Minimum You Should Know Before Going Live

Java memory management and configuration is still complex. Although the JVM can read cgroup memory limits and adapt memory usage accordingly since Java 9/8u131, it’s not a golden bullet. You need to know what -XX:+UseCGroupMemoryLimitForHeap does and you need to fine tune some parameters for every deployment. Otherwise you risk wasting resources and money or getting your containers killed at the worst time possible. -XX:MaxRAMFraction=1 is especially dangerous. Java 10+ brings a lot of improvements but still needs manual configuration. To be safe, load test your stuff.