Disk Debugging

sar gives us an overview of what the system is doing. If you had a high %iowait you might want to figure out what drive is currently being used. To do this we use ‘iostat’. ‘iostat’ will by default give you all the reads and writes that the server has performed since start up. …

Linux CPU

Previously I wrote about how memory works in Linux. In this post I want to write about how the CPU is handled to service processes. processes Before we get started pulling out stats it’s important to understand how processes in Linux work. All processes in Linux except process 0 (the swapper) is created when another process executes the fork() system call. The process that calls fork() is what is called the parent process and all the subsequent processes that it calls are called child processes. Every process (except process 0) has one parent process, but can have many child processes....…

rewrite uri to lowercase using nginx/perl, nginx/lua or apache

Just wanted to drop this little snippet here as I’ve seen a lot of people saying you can only rewrite to lower case using embedded Perl. You can indeed do this with LUA which is a little faster than the embedded Perl. If you need to rewrite a uri ‘/TEST’ to ‘/test’ you can do it with the following: perl method location ~ [A-Z] { perl 'sub { my $r = shift; $r->internal_redirect(lc($r->uri)); }'; } OR http { ... # Include the perl module perl_modules perl/lib; ... # Define this function perl_set $uri_lowercase 'sub { my $r = shift; my...…

Linux Memory

So I thought I’d cover off some understanding I have about how Linux handles memory. Quite often I’ve been asked to take a look at a server to judge whether its memory should be upgraded to handle its workload. To get started first we need a basic understanding of how the kernel handles memory and what all the different measures are. …

Docker 1.0

Previously I wrote about docker (here). I’m now excited to inform you that Docker 1.0 has been released. On March 20, 2013, we released the first version of Docker. After 15 months, 8,741 commits from more than 460 contributors, 2.75 million downloads, over 14,000 “Dockerized” apps, and feedback from 10s of 1000s of users about their experience with Docker, from a single container on a laptop to 1000s in production in the cloud … we’re excited to announce that it’s here: Docker 1.0. further reading http://blog.docker.com/2014/06/its-here-docker-1-0/ …