"HowTo" Posts


StatsD update to docker-scout

By Mark Bullet_white Posted in Updates, HowTo Bullet_white Comments Comments

We've all been exploring Docker lately, and back in March, we published Monitoring Docker with docker-scout with how to get started with Scout and Docker.

statsd

Today, we are excited to announce that we updated this container to include StatsD. Just like in our previous post, Rails App Monitoring (APM) with StatsD, we've made StatsD ridiculously easy to setup. Simply add the scout-docker container to your existing infrastructure and quickly start working with StatsD across all your containers. Here's how it works:

Read More →

 

Rails App Monitoring (APM) with StatsD

By Mark Bullet_white Posted in HowTo, Features Bullet_white Comments Comments

Application monitoring doesn't have to be complicated. Introducing scout_statsd_rack, a drop-in Ruby gem for monitoring key performance metrics in your Rails app.

scout_statsd_rack leverages StatsD for lightweight Rails app monitoring via Rack middleware.

Lets see how fast we can go from no monitoring to a Rails performance dashboard plus alerting.

rails app monitoring

Read More →

 

Understanding page faults and memory swap-in/outs: when should you worry?

By Derek Bullet_white Posted in Development, HowTo Bullet_white Comments Comments

swap

Imagine this: your library is trying to step up its game and compete in the Internet age. Rather than you browsing the shelfs, trying to remember how the Dewey Decimal works, you'll enter your book selections from your phone. A librarian will then bring your books to the front desk.

You place your book order on a busy weekend morning. Rather than getting all of your books, the librarian just brings one back. Sometimes the librarian even asks for your book back, tells you to walk out the door to make room for others, and lets someone else read their book for a bit. They then call you back in, shuffling you and the other book readers in-and-out.

What's going on? Is the librarian insane?

This is the life of the Linux's memory management unit (librarian) and processes (you and the other book readers). A page fault happens when the librarian needs to fetch a book.

How can you tell if page faults are slowing you down, and - above all - how can you avoid being shuffled in-and-out of the library?

Read More →

 

Understanding Linux CPU stats

By Derek Bullet_white Posted in HowTo Bullet_white Comments Comments

Your Linux server is running slow, so you follow standard procedure and run top. You see the CPU metrics:



But what do all of those 2-letter abbreviations mean?

Read More →

 

Restricting process CPU usage using nice, cpulimit, and cgroups

By Derek Bullet_white Posted in HowTo Bullet_white Comments Comments

juggle

The Linux kernel is an incredible circus performer, carefully juggling many processes and their resource needs to keep your server humming along. The kernel is also all about equity: when there is competition for resources, the kernel tries to distribute those resources fairly.

However, what if you've got an important process that needs priority? What about a low-priority process? Or what about limiting resources for a group of a processes?

The kernel can't determine what CPU processes are important without your help.

Most processes are started at the same priority level and the Linux kernel schedules time for each task evenly on the processor. Have a CPU intensive process that can be run at a lower priority? Then you need to tell the scheduler about it!

There are at least three ways in which you can control how much CPU time a process gets:

  • Use the nice command to manually lower the task's priority.
  • Use the cpulimit command to repeatedly pause the process so that it doesn’t exceed a certain limit.
  • Use Linux’s built-in control groups, a mechanism which tells the scheduler to limit the amount of resources available to the process.

Let's look at how these work and the pros and cons of each.

Read More →

 

Understanding disk inodes

By Derek Bullet_white Posted in HowTo

You try creating a file on a server and see this error message:

No space left on device

...but you've got plenty of space:

df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/xvda1            10321208   3159012   6637908  33% /

Who is the invisible monster chewing up all of your space?

Why, the inode monster of course!

What are inodes?

An index node (or inode) contains metadata information (file size, file type, etc.) for a file system object (like a file or a directory). There is one inode per file system object.

An inode doesn't store the file contents or the name: it simply points to a specific file or directory.

Read More →

 

Older posts: 1 2 3 ... 5