SlideShare a Scribd company logo
Scaling Up Logging and Metrics
Ricardo Lourenço < rlourenc@redhat.com >
Elvir Kuric < ekuric@redhat.com >
Agenda
● Performance and Scale
● OCP Logging stack
○ Overview
○ Test harness
○ Large clusters
○ Scaling Up
○
● OCP Metrics stack
○ Overview
● Tools used
● Sample results
Performance and Scale
We test individual components for limits. Then we
scale them up.
We focus on OpenShift’s control plane.
Then we target any underlying systems.
Components: ElasticSearch, Kibana, Cassandra, FluentD, Heapster, Java, Ruby...
Users need a way to collect statistics about nodes in a cluster and send those logs to an external database.
● Elasticsearch is a distributed system by itself.
○ Collects logs from node services and all containers in the cluster.
○ Should be deployed with redundancy and persistent storage for scale and high availability.
○ Labels (region=infra) and Node Selectors.
● Fluentd
○ Gathers log entries from nodes, enriching them with metadata.
○ Feeds them into Elasticsearch.
○ Deployed using DaemonSets, Labels (logging-infra-fluentd).
● Kibana
○ presents a web UI for browsing and visualizing logs in Elasticsearch.
Logging stack overview
Large Clusters
MaxRequestsInFlight
Partial list of consumers:
● FluentD pods talk to the apiserver to get metadata for the pods such as its namespace, pod name, host.
● openshift-node talks with the apiserver for command and control.
● SDN
$ kube-apiserver --help | grep inflight
--max-requests-inflight int The maximum number of requests in flight at a given
time. When the server exceeds this, it rejects requests. Zero for no limit. (default 400)
servingInfo:
bindAddress: 0.0.0.0:8443
bindNetwork: tcp4
certFile: master.server.crt
clientCA: ca.crt
keyFile: master.server.key
maxRequestsInFlight: 500
requestTimeoutSeconds: 3600
ReplicationController
The ReplicationController makes sure that a pod or homogeneous set of pods are always up and available. If there are too many
pods, it will kill some. If there are too few, the ReplicationController will start more.
● The Replication Controller is limited by the scheduler and scheduling cycle.
● The DaemonSet binds directly to the node, and bypasses the scheduler entirely.
Burst replicas on both daemonsets and rc is set to 500.
This essentially creates a step f(n) from 0-500 ~O(1) time.
apiVersion: v1
kind: ReplicationController
metadata:
name: nginx
spec:
replicas: 3
selector:
app: nginx
template:
metadata:
name: nginx
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx
ports:
- containerPort:80
DaemonSet
A way to run a daemon on every node, or on a certain set of nodes in a cluster.
Use a a DS instead of a ReplicationController for pods that provide a machine-level function, such as machine monitoring or
machine logging.
Use cases:
● building a sharded datastore.
● running a logger on every node.
● cluster-level applications with strong node ties, and Openshift / Kubernetes node services.
The DaemonSet is used to run Fluentd on every node and send the data to a service like ElasticSearch
for analysis.
pkg/controller/replication/replication_controller.go
// performance requirements for kubernetes 1.0.
BurstReplicas = 500
// The number of times we retry updating a replication
controller's status.
// It resumes normal action after observing the watch events for
them.
pkg/controller/daemon/daemoncontroller.go
// performance requirements for kubernetes 1.0.
BurstReplicas = 500
// If sending a status update to API server fails, we
retry a finite number of times.
// It resumes normal action after observing the watch
events for them.
Limits
ES
Queue capacity
At 10250 pods (50 logger pods @ ~205 OCP nodes) Logging a 256 Byte string per second we've hit
the ES bulk queue capacity.
Fluentd
Buffer chunk limit
The memory buffer plugin provides a fast buffer implementation. It uses memory to store buffer
chunks. When Fluentd is shut down, buffered logs that can’t be written quickly are deleted.
Logging throughput test
● Features:
○ Full logging project deployment.
○ Automated testing with pbench integration.
■ Loading up a cluster with logging traffic at different rates.
■ Collect pbench data while containers are logging.
○ Other logging drivers are also supported through the -d parameter.
■ Json-file, fluentd, journald
Test description
Phase 1 - Before the loggers and pbench start
Delete all indexed data so that data from previous runs doesn’t add up.
$ oc exec $es_pod -- curl -XDELETE "$es_url/*"
Gets ES node stats through the API
$ oc exec $es_pod -- curl $es_url/_stats?pretty
Captures disk usage under /var/lib/origin/openshift.local.volumes/pods/
Phase 2 - Generate load
Start X logger pods across N OCP cluster nodes, logging pre-defined random string at a chosen logging rate.
Registers pbench tools across chosen cluster nodes: iostat mpstat pidstat proc-vmstat sar turbostat
Phase 3 - After the run finishes.
Optimize and flush indexes.
$ oc exec $es_pod -- curl -XPOST "$es_url/_refresh"
$ oc exec $es_pod -- curl -XPOST "$es_url/_optimize?only_expunge_deletes=true&flush=true"
Like in phase 1, gets ES, OC stats, logs and disk usage for your pbench --remote nodes.
Sample output
10n-no_limits-2048ll-1000wait-300s
30wppn - 205nodes - 1hour test.
Recommendations
● It is highly recommended to pre-pull the fluentd images (> 200 nodes).
○ ImagePullPolicy: IfNotPresent should be set in the deployer.yaml file.
● After deploying the region=infra pods, labeling your nodes should be done in
steps/batches of 20 nodes at a time while keeping an eye open for any
"MatchNodeSelector|CrashLoopBackOff|ImagePullFailed|Error" status.
● Use labels and selectors to differentiate infrastructure and application nodes
● Use large persistent volumes (PVs) for infrastructure nodes running logging
(Elasticsearch) and metrics (Cassandra)
OpenShift Metrics
OCP Metrics stack - Overview
● Cassandra
○ Serves as datastore - all metrics data are written to Cassandra db
● Hawkular metrics storage engine
● Heapster
○ Collects metrics data from pods
Heapster
kubelet_1
kubele_2
Hawkular
Cassandra
kubele_n
Hawkular console
Openshift metrics high level overview
●
●
cassandra pod
●
●
○
●
●
Cassandra pod
●
●
●
Heapster metrics component
•
•
•
•
Hawkular
“It provides means of creating, accessing and managing
historically stored metrics via an easy to use json based
REST interface.”
Per : https://github.com/openshift/origin-metrics
OCP metrics setup
● Manual setup
○ Enter commands on master
○ Edit /etc/master/master-config.yaml
○ Restart master
● Using advanced installer
○ Set up all in ansible playbook
https://docs.openshift.com/enterprise/3.1/install_confi
g/cluster_metrics.html
Scaling metrics pods
● We can add more
○ Cassandra pods
○ Hawkular pods
● Only one heapster pod per cluster
OpenShift metrics
•
•
OpenShift metrics configuration tips
•
•
OpenShift metrics configuration tips
OpenShift metrics scale numbers
● It was successfully ran on clusters up to 1000
nodes ( 210 and 981 nodes cluster )
● Cassandra storage requirements are
○ 2.5 GB / day and monitored 1000 pods
○ 17.5 GB / day and 10k pods
● METRICS_DURATION=7(days)
● METRICS_RESOLUTION=15(s)
OpenShift Metrics scaling issues
● Heapster is not catching up with massive number
of pods monitored > 12k pods in OCP cluster
● Up to 12k pods it works good
● BZ 1388815
● Monitoring Microservices on OpenShift with HOSA
Hawkular project :
Thing to follow : HOSA
● Monitoring Microservices on OpenShift with HOSA
○ Hawkular OpenShift Agent (HOSA)
Blog post from hawkular team :
http://www.hawkular.org/blog/2017/01/17/obst-hosa.
html?_lrsc=4c8f78df-8f03-4630-bd54-128a24998599&s
c_cid=701600000011zELAAY
Thank you!
Q & A ?
GitHub
● https://github.com/redhat-performance
● http://github.com/openshift/svt
Ricardo Lourenço rlourenc@redhat.com; Elvir Kuric ekuric@redhat.com

