Introducing a common interface to access AFS statistics Marcio - - PowerPoint PPT Presentation

introducing a common interface to access afs statistics
SMART_READER_LITE
LIVE PREVIEW

Introducing a common interface to access AFS statistics Marcio - - PowerPoint PPT Presentation

Introducing a common interface to access AFS statistics Marcio Barbosa 2019 OpenAFS Workshop AGENDA Motivation Problem Solution StatsStore StatsStore and OpenAFS Other platforms Collectd Collectd and OpenAFS Links MOTIVATION


slide-1
SLIDE 1

Introducing a common interface to access AFS statistics

Marcio Barbosa 2019 OpenAFS Workshop

slide-2
SLIDE 2

AGENDA

Motivation Problem Solution StatsStore StatsStore and OpenAFS Other platforms Collectd Collectd and OpenAFS Links

slide-3
SLIDE 3

MOTIVATION

  • Plenty of reasons why collecting stats about your system is a good idea;

– Troubleshooting; – Tracking down bottlenecks; – Analyzing long-term trends; – Measure and monitor application performance; – Identify ways to optimize performance; – Others;

slide-4
SLIDE 4

PROBLEM

  • Different interfaces to get stats from different components of the system;
  • Getting stats from one component of your system might not be enough;

– Unable to correlate data from various applications; – Unable to connect events to certain system states;

  • Difficulties to build a holistic view of the circumstances surrounding an event;

Component 1 Command-line interface 1 Component 2 Command-line interface 2 Component 3 Command-line interface 3 Component 4 Command-line interface 4

slide-5
SLIDE 5

PROBLEM

  • Tracking data about the system as a whole could:

– Bring together apparently disparate pieces of system data; – Help us understand what the environment looked like exactly at the time of the problem;

  • See our system as a system, instead of as a loose set of unrelated

components;

  • Unfortunately, each component provides statistics in a different way;

Component 1 Component 4 Component 2 Component 3

slide-6
SLIDE 6

PROBLEM

Component 1 Command-line interface 1 Component 2 Command-line interface 2 Component 3 Command-line interface 3 Component 4 Command-line interface 4 Process

slide-7
SLIDE 7

SOLUTION

  • A common namespace to access performance data from a variety of system

sources;

  • Ideally, same command-line interface and API;
  • A shared namespace across statistics enables you to easily explore all available

information for a given system;

slide-8
SLIDE 8

SOLUTION

Component 1 Command-line interface Component 2 Component 3 Component 4

slide-9
SLIDE 9

STATSSTORE

  • Introduced in Oracle Solaris 11.4;
  • StatsStore unifies the broad set of Oracle Solaris observability technologies under
  • ne set of naming rules;
  • This consolidated view of data is available through the interactive System Web

Interface and through CLIs and APIs;

slide-10
SLIDE 10

STATSSTORE

  • Create metadata files that define your statistics;
  • Modify your application to update values for the statistics that you created in

metadata;

  • Interfaces are available for both C and Python;
  • Interface creates a shared memory region between sstored and the client process;

– Supports only integer statistic values; – Values in this shared memory region are initialized to 0; – To update the statistics store, update the shared memory region array element for that statistic;

slide-11
SLIDE 11

STATSSTORE

component sstore lib sstore metadata

Shared-memory region atomic_increment(stats); atomic_read(stats); sstore_data_attach(stats);

slide-12
SLIDE 12

STATSSTORE AND OPENAFS

  • Different ways to get statistics from different processes;

– Different command-line interfaces; – Signals; – Fileserver, VL server, PT server, Volume server, etc.;

  • Different ways to get statistics from the same process;

vlserver ubik rx

Command-line interface 1 Command-line interface 2 Command-line interface 3

slide-13
SLIDE 13

STATSSTORE AND OPENAFS

  • Code refactoring:

– Move related stats to the same struct; – Use stats store library to create shared memory region for each struct; – Update counters normally;

vlserver ubik rx

sstore

slide-14
SLIDE 14

STATSSTORE AND OPENAFS

slide-15
SLIDE 15

OTHER PLATFORMS

  • StatsStore is Solaris specific;
  • Alternative for Linux;

– Collectd;

  • Collectd is an open source daemon that collects system and application

performance metrics;

  • Collects, transfers and stores system performance statistics;

– Data acquisition and storage handled by plugins;

slide-16
SLIDE 16

COLLECTD

slide-17
SLIDE 17

COLLECTD

  • Benefits:

– Open source; – Extensible; – Free; – Lightweight; – Lots of plugins (over 130 plugins); – Widely supported (Linux, Mac OS X, AIX, FreeBSD, NetBSD, OpenBSD, etc.); – More;

slide-18
SLIDE 18

COLLECTD

  • Everything in collectd is done in plugins;
  • Each plugin has their own unique settings;
  • Plugin for OpenAFS developed;

– Creates shared-memory region for each group of stats; – Group of stats specified in the configuration file; OpenAFS Server Collectd OpenAFS Plugin Configuration File

Shared-memory region

slide-19
SLIDE 19

COLLECTD AND OPENAFS

  • OpenAFS uses the same interface used by StatsStore;

– But with different implementation; – Collectd plugin: github.com/marciobarbosa/collectd/tree/mbarbosa/afs-stats-3 server stats_init() statsstore collectd

Shared-memory region Shared-memory region

sstore collectd

slide-20
SLIDE 20

COLLECTD AND OPENAFS

slide-21
SLIDE 21

Thank you!