Personal blog of Jakub Paweł Głazik

TL;DR InnoDB Adaptive Hash Index can be a performance bottleneck on high-end MySQL 5.6 installations - which wasn’t the case with 5.5. Turning it off gave us much better (consistent) read performance by utilizing more CPU+IO resources and also reduced occurences of replication lag. Docs say: The architectural changes in MySQL 5.6 and higher make more workloads suitable for disabling the adaptive hash index than in earlier releases, although it is still enabled by default. ... Read More
How to count number of lines of code in a Git repository? Add this alias to your ~/.gitconfig [alias] loc = diff --stat 4b825dc642cb6eb9a060e54bf8d69288fbee4904 This shows diff against empty repository (git hash-object -t tree /dev/null) Now you can just type git loc and get an answer. This is nice as it does not take binary files into account when counting lines.
Getting disk usage statistics for Amazon S3 buckets is not that easy. Things are quite simple when your objects count and data size is reasonable and by reasonable I mean something around < 10 TB and < 1000 objects per bucket. You can either use s4cmd (fast, multi threaded) s4cmd du -r s3://dbbackups/ or AWS Cli tools aws s3api list-objects --bucket dbbackups --output json --query "[sum(Contents[].Size), length(Contents[])]" But when your buckets have >30000 objects totaling at hunderds of terabytes, then those api calls are slow. ... Read More