More Related Content

What's hot

Chronix as Long-Term Storage for Prometheus
Chronix as Long-Term Storage for PrometheusChronix as Long-Term Storage for Prometheus
Chronix as Long-Term Storage for Prometheus
QAware GmbH
 
Future Science on Future OpenStack
Future Science on Future OpenStackFuture Science on Future OpenStack
Future Science on Future OpenStack
Belmiro Moreira
 
Distributed Tests on Pulsar with Fallout - Pulsar Summit NA 2021
Distributed Tests on Pulsar with Fallout - Pulsar Summit NA 2021Distributed Tests on Pulsar with Fallout - Pulsar Summit NA 2021
Distributed Tests on Pulsar with Fallout - Pulsar Summit NA 2021
StreamNative
 
Time series denver an introduction to prometheus
Time series denver   an introduction to prometheusTime series denver   an introduction to prometheus
Time series denver an introduction to prometheus
Bob Cotton
 
Moving from CellsV1 to CellsV2 at CERN
Moving from CellsV1 to CellsV2 at CERNMoving from CellsV1 to CellsV2 at CERN
Moving from CellsV1 to CellsV2 at CERN
Belmiro Moreira
 
KubeCon Prometheus Salon -- Kubernetes metrics deep dive
KubeCon Prometheus Salon -- Kubernetes metrics deep diveKubeCon Prometheus Salon -- Kubernetes metrics deep dive
KubeCon Prometheus Salon -- Kubernetes metrics deep dive
Bob Cotton
 
