Iterate through Cassandra table with DataStax Python Driver

In most Cassandra use cases a data table is hardly updated or deleted in prevention of tombstones. Versioned records are used to ensure only insertion is used on the table. The result is that Cassandra table is usually much longer than its cousin in relational database. Like it or not, full table scan is still … Read moreIterate through Cassandra table with DataStax Python Driver

Performance Analysis Tools

Basic Tools In 2015, Brendan Gregg posted two great articles on Netflix blog: Linux Performance Analysis in 60 seconds, and Linux Perfomrance Tools. They have great value when I was in a urgency to spot performance issues. The articles cover the essential tools for performance troubleshooting, including: Check out load averages: uptime or w Print … Read morePerformance Analysis Tools

Network Analyzer: Capture filter and Display filter

Capture filter is set before collecting packets. It is applied at the time of data acquisition and it impacts the size of the capture. It does not have as many variations as display filter and is usually not aware of protocols above TCP/UDP layer. A common form of capture filter is BPF (Berkerly Packet Filter) … Read moreNetwork Analyzer: Capture filter and Display filter

Ansible at scale 2 of 2

Template (with Jinja2) and files In an Ansible role, we can use files or templates to achieve similar results for configuration files. If the configuration file is the same across all targets then we can place it in files directory to push out. If the content of configuration file varies depending on the cluster size, … Read moreAnsible at scale 2 of 2

Ansible at scale 1 of 2

Our original automation scheme involves several Ansible playbooks that started off simple but have been sprawling. So recently I spent some time to revamp the entire set of playbooks, following some of the best practices from the official documentation. The goal is to: Reduce the number of playbooks; Improve code re-usability (by implementing roles); Increase … Read moreAnsible at scale 1 of 2

Balloons steal memory from virtual machines

I came across an ElasticSearch server (ESXi guest with 32GB physical memory) where the main process keeps dying of OOM. Even worse, after the OOM event, the free memory left is about 10G and Elastic Search cannot start because its JVM is set with -Xms16g in /etc/elasticsearch/jvm.options. So I need to address the OutOfMemory error. … Read moreBalloons steal memory from virtual machines

Common local Git operations

This is a summary of concepts in common Git operations. We will discuss brach, merge, rebase, cherrypick, stash and reset. We will not discuss pull, fetch, or push. Commit, Branch and HEAD When you run “git commit”, the following happens: Git checksums each subdirectory, and stores them as a tree object (file path and name) … Read moreCommon local Git operations