Skip to content

Instantly share code, notes, and snippets.

View VergilSkye's full-sized avatar

Virgilio Stefanin VergilSkye

  • Guará, Brasília
View GitHub Profile

Scalability of JVM processes is limited by GC rate.

For contemporary CPUs and GCs that provide the best throughput the allocation limit is ~11Gb/sec.

After reaching the allocation limit the JVM process doesn't scale.

Having 7.5Gb/sec in 1 thread the limit will be reached at 2-4 threads and adding more threads only decrease the total troughput.

Steps to reproduce that by running JSON parsing benchmarks on your JDK:

  1. Install latest version of sbt and/or ensure that it already installed properly:
@chaotic3quilibrium
chaotic3quilibrium / Effective Scala Case Class Patterns.md
Last active April 11, 2025 13:53
Article: Effective Scala Case Class Patterns - The guide I wished I had read years ago when starting my Scala journey

Effective Scala Case Class Patterns

Version: 2022.03.02

Available As

git_current_branch () {
local ref
ref=$(command git symbolic-ref --quiet HEAD 2> /dev/null)
local ret=$?
if [[ $ret != 0 ]]
then
[[ $ret == 128 ]] && return
ref=$(command git rev-parse --short HEAD 2> /dev/null) || return
fi
echo ${ref#refs/heads/}
@amabes
amabes / Mock-FileList-for-Unit-Test-Angular2
Last active September 15, 2023 10:55
Simplified example to demonstrate how to Mock a FileList for unit testing purposes.
// Method to test
public uploadFileList(files: FileList) {
// whatever
}
// Test
it("uploadFileList", () => {
const blob = new Blob([""], { type: "text/html" });
blob["lastModifiedDate"] = "";
blob["name"] = "filename";
@dweldon
dweldon / install-docker.sh
Last active April 8, 2022 11:18
Install docker CE on Linux Mint 18.3
#!/usr/bin/env bash
# https://docs.docker.com/install/linux/docker-ce/ubuntu/
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable"
sudo apt-get update
sudo apt-get install docker-ce
# https://docs.docker.com/compose/install/
@MariusVolkhart
MariusVolkhart / WhereClause.java
Last active November 13, 2024 07:28
A small utility to help you construct SQL query where clauses
/*
* Copyright 2014-2015 Marius Volkhart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software