OpenNebulaConf2015 2.05 OpenNebula at the Leibniz Supercomputing Centre - Mat...
OpenNebulaConf2015 2.05 OpenNebula at the Leibniz Supercomputing Centre - Mat...OpenNebulaConf2015 2.05 OpenNebula at the Leibniz Supercomputing Centre - Mat...
OpenNebulaConf2015 2.05 OpenNebula at the Leibniz Supercomputing Centre - Mat...
OpenNebula Project
 
OpenNebulaConf2015 1.09.02 Installgems Add-on - Alvaro Simon Garcia
OpenNebulaConf2015 1.09.02 Installgems Add-on - Alvaro Simon GarciaOpenNebulaConf2015 1.09.02 Installgems Add-on - Alvaro Simon Garcia
OpenNebulaConf2015 1.09.02 Installgems Add-on - Alvaro Simon Garcia
OpenNebula Project
 
Building AuroraObjects- Ceph Day Frankfurt
Building AuroraObjects- Ceph Day Frankfurt Building AuroraObjects- Ceph Day Frankfurt
Building AuroraObjects- Ceph Day Frankfurt
Ceph Community
 
Containers on Baremetal and Preemptible VMs at CERN and SKA
Containers on Baremetal and Preemptible VMs at CERN and SKAContainers on Baremetal and Preemptible VMs at CERN and SKA
Containers on Baremetal and Preemptible VMs at CERN and SKA
Belmiro Moreira
 
Distributed Postgres
Distributed PostgresDistributed Postgres
Distributed Postgres
Stas Kelvich
 
Introduction to the Archivematica API (September 2018)
Introduction to the Archivematica API (September 2018)Introduction to the Archivematica API (September 2018)
Introduction to the Archivematica API (September 2018)
Artefactual Systems - Archivematica
 
Flink Forward Berlin 2017: Stefan Richter - A look at Flink's internal data s...
Flink Forward Berlin 2017: Stefan Richter - A look at Flink's internal data s...Flink Forward Berlin 2017: Stefan Richter - A look at Flink's internal data s...
Flink Forward Berlin 2017: Stefan Richter - A look at Flink's internal data s...
Flink Forward
 
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companionPGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
PGConf APAC
 
Kubernetes #6 advanced scheduling
Kubernetes #6   advanced schedulingKubernetes #6   advanced scheduling
Kubernetes #6 advanced scheduling
Terry Cho
 
QNIBTerminal: Understand your datacenter by overlaying multiple information l...
QNIBTerminal: Understand your datacenter by overlaying multiple information l...QNIBTerminal: Understand your datacenter by overlaying multiple information l...
QNIBTerminal: Understand your datacenter by overlaying multiple information l...
QNIB Solutions
 
FOSDEM2015: Live migration for containers is around the corner
FOSDEM2015: Live migration for containers is around the cornerFOSDEM2015: Live migration for containers is around the corner
FOSDEM2015: Live migration for containers is around the corner
Andrey Vagin
 
Time Series Processing with Solr and Spark
Time Series Processing with Solr and SparkTime Series Processing with Solr and Spark
Time Series Processing with Solr and Spark
Josef Adersberger
 
Ceph Day Chicago: Using Ceph for Large Hadron Collider Data
Ceph Day Chicago: Using Ceph for Large Hadron Collider Data Ceph Day Chicago: Using Ceph for Large Hadron Collider Data
Ceph Day Chicago: Using Ceph for Large Hadron Collider Data
Ceph Community
 
Like loggly using open source
Like loggly using open sourceLike loggly using open source
Like loggly using open source
Thomas Alrin
 

What's hot (20)

Chronix as Long-Term Storage for Prometheus
Chronix as Long-Term Storage for PrometheusChronix as Long-Term Storage for Prometheus
Chronix as Long-Term Storage for Prometheus
 
Future Science on Future OpenStack
Future Science on Future OpenStackFuture Science on Future OpenStack
Future Science on Future OpenStack
 
Distributed Tests on Pulsar with Fallout - Pulsar Summit NA 2021
Distributed Tests on Pulsar with Fallout - Pulsar Summit NA 2021Distributed Tests on Pulsar with Fallout - Pulsar Summit NA 2021
Distributed Tests on Pulsar with Fallout - Pulsar Summit NA 2021
 
Time series denver an introduction to prometheus
Time series denver   an introduction to prometheusTime series denver   an introduction to prometheus
Time series denver an introduction to prometheus
 
Moving from CellsV1 to CellsV2 at CERN
Moving from CellsV1 to CellsV2 at CERNMoving from CellsV1 to CellsV2 at CERN
Moving from CellsV1 to CellsV2 at CERN
 
KubeCon Prometheus Salon -- Kubernetes metrics deep dive
KubeCon Prometheus Salon -- Kubernetes metrics deep diveKubeCon Prometheus Salon -- Kubernetes metrics deep dive
KubeCon Prometheus Salon -- Kubernetes metrics deep dive
 
OpenNebulaConf2015 2.05 OpenNebula at the Leibniz Supercomputing Centre - Mat...
OpenNebulaConf2015 2.05 OpenNebula at the Leibniz Supercomputing Centre - Mat...OpenNebulaConf2015 2.05 OpenNebula at the Leibniz Supercomputing Centre - Mat...
OpenNebulaConf2015 2.05 OpenNebula at the Leibniz Supercomputing Centre - Mat...
 
OpenNebulaConf2015 1.09.02 Installgems Add-on - Alvaro Simon Garcia
OpenNebulaConf2015 1.09.02 Installgems Add-on - Alvaro Simon GarciaOpenNebulaConf2015 1.09.02 Installgems Add-on - Alvaro Simon Garcia
OpenNebulaConf2015 1.09.02 Installgems Add-on - Alvaro Simon Garcia
 
Building AuroraObjects- Ceph Day Frankfurt
Building AuroraObjects- Ceph Day Frankfurt Building AuroraObjects- Ceph Day Frankfurt
Building AuroraObjects- Ceph Day Frankfurt
 
Containers on Baremetal and Preemptible VMs at CERN and SKA
Containers on Baremetal and Preemptible VMs at CERN and SKAContainers on Baremetal and Preemptible VMs at CERN and SKA
Containers on Baremetal and Preemptible VMs at CERN and SKA
 
Distributed Postgres
Distributed PostgresDistributed Postgres
Distributed Postgres
 
Introduction to the Archivematica API (September 2018)
Introduction to the Archivematica API (September 2018)Introduction to the Archivematica API (September 2018)
Introduction to the Archivematica API (September 2018)
 
Flink Forward Berlin 2017: Stefan Richter - A look at Flink's internal data s...
Flink Forward Berlin 2017: Stefan Richter - A look at Flink's internal data s...Flink Forward Berlin 2017: Stefan Richter - A look at Flink's internal data s...
Flink Forward Berlin 2017: Stefan Richter - A look at Flink's internal data s...
 
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companionPGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
 
Kubernetes #6 advanced scheduling
Kubernetes #6   advanced schedulingKubernetes #6   advanced scheduling
Kubernetes #6 advanced scheduling
 
QNIBTerminal: Understand your datacenter by overlaying multiple information l...
QNIBTerminal: Understand your datacenter by overlaying multiple information l...QNIBTerminal: Understand your datacenter by overlaying multiple information l...
QNIBTerminal: Understand your datacenter by overlaying multiple information l...
 
FOSDEM2015: Live migration for containers is around the corner
FOSDEM2015: Live migration for containers is around the cornerFOSDEM2015: Live migration for containers is around the corner
FOSDEM2015: Live migration for containers is around the corner
 
Time Series Processing with Solr and Spark
Time Series Processing with Solr and SparkTime Series Processing with Solr and Spark
Time Series Processing with Solr and Spark
 
Ceph Day Chicago: Using Ceph for Large Hadron Collider Data
Ceph Day Chicago: Using Ceph for Large Hadron Collider Data Ceph Day Chicago: Using Ceph for Large Hadron Collider Data
Ceph Day Chicago: Using Ceph for Large Hadron Collider Data
 
Like loggly using open source
Like loggly using open sourceLike loggly using open source
Like loggly using open source
 

Similar to Scaling Up Logging and Metrics

Testing kubernetes and_open_shift_at_scale_20170209
Testing kubernetes and_open_shift_at_scale_20170209Testing kubernetes and_open_shift_at_scale_20170209
Testing kubernetes and_open_shift_at_scale_20170209
mffiedler
 
Kubernetes #1 intro
Kubernetes #1   introKubernetes #1   intro
Kubernetes #1 intro
Terry Cho
 
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Kevin Lynch
 
Ippevent : openshift Introduction
Ippevent : openshift IntroductionIppevent : openshift Introduction
Ippevent : openshift Introduction
kanedafromparis
 
PaaSTA: Autoscaling at Yelp
PaaSTA: Autoscaling at YelpPaaSTA: Autoscaling at Yelp
PaaSTA: Autoscaling at Yelp
Nathan Handler
 
Streaming Processing with a Distributed Commit Log
Streaming Processing with a Distributed Commit LogStreaming Processing with a Distributed Commit Log
Streaming Processing with a Distributed Commit Log
Joe Stein
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
Rishabh Indoria
 
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
javier ramirez
 
NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1
Ruslan Meshenberg
 
Open stack HA - Theory to Reality
Open stack HA -  Theory to RealityOpen stack HA -  Theory to Reality
Open stack HA - Theory to Reality
Sriram Subramanian
 
2021.02 new in Ceph Pacific Dashboard
2021.02 new in Ceph Pacific Dashboard2021.02 new in Ceph Pacific Dashboard
2021.02 new in Ceph Pacific Dashboard
Ceph Community
 
Introduction to rook
Introduction to rookIntroduction to rook
Introduction to rook
Rohan Gupta
 
Rook - cloud-native storage
Rook - cloud-native storageRook - cloud-native storage
Rook - cloud-native storage
Karol Chrapek
 
Cncf meetup-rook
Cncf meetup-rookCncf meetup-rook
Cncf meetup-rook
Juraj Hantak
 
7. Cloud Native Computing - Kubernetes - Bratislava - Rook.io
7. Cloud Native Computing - Kubernetes - Bratislava - Rook.io7. Cloud Native Computing - Kubernetes - Bratislava - Rook.io
7. Cloud Native Computing - Kubernetes - Bratislava - Rook.io
Dávid Kőszeghy
 
Kubernetes @ Squarespace: Kubernetes in the Datacenter
Kubernetes @ Squarespace: Kubernetes in the DatacenterKubernetes @ Squarespace: Kubernetes in the Datacenter
Kubernetes @ Squarespace: Kubernetes in the Datacenter
Kevin Lynch
 
Cncf meetup-rook
Cncf meetup-rookCncf meetup-rook
Cncf meetup-rook
Juraj Hantak
 
Tips Tricks and Tactics with Cells and Scaling OpenStack - May, 2015
Tips Tricks and Tactics with Cells and Scaling OpenStack - May, 2015Tips Tricks and Tactics with Cells and Scaling OpenStack - May, 2015
Tips Tricks and Tactics with Cells and Scaling OpenStack - May, 2015
Belmiro Moreira
 
Stop Worrying and Keep Querying, Using Automated Multi-Region Disaster Recovery
Stop Worrying and Keep Querying, Using Automated Multi-Region Disaster RecoveryStop Worrying and Keep Querying, Using Automated Multi-Region Disaster Recovery
Stop Worrying and Keep Querying, Using Automated Multi-Region Disaster Recovery
DoKC
 
Containers > VMs
Containers > VMsContainers > VMs
Containers > VMs
David Timothy Strauss
 

Similar to Scaling Up Logging and Metrics (20)

Testing kubernetes and_open_shift_at_scale_20170209
Testing kubernetes and_open_shift_at_scale_20170209Testing kubernetes and_open_shift_at_scale_20170209
Testing kubernetes and_open_shift_at_scale_20170209
 
Kubernetes #1 intro
Kubernetes #1   introKubernetes #1   intro
Kubernetes #1 intro
 
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
 
Ippevent : openshift Introduction
Ippevent : openshift IntroductionIppevent : openshift Introduction
Ippevent : openshift Introduction
 
PaaSTA: Autoscaling at Yelp
PaaSTA: Autoscaling at YelpPaaSTA: Autoscaling at Yelp
PaaSTA: Autoscaling at Yelp
 
Streaming Processing with a Distributed Commit Log
Streaming Processing with a Distributed Commit LogStreaming Processing with a Distributed Commit Log
Streaming Processing with a Distributed Commit Log
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
 
NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1
 
Open stack HA - Theory to Reality
Open stack HA -  Theory to RealityOpen stack HA -  Theory to Reality
Open stack HA - Theory to Reality
 
2021.02 new in Ceph Pacific Dashboard
2021.02 new in Ceph Pacific Dashboard2021.02 new in Ceph Pacific Dashboard
2021.02 new in Ceph Pacific Dashboard
 
Introduction to rook
Introduction to rookIntroduction to rook
Introduction to rook
 
Rook - cloud-native storage
Rook - cloud-native storageRook - cloud-native storage
Rook - cloud-native storage
 
Cncf meetup-rook
Cncf meetup-rookCncf meetup-rook
Cncf meetup-rook
 
7. Cloud Native Computing - Kubernetes - Bratislava - Rook.io
7. Cloud Native Computing - Kubernetes - Bratislava - Rook.io7. Cloud Native Computing - Kubernetes - Bratislava - Rook.io
7. Cloud Native Computing - Kubernetes - Bratislava - Rook.io
 
Kubernetes @ Squarespace: Kubernetes in the Datacenter
Kubernetes @ Squarespace: Kubernetes in the DatacenterKubernetes @ Squarespace: Kubernetes in the Datacenter
Kubernetes @ Squarespace: Kubernetes in the Datacenter
 
Cncf meetup-rook
Cncf meetup-rookCncf meetup-rook
Cncf meetup-rook
 
Tips Tricks and Tactics with Cells and Scaling OpenStack - May, 2015
Tips Tricks and Tactics with Cells and Scaling OpenStack - May, 2015Tips Tricks and Tactics with Cells and Scaling OpenStack - May, 2015
Tips Tricks and Tactics with Cells and Scaling OpenStack - May, 2015
 
Stop Worrying and Keep Querying, Using Automated Multi-Region Disaster Recovery
Stop Worrying and Keep Querying, Using Automated Multi-Region Disaster RecoveryStop Worrying and Keep Querying, Using Automated Multi-Region Disaster Recovery
Stop Worrying and Keep Querying, Using Automated Multi-Region Disaster Recovery
 
Containers > VMs
Containers > VMsContainers > VMs
Containers > VMs
 

Recently uploaded

一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
upoux
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
IJECEIAES
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
171ticu
 
Curve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods RegressionCurve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods Regression
Nada Hikmah
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
upoux
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
Generative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdfGenerative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdf
mahaffeycheryld
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
Anant Corporation
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf
Yasser Mahgoub
 
morris_worm_intro_and_source_code_analysis_.pdf
morris_worm_intro_and_source_code_analysis_.pdfmorris_worm_intro_and_source_code_analysis_.pdf
morris_worm_intro_and_source_code_analysis_.pdf
ycwu0509
 
TIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptxTIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptx
CVCSOfficial
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
UReason
 
Digital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptxDigital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptx
aryanpankaj78
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
ecqow
 
CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1
PKavitha10
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
shadow0702a
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 

Recently uploaded (20)

一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
 
Curve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods RegressionCurve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods Regression
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
Generative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdfGenerative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdf
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf
 
morris_worm_intro_and_source_code_analysis_.pdf
morris_worm_intro_and_source_code_analysis_.pdfmorris_worm_intro_and_source_code_analysis_.pdf
morris_worm_intro_and_source_code_analysis_.pdf
 
TIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptxTIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptx
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
 
Digital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptxDigital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptx
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
 
CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 

Scaling Up Logging and Metrics

  • 1. Scaling Up Logging and Metrics Ricardo Lourenço < rlourenc@redhat.com > Elvir Kuric < ekuric@redhat.com >
  • 2. Agenda ● Performance and Scale ● OCP Logging stack ○ Overview ○ Test harness ○ Large clusters ○ Scaling Up ○ ● OCP Metrics stack ○ Overview ● Tools used ● Sample results
  • 4. We test individual components for limits. Then we scale them up. We focus on OpenShift’s control plane. Then we target any underlying systems. Components: ElasticSearch, Kibana, Cassandra, FluentD, Heapster, Java, Ruby...
  • 5. Users need a way to collect statistics about nodes in a cluster and send those logs to an external database. ● Elasticsearch is a distributed system by itself. ○ Collects logs from node services and all containers in the cluster. ○ Should be deployed with redundancy and persistent storage for scale and high availability. ○ Labels (region=infra) and Node Selectors. ● Fluentd ○ Gathers log entries from nodes, enriching them with metadata. ○ Feeds them into Elasticsearch. ○ Deployed using DaemonSets, Labels (logging-infra-fluentd). ● Kibana ○ presents a web UI for browsing and visualizing logs in Elasticsearch. Logging stack overview
  • 7. MaxRequestsInFlight Partial list of consumers: ● FluentD pods talk to the apiserver to get metadata for the pods such as its namespace, pod name, host. ● openshift-node talks with the apiserver for command and control. ● SDN $ kube-apiserver --help | grep inflight --max-requests-inflight int The maximum number of requests in flight at a given time. When the server exceeds this, it rejects requests. Zero for no limit. (default 400) servingInfo: bindAddress: 0.0.0.0:8443 bindNetwork: tcp4 certFile: master.server.crt clientCA: ca.crt keyFile: master.server.key maxRequestsInFlight: 500 requestTimeoutSeconds: 3600
  • 8. ReplicationController The ReplicationController makes sure that a pod or homogeneous set of pods are always up and available. If there are too many pods, it will kill some. If there are too few, the ReplicationController will start more. ● The Replication Controller is limited by the scheduler and scheduling cycle. ● The DaemonSet binds directly to the node, and bypasses the scheduler entirely. Burst replicas on both daemonsets and rc is set to 500. This essentially creates a step f(n) from 0-500 ~O(1) time. apiVersion: v1 kind: ReplicationController metadata: name: nginx spec: replicas: 3 selector: app: nginx template: metadata: name: nginx labels: app: nginx spec: containers: - name: nginx image: nginx ports: - containerPort:80
  • 9. DaemonSet A way to run a daemon on every node, or on a certain set of nodes in a cluster. Use a a DS instead of a ReplicationController for pods that provide a machine-level function, such as machine monitoring or machine logging. Use cases: ● building a sharded datastore. ● running a logger on every node. ● cluster-level applications with strong node ties, and Openshift / Kubernetes node services. The DaemonSet is used to run Fluentd on every node and send the data to a service like ElasticSearch for analysis.
  • 10. pkg/controller/replication/replication_controller.go // performance requirements for kubernetes 1.0. BurstReplicas = 500 // The number of times we retry updating a replication controller's status. // It resumes normal action after observing the watch events for them.
  • 11. pkg/controller/daemon/daemoncontroller.go // performance requirements for kubernetes 1.0. BurstReplicas = 500 // If sending a status update to API server fails, we retry a finite number of times. // It resumes normal action after observing the watch events for them.
  • 13. ES Queue capacity At 10250 pods (50 logger pods @ ~205 OCP nodes) Logging a 256 Byte string per second we've hit the ES bulk queue capacity.
  • 14. Fluentd Buffer chunk limit The memory buffer plugin provides a fast buffer implementation. It uses memory to store buffer chunks. When Fluentd is shut down, buffered logs that can’t be written quickly are deleted.
  • 15. Logging throughput test ● Features: ○ Full logging project deployment. ○ Automated testing with pbench integration. ■ Loading up a cluster with logging traffic at different rates. ■ Collect pbench data while containers are logging. ○ Other logging drivers are also supported through the -d parameter. ■ Json-file, fluentd, journald
  • 16. Test description Phase 1 - Before the loggers and pbench start Delete all indexed data so that data from previous runs doesn’t add up. $ oc exec $es_pod -- curl -XDELETE "$es_url/*" Gets ES node stats through the API $ oc exec $es_pod -- curl $es_url/_stats?pretty Captures disk usage under /var/lib/origin/openshift.local.volumes/pods/ Phase 2 - Generate load Start X logger pods across N OCP cluster nodes, logging pre-defined random string at a chosen logging rate. Registers pbench tools across chosen cluster nodes: iostat mpstat pidstat proc-vmstat sar turbostat Phase 3 - After the run finishes. Optimize and flush indexes. $ oc exec $es_pod -- curl -XPOST "$es_url/_refresh" $ oc exec $es_pod -- curl -XPOST "$es_url/_optimize?only_expunge_deletes=true&flush=true" Like in phase 1, gets ES, OC stats, logs and disk usage for your pbench --remote nodes.
  • 19. 30wppn - 205nodes - 1hour test.
  • 20. Recommendations ● It is highly recommended to pre-pull the fluentd images (> 200 nodes). ○ ImagePullPolicy: IfNotPresent should be set in the deployer.yaml file. ● After deploying the region=infra pods, labeling your nodes should be done in steps/batches of 20 nodes at a time while keeping an eye open for any "MatchNodeSelector|CrashLoopBackOff|ImagePullFailed|Error" status. ● Use labels and selectors to differentiate infrastructure and application nodes ● Use large persistent volumes (PVs) for infrastructure nodes running logging (Elasticsearch) and metrics (Cassandra)
  • 22. OCP Metrics stack - Overview ● Cassandra ○ Serves as datastore - all metrics data are written to Cassandra db ● Hawkular metrics storage engine ● Heapster ○ Collects metrics data from pods
  • 24.
  • 29. Hawkular “It provides means of creating, accessing and managing historically stored metrics via an easy to use json based REST interface.” Per : https://github.com/openshift/origin-metrics
  • 30. OCP metrics setup ● Manual setup ○ Enter commands on master ○ Edit /etc/master/master-config.yaml ○ Restart master ● Using advanced installer ○ Set up all in ansible playbook https://docs.openshift.com/enterprise/3.1/install_confi g/cluster_metrics.html
  • 31. Scaling metrics pods ● We can add more ○ Cassandra pods ○ Hawkular pods ● Only one heapster pod per cluster
  • 35. OpenShift metrics scale numbers ● It was successfully ran on clusters up to 1000 nodes ( 210 and 981 nodes cluster ) ● Cassandra storage requirements are ○ 2.5 GB / day and monitored 1000 pods ○ 17.5 GB / day and 10k pods ● METRICS_DURATION=7(days) ● METRICS_RESOLUTION=15(s)
  • 36. OpenShift Metrics scaling issues ● Heapster is not catching up with massive number of pods monitored > 12k pods in OCP cluster ● Up to 12k pods it works good ● BZ 1388815 ● Monitoring Microservices on OpenShift with HOSA Hawkular project :
  • 37. Thing to follow : HOSA ● Monitoring Microservices on OpenShift with HOSA ○ Hawkular OpenShift Agent (HOSA) Blog post from hawkular team : http://www.hawkular.org/blog/2017/01/17/obst-hosa. html?_lrsc=4c8f78df-8f03-4630-bd54-128a24998599&s c_cid=701600000011zELAAY
  • 38. Thank you! Q & A ? GitHub ● https://github.com/redhat-performance ● http://github.com/openshift/svt Ricardo Lourenço rlourenc@redhat.com; Elvir Kuric ekuric@redhat.com