pg_statsinfo and pg_stats_reporter are open source PostgreSQL monitoring and reporting tools developed by NTT. pg_statsinfo collects database statistics and activity from PostgreSQL servers and operating system resources and stores them in a repository database. pg_stats_reporter visualizes the collected statistics in reports. The tools provide in-depth monitoring of database performance and help identify optimization opportunities.
The Query Optimizer is the “brain” of your Postgres database. It interprets SQL queries and determines the fastest method of execution. Using the EXPLAIN command , this presentation shows how the optimizer interprets queries and determines optimal execution.
This presentation will give you a better understanding of how Postgres optimally executes their queries and what steps you can take to understand and perhaps improve its behavior in your environment.
To listen to the webinar recording, please visit EnterpriseDB.com > Resources > Ondemand Webcasts
If you have any questions please email sales@enterprisedb.com
The Query Optimizer is the “brain” of your Postgres database. It interprets SQL queries and determines the fastest method of execution. Using the EXPLAIN command , this presentation shows how the optimizer interprets queries and determines optimal execution.
This presentation will give you a better understanding of how Postgres optimally executes their queries and what steps you can take to understand and perhaps improve its behavior in your environment.
To listen to the webinar recording, please visit EnterpriseDB.com > Resources > Ondemand Webcasts
If you have any questions please email sales@enterprisedb.com
A guide for what to pay attention to when it comes to monitoring and managing your PostgreSQL database. The content is targeted at application developers as opposed to the typical DBA.
In the age of data science and machine learning, data scientists want access to data sets quickly, but organizations often need to protect private data, whether due to internal policy or government regulations.
In this talk we discuss how to leverage PostgreSQL for managing organization-wide data access while protecting privacy.
Topics include:
Purpose-based data access
Federating data
Foreign data wrappers
Masking
Differential Privacy
Auditing
PostgreSQL is one of the most advanced relational databases. It offers superb replication capabilities. The most important features are: Streaming replication, Point-In-Time-Recovery, advanced monitoring, etc.
Part 3 of the SQL Tuning workshop examines the different aspects of an execution plan, from cardinality estimates to parallel execution and explains what information you should be gleaming from the plan and how it affects the execution. It offers insight into what caused the Optimizer to make the decision it did as well as a set of corrective measures that can be used to improve each aspect of the plan.
Taming the Tiger: Tips and Tricks for Using TelegrafInfluxData
On 17th May as part of InfluxDays EMEA 2021 Virtual Experience, the Technical Services team will be offering a free live InfluxDB training to the first 300 registered attendees. This will be hosted over Zoom with two main trainers and there will be assistants to help participants with the course work. The training will be recorded and made available on the InfluxDays website and the InfluxData YouTube channel.
PGConf APAC 2018 - Monitoring PostgreSQL at ScalePGConf APAC
Speaker: Lukas Fittl
Your PostgreSQL database is one of the most important pieces of your architecture - yet the level of introspection available in Postgres is often hard to work with. Its easy to get very detailed information, but what should you really watch out for, send reports on and alert on?
In this talk we'll discuss how query performance statistics can be made accessible to application developers, critical entries one should monitor in the PostgreSQL log files, how to collect EXPLAIN plans at scale, how to watch over autovacuum and VACUUM operations, and how to flag issues based on schema statistics.
We'll also talk a bit about monitoring multi-server setups, first going into high availability and read standbys, logical replication, and then reviewing how monitoring looks like for sharded databases like Citus.
The talk will primarily describe free/open-source tools and statistics views readily available from within Postgres.
OSMC 2021 | pg_stat_monitor: A cool extension for better database (PostgreSQL...NETWAYS
The pg_stat_monitor is the statistics collection tool based on PostgreSQL’s contrib module pg_stat_statements. PostgreSQL’s pg_stat_statements provides only basic statistics, which is sometimes not enough. The major shortcoming in pg_stat_statements is that it accumulates all the queries and statistics, but does not provide aggregated statistics or histogram information. In this case, a user needs to calculate the aggregate, which is quite expensive. Pg_stat_monitor provides the pre-calculated aggregates. pg_stat_monitor collects and aggregates data on a bucket basis. The size and number of buckets should be configured using GUC (Grand Unified Configuration). The buckets are used to collect the statistics and aggregate them in a bucket. The talk will cover the usage of pg_stat_monitor and how it is better than pg_stat_statements.
A guide for what to pay attention to when it comes to monitoring and managing your PostgreSQL database. The content is targeted at application developers as opposed to the typical DBA.
In the age of data science and machine learning, data scientists want access to data sets quickly, but organizations often need to protect private data, whether due to internal policy or government regulations.
In this talk we discuss how to leverage PostgreSQL for managing organization-wide data access while protecting privacy.
Topics include:
Purpose-based data access
Federating data
Foreign data wrappers
Masking
Differential Privacy
Auditing
PostgreSQL is one of the most advanced relational databases. It offers superb replication capabilities. The most important features are: Streaming replication, Point-In-Time-Recovery, advanced monitoring, etc.
Part 3 of the SQL Tuning workshop examines the different aspects of an execution plan, from cardinality estimates to parallel execution and explains what information you should be gleaming from the plan and how it affects the execution. It offers insight into what caused the Optimizer to make the decision it did as well as a set of corrective measures that can be used to improve each aspect of the plan.
Taming the Tiger: Tips and Tricks for Using TelegrafInfluxData
On 17th May as part of InfluxDays EMEA 2021 Virtual Experience, the Technical Services team will be offering a free live InfluxDB training to the first 300 registered attendees. This will be hosted over Zoom with two main trainers and there will be assistants to help participants with the course work. The training will be recorded and made available on the InfluxDays website and the InfluxData YouTube channel.
PGConf APAC 2018 - Monitoring PostgreSQL at ScalePGConf APAC
Speaker: Lukas Fittl
Your PostgreSQL database is one of the most important pieces of your architecture - yet the level of introspection available in Postgres is often hard to work with. Its easy to get very detailed information, but what should you really watch out for, send reports on and alert on?
In this talk we'll discuss how query performance statistics can be made accessible to application developers, critical entries one should monitor in the PostgreSQL log files, how to collect EXPLAIN plans at scale, how to watch over autovacuum and VACUUM operations, and how to flag issues based on schema statistics.
We'll also talk a bit about monitoring multi-server setups, first going into high availability and read standbys, logical replication, and then reviewing how monitoring looks like for sharded databases like Citus.
The talk will primarily describe free/open-source tools and statistics views readily available from within Postgres.
OSMC 2021 | pg_stat_monitor: A cool extension for better database (PostgreSQL...NETWAYS
The pg_stat_monitor is the statistics collection tool based on PostgreSQL’s contrib module pg_stat_statements. PostgreSQL’s pg_stat_statements provides only basic statistics, which is sometimes not enough. The major shortcoming in pg_stat_statements is that it accumulates all the queries and statistics, but does not provide aggregated statistics or histogram information. In this case, a user needs to calculate the aggregate, which is quite expensive. Pg_stat_monitor provides the pre-calculated aggregates. pg_stat_monitor collects and aggregates data on a bucket basis. The size and number of buckets should be configured using GUC (Grand Unified Configuration). The buckets are used to collect the statistics and aggregate them in a bucket. The talk will cover the usage of pg_stat_monitor and how it is better than pg_stat_statements.
This is the presentation I delivered on Hadoop User Group Ireland meetup in Dublin on Nov 28 2015. It covers at glance the architecture of GPDB and most important its features. Sorry for the colors - Slideshare is crappy with PDFs
EnterpriseDB's Best Practices for Postgres DBAsEDB
This presentation reviews techniques to become a high performance Postgres DBA such as:
- Day to day monitoring
- Ongoing maintenance tasks including bloat and index maintenance
- Database and OS parameter tuning for performance
Security practices
- Planning for production deployment
- High availability best practices including strategies for backup and recovery
- Ideas for professional development
To listen to the recording of this presentation, visit Enterprisedb.com > Resources > Webcasts > On Demand Webcasts
How to use postgresql.conf to configure and tune the PostgreSQL serverEDB
Tuning your PostgreSQL server plays an important role in making sure you get the most out of your server resources, and running with default parameters is not always enough. Using the PostgreSQL server configuration file postgresql.conf, we can tune the right area and make the most out of the server resources. The postgresql.conf file tuning parameters are classified into different categories including database connections, memory, optimizers, and logging.
In this webinar, you will learn:
- A basic understanding of postgresql.conf
- The categories and parameters of postgresql.conf
- How to adjust parameters
- Expert tuning recommendations
This talk is divided into multiple parts, starting with a basic introduction into the popular opensource database management software postgresql.
Building upon that operational aspects of a postgresql cluster instance will be discussed with a focus on what can, should and must be monitored and what kind of tools and nagios related plugins are available.
The final part of the talk gives an insight into the complex and distributed nature of the postgresql.org infrastructure and how nagios plays a crucial role as the central monitoring and alerting platform for the sysadmin team.
New enhancements for security and usability in EDB 13EDB
EDB 13 is here and it enhances our flagship database server and tools. This webinar will explore its security, usability, and portability updates. Join us to learn how EDB 13 can help you improve your PostgreSQL productivity and data protection.
Webinar highlights include:
- New security features such as SCRAM and the encryption of database passwords and traffic between Failover Manager agents
- Usability updates that automate partitioning, verify backup integrity, and streamline the management of failover and backups
- Portability improvements that simplify running PostgreSQL across on-premise and cloud environments
Closed-Loop Platform Automation by Tong Zhong and Emma CollinsLiz Warner
Closed-loop automation would dramatically help with the network transformation which is central to our business. Building a general analytics workflow to support various use cases (such as power management, fault prediction, networking slicing, etc.) is a critical component in the overall platform.
Closed Loop Platform Automation - Tong Zhong & Emma CollinsLiz Warner
Closed-loop automation would dramatically help with the network transformation which is central to our business. Building a general analytics workflow to support various use cases (such as power management, fault prediction, networking slicing, etc.) is a critical component in the overall platform.
Task Resource Consumption Prediction for Scientific Applications and WorkflowsRafael Ferreira da Silva
Presentation held at the Algorithms and Scheduling Techniques to Manage Resilience and Power Consumption in Distributed Systems 2015 Seminar - Dagstuhl
Estimates of task runtime, disk space usage, and memory consumption, are commonly used by scheduling and resource provisioning algorithms to support efficient and reliable scientific application executions. Such algorithms often assume that accurate estimates are available, but such estimates are difficult to generate in practice. In this work, we first profile real scientific applications and workflows, collecting fine-grained information such as process I/O, runtime, memory usage, and CPU utilization. We then propose a method to automatically characterize task requirements based on these profiles. Our method estimates task runtime, disk space, and peak memory consumption. It looks for correlations between the parameters of a dataset, and if no correlation is found, the dataset is divided into smaller subsets using the statistical recursive partitioning method and conditional inference trees to identify patterns that characterize particular behaviors of the workload. We then propose an estimation process to predict task characteristics of scientific applications based on the collected data. For scientific workflows, we propose an online estimation process based on the MAPE-K loop, where task executions are monitored and estimates are updated as more information becomes available. Experimental results show that our online estimation process results in much more accurate predictions than an offline approach, where all task requirements are estimated prior to workflow execution.
What's New in Postgres Plus Advanced Server 9.3EDB
Learn more about EnterpriseDB's Postgres Plus Advanced Server 9.3!
Highlights of Postgres Plus Advanced Server 9.3 include:
Major Partitioning Enhancements
Materialized Views
New RPM packages
New EDB Failover Manager
New capabilities in Postgres Enterprise Manager 4.0
Best Practices for Becoming an Exceptional Postgres DBA EDB
Drawing from our teams who support hundreds of Postgres instances and production database systems for customers worldwide, this presentation provides real-real best practices from the nation's top DBAs. Learn top-notch monitoring and maintenance practices, get resource planning advice that can help prevent, resolve, or eliminate common issues, learning top database tuning tricks for increasing system performance and ultimately, gain greater insight into how to improve your effectiveness as a DBA.
There are multiple reasons to restore a database from a backup. Under rare circumstances, this might even become necessary in a production environment. In that case, the business will probably require you to restore to the latest point in time, known to hold valid data.
This presentation examines specific scenarios to achieve minimal or no data loss using point-in-time recovery (PITR) to an exact date and time, a particular transaction, and a savepoint.
Target Audience: This presentation is intended for solution architects and DBAs, who are responsible for designing and supporting Postgres database environments.
Flink Forward San Francisco 2018: Gregory Fee - "Bootstrapping State In Apach...Flink Forward
Apache Flink is a popular stream computing framework for real-time stream computing. Many stream compute algorithms require trailing data in order to compute the intended result. One example is computing the number of user logins in the last 7 days. This creates a dilemma where the results of the stream program are incomplete until the runtime of the program exceeds 7 days. The alternative is to bootstrap the program using historic data to seed the state before shifting to use real-time data. This talk will discuss alternatives to bootstrap programs in Flink. Some alternatives rely on technologies exogenous to the stream program, such as enhancements to the pub/sub layer, that are more generally applicable to other stream compute engines. Other alternatives include enhancements to Flink source implementations. Lyft is exploring another alternative using orchestration of multiple Flink programs. The talk will cover why Lyft pursued this alternative and future directions to further enhance bootstrapping support in Flink.
Improve your SQL workload with observabilityOVHcloud
How to see everything in our perimeter? Better yet, how to make sure everyone can follow the activity of their databases? Developers are not used to watch (closely) their databases performance, how to share this knowledge and make it accessible? This is the challenge we have set ourselves. One year later we can share our experience. Scaling is not always throwing resource on a design issue. What if observability was not just a buzzword, but had a real impact on production?
Similar to Introduction of pg_statsinfo and pg_stats_reporter ~Statistics Reporting Tool for DBA~ (20)
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Let's dive deeper into the world of ODC! Ricardo Alves (OutSystems) will join us to tell all about the new Data Fabric. After that, Sezen de Bruijn (OutSystems) will get into the details on how to best design a sturdy architecture within ODC.
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Introduction of pg_statsinfo and pg_stats_reporter ~Statistics Reporting Tool for DBA~
1. Introduction of
pg_̲statsinfo and pg_̲stats_̲reporter
~∼ Statistics Reporting Tool for DBA ~∼
NTT Open Source Software Center
Mitsumasa KONDO
Copyright(c)2013 NTT Corp. All Rights Reserved.
2. About Me
• Official
C ompany
N ame
• Nippon
Telegraph
and
Telephone
C orporation
• My
B elonging
• Service
innovation
Laboratory,
S oftware
Innovation
C enter
Researcher
• My
w ork
• Middleware
development
for
PostgreSQL
• pg_statsinfo,
pg_stats_reporter
• High
A vailability
PostgreSQL
C luster
using
replication
with
Pacemaker
• PostgreSQL
community
development
• Improvement
of
disk
IO
bottle
neck
• Past
w ork
• Data
mining,
Natural
Language
Processing,
Machine
Learning,
Recommendation,
Information
Retrieval
• I
have
already
been
good
at
them
than
databaseJ
• Hobby
• Photography
• Pure
A udio
Copyright(c)2013 NTT Corp. All Rights Reserved.
2
3. Todayʼ’s Introduction Software
• pg_statsinfo
• Monitor and Collect PostgreSQL Statistics and Activities
• pg_stats_reporter
• Visualize PostgreSQL Statistics and Activities getting from
pg_̲statsinfo
Creating
report
pg_statsinfo
DB Server A
pg_statsinfo
DB Server B
Database
Statistics
and
Activity
pg_stats_reporter
Store of DB
statistics
pg_statsinfo
DB Server C
Repository
Database
Sample report which was created by
pg_stats_reporter
Copyright(c)2013 NTT Corp. All Rights Reserved.
3
4. Contents
• pg_statsinfo
~
M onitor
and
C ollect
DB
S tatistics
and
A ctivities
~
• What is pg_̲statsinfo ?
• Feature Introduction
• Demo
• pg_stats_reporter
~
V isualize
DB
S tatistics
and
A ctivities
~
• What is pg_̲stats_̲reporter ?
• Feature introduction
• Demo
• Visualizing
D BT-‐2
B enchmark
u sing
p g_statsinfo
a nd
pg_stats_reporter
• Introduction of DBT-‐‑‒2
• Visualized DBT-‐‑‒2 by pg_̲stats_̲reporter
• For more performance
Copyright(c)2013 NTT Corp. All Rights Reserved.
4
5. Contents
• pg_statsinfo
~
M onitor
and
C ollect
DB
S tatistics
and
A ctivities
~
• What is pg_̲statsinfo ?
• Feature Introduction
• Demo
• pg_stats_reporter
~
V isualize
DB
S tatistics
and
A ctivities
~
• What is pg_̲stats_̲reporter ?
• Feature introduction
• Demo
• Visualizing
D BT-‐2
B enchmark
u sing
p g_statsinfo
a nd
pg_stats_reporter
• Introduction of DBT-‐‑‒2
• Visualized DBT-‐‑‒2 by pg_̲stats_̲reporter
• For more performance
Copyright(c)2013 NTT Corp. All Rights Reserved.
5
6. What is pg_̲statsinfo ?
• Monitoring
a nd
C ollecting
PostgreSQL
S tatistics
a nd
A ctivities
•
•
•
•
Collecting statistics and activities
All tables in pg_̲catalog schema
pg_̲log information
OS resources
• Other Features
•
•
•
•
Create Report by command line
Alert and Monitoring function
Log management function
Auto repositoryDB management
• Other
r elative
i nformation
• BSD License
• Latest version is 2.5.0
Collective Database Statistics
• http://pgfoundry.org /frs /?group_̲id=1000422
• Working on PostgreSQL 9.3!
• Web online manual is here
• http://pgstatsinfo.projects.pgfoundry.org /pg_̲statsinfo-‐‑‒ja.html
Copyright(c)2013 NTT Corp. All Rights Reserved.
6
7. Architecture of pg_̲statsinfo
• Programing
L anguage
• C
• Starting
a nd
P re-‐Setting
m ethod
• Start pg_̲statsinfo via shared_̲preload_̲library
• Add postgresql.conf to pg_̲statsinfo configuration, then it
can start normally in PostgreSQL.
• System
C onfiguration
• Install pg_̲statsinfo in monitoring instance
• Not need to install in repository database instance
• Monitoring instance and repository database can set
together incetance
pg_catalog
pg_log
OS resources
pg_statsinfod
Collect and send
database statistics
(Snapshot)
Statistics of
database
Monitoring
Repository
instance Copyright(c)2013 NTT Corp. All Rights Reserved.
database
7
8. Features of pg_̲statsinfo 1/5
• Collect
s tatistics
a nd
a ctivities
i n
PostgreSQL
• All information gathering PostgreSQLʼ’s statistics collector
(ex. pg_̲catalog)
• Detail of statistics collector, please see PostgreSQL
documentJ
• http://www.postgresql.jp /document /9.2/html /monitoring-‐‑‒stats.html
• Get statistcs as snapshot at uniformity time
• Default every 10 minute
• Analyze pg_̲log and get activities from logs
• Get activities which only output pg_̲log
• Checkpoint activities
• VACUUM activities
• Get OS resources information in /proc
• Get every 5 seconds in sampling, when get snapshot, insert
average values of sampling
• CPU usage information(idle, iowait, system, user, Load Average)
• Memory usage information(memfree, buffers, cached, swap, dirty)
• Disk usage information(IO size, IO time, usage size of disk)
Copyright(c)2013 NTT Corp. All Rights Reserved.
8
9. Features of pg_̲statsinfo 2/5
• Create
r eports
o n
c ommand
l ine
• Output text format report on command line
• Example) Database admin or SQL Engineer who wants to
see database statistics
• Cover almost all report item created by pg_̲stats_̲reporter
Command example: Create report for all monitor instances on 2013-10-1 to now
$ pg_statsinfo -U postgres -B 2013-10-01 -r ALL | less
Copyright(c)2013 NTT Corp. All Rights Reserved.
9
11. Features of pg_̲statsinfo 3/5
• Auto
m aintenance
r epository
d atabase
f eature
• Delete statistics that stored in repository database
automatically
• Pg_̲statsinfo stored data that are used partitioning method per day.
• So it can use TRUNCATE to delete old data
• Delete data is faster and lower cost
• Note
• When we use in multi monitor instance, giving priority to
shortest maintenance period of stored data configuration
Repository
database
Maintenance period
of stored data config
pg_statsinfo
Get and Send
1 week
DB server A
database
statistics
Maintenance period
of stored data config
pg_statsinfo
2 weeks
DB server B
Default maintenance
period of stored
Store of data is 1 weeks
database
statistics
Copyright(c)2013 NTT Corp. All Rights Reserved.
11
12. Features of pg_̲statsinfo 4/5
• Log
management
feature
• Easy to manage PostgreSQLʼ’s log
• Log filtering feature
• Can set log level in pg_̲statsinfo, it means that we can having two log level
• example)PostgreSQLʼ’s log level is lower setting to save detail information, and
pg_̲statsinfo log level is higher setting to easy to read in daily
• This feature can fix log file name(ex. postgresql.log) It can use in monitoring log
sof tware.
• Multi output log feature
• Can output syslog and pg_̲log
• Change log level feature
• If you want to change log level in especially log message, we can change it
• ex)change log level INFO to LOG in especially log message
• Log compression and managing feature
• Compress old logs and manage automatically
pg_statsinfod
pg_log
(csv format)
log formulation
Log by statsinfo
(postgresql.log)
Flow of extraction statistics from pg_log
Copyright(c)2013 NTT Corp. All Rights Reserved.
12
13. Features of pg_̲statsinfo 5/5
• Alert
a nd
M onitoring
F unction
( Trigger
F unction)
• Output alert log when over the alert thresholds in database
• usage)monitor alert log by monitoring software
• Alert function is executed in every snapshot
• Default setting is under following, set property value on
your server
• Setting method is UPDATE SQL for statsrepo.alert table
Alert configuration table
colum
name
default
instid
-
rollback_tps
100
commit_tps
1000
Number of commit per seconds (sec)
garbage_size
20000
Garbage records size in the table(%)
garbage_percent
30
Garbage records percentage in the database(%)
garbage_percent_table
30
Garbage records percentage in the table(%)
response_avg
10
average response time in the query (sec)
response_worst
60
Worst response time in the query (sec)
enable_alert
explanation
Target instance ID
Number of rollback (sec)
true
Enable alert function
Copyright(c)2013 NTT Corp. All Rights Reserved.
13
14. How to install pg_̲statsinfo ?
1. Install RPM file’s
$ su
# rpm –ivh pg_statsinfo-2.50-1.pg93.rhel6.x86_64.rpm
2. Add configuration to postgresql.conf
#minimum configuration
shared_preload_libraries = ‘pg_statsinfo’ # pre-load library setting
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # configuration of log file’s (must need)
3. Start PostgreSQL in normally
$ pg_ctl –D data start
4. If we see under following log messages, install was succeed !
server starting
LOG: loaded library "pg_statsinfo"
LOG: pg_statsinfo launcher started
LOG: start
LOG: installing schema: statsinfo
LOG: installing schema: statsrepo_partition
How to install pg_statsinfo is indicated in Web manual ! J
http://pgstatsinfo.projects.pgfoundry.org/pg_statsinfo-ja.html#install
Copyright(c)2013 NTT Corp. All Rights Reserved.
14
15. Demo of pg_̲statsinfo
1.Install
2.Confirmation
o f
I nstall
3.Collect
Database
S tatistics
and
A ctivities
(Snapshot)
4.Create
Report
Copyright(c)2013 NTT Corp. All Rights Reserved.
15
16. TIPS of pg_̲statsinfo
• One
s napshot
s ize
i s
3 00kB
~
8 00kB
• Be careful disk full by snapshots!
• Software
i nstalling
d egradation
i s
a lmost
n othing
• But little bit happen. In DBT-‐‑‒2 benchmark, we confirm 2%
degradation.
• If
y ou’d
l ike
t o
s eparate
r epository
s erver,
s et
“pg_statsinfo.repository_server”
i n
p ostgresql.conf
.
• Default setting is ʻ‘host=localhost port=5432ʼ’
• If
y ou
u se
p assword
i n
r epository
d atabase,
s et
/ var/lib/
pgsql/.pgpass
• pg_̲statsinfo works on postgres user
Copyright(c)2013 NTT Corp. All Rights Reserved.
16
17. Contents
• pg_statsinfo
~
M onitor
and
C ollect
DB
S tatistics
and
A ctivities
~
• What is pg_̲statsinfo ?
• Feature Introduction
• Demo
• pg_stats_reporter
~
V isualize
DB
S tatistics
and
A ctivities
~
• What is pg_̲stats_̲reporter ?
• Feature introduction
• Demo
• Visualizing
D BT-‐2
B enchmark
u sing
p g_statsinfo
a nd
pg_stats_reporter
• Introduction of DBT-‐‑‒2
• Visualized DBT-‐‑‒2 by pg_̲stats_̲reporter
• For more performance
Copyright(c)2013 NTT Corp. All Rights Reserved.
17
18. What is pg_̲stats_̲reporter ?
• Visualization
PostgreSQL
s tatistics
a nd
a ctivities
g etting
f rom
pg_statsinfo
• Report items
• Transaction situation
• Size of Database
• OS resources
• Amount of WAL output
• Replication state
• Deadlock information
• Successor software of
pg_̲reporter
• Extra
i nformation
• BSD License
• Latest version is 2.0.0
Report of pg_stats_reporter
• http://pgfoundry.org /frs /?group_̲id=1000422
• Detail online manual is here
• http://pgstatsinfo.projects.pgfoundry.org /pg_̲stats_̲reporter-‐‑‒ja.html
Copyright(c)2013 NTT Corp. All Rights Reserved.
18
19. Architecture of pg_̲stats_̲reporter
• Software
• Apache + PHP + PostgreSQL
• Only PHP + PostgreSQL combination is OK
• Need PostgreSQL 8.3 later
• Programing
L anguage
• PHP + javascript + SQL
• Using
L ibrary
• PHP framework
• Smarty
• User Interface
• jQuery, jQuery UI, tablesorter, Superfish
• Creating graph
• dygraphs, jqPlot
Copyright(c)2013 NTT Corp. All Rights Reserved.
19
20. How to Create Report ? 1/2
• By
W ab
B rowser
• Only a few clicks for creating report.
② Push
“create new
report” button
③ Set term and
time of report
① Select
database instance
for reporting
Copyright(c)2013 NTT Corp. All Rights Reserved.
20
21. How to Create Report ? 2/2
• By
c ommand
l ine
• It works on phpʼ’s stand alone mode.
• Usage scene
• Create report in command line.
• Create reports by crond in regular intervals.
• If you use only command line mode, Apache wasnʼ’t
needed
• If you have security policy which cannot install Apache
• Need to save reports in long term
• Repository database is saved until certain terms
• Created reports arenʼ’t erased.
Command usage: Create report in 10/1 to 10/8 at report_dir
$ pg_stats_reporter -B 2013-10-01 -E 2013-10-08 -O report_dir
[LOG] Report file created: sample_localhost_5432_1_20131008-1419_20131008-1945.html
Copyright(c)2013 NTT Corp. All Rights Reserved.
21
22. How to Create Report ? 2/2
• Index
o f
Report
f eature
• Create report and index of reports in report directory
• It is easy to see and sort out reports
Directory of
Report
Libraly of
pg_stats_reporter
Index.html
Reports which
were created past
Index of report
Report HTML 1
Report HTML2
Copyright(c)2013 NTT Corp. All Rights Reserved.
22
23. How to install pg_̲stats_̲reporter ?
1. Install pg_stats_reporter RPM and dependency RPMs
$ su
# rpm –ivh httpd-2.2.15-15.el6_2.1.x86_64.rpm
php-5.3.3-3.el6_2.8.x86_64.rpm
php-common-5.3.3-3.el6_2.8.x86_64.rpm
php-pgsql-5.3.3-3.el6_2.8.x86_64.rpm
php-intl-5.3.3-3.el6_2.8.x86_64.rpm
pg_stats_reporter-1.0.0-1.el6.noarch.rpm
2. Set pg_stats_reporter.ini(configuration file) (default setting is under following)
# vim /etc/pg_stats_reporter.ini
----- configuration of repository database -----
host = localhost
port = 5432
dbname = postgres
username = postgres
password =
3. Start Apache HTTP server
# service httpd start
4. Access under following URL
http://localhost/pg_stats_reporter/pg_stats_reporter.php
Please set
SELINUX disable!!
How to install pg_stats_reporter is indicated in Web manual ! J
http://pgstatsinfo.projects.pgfoundry.org/pg_stats_reporter-ja.html#install
Copyright(c)2013 NTT Corp. All Rights Reserved.
23
25. TIPS of pg_̲stats_̲reporter
• Android
a nd
i Pad
a re
r eady
• It
i s
b ased
o n
j QueryUI
l ibrary,
s o
w e
c an
e asy
t o
c hange
interface
d esign
( mostly
c olor)
• Logo picture can be also changed with file replaced
• It
c an
s elect
r eport
i tems
o n
r eports
• If weʼ’d like to, set /etc /pg_̲stats_̲reporter.ini with your
needed report item
• For
S ecurity
• We can use .httpaccess
• Apacheʼ’s security technic can use in same
Copyright(c)2013 NTT Corp. All Rights Reserved.
25
26. Contents
• pg_statsinfo
~
M onitor
and
C ollect
DB
S tatistics
and
A ctivities
~
• What is pg_̲statsinfo ?
• Feature Introduction
• Demo
• pg_stats_reporter
~
V isualize
DB
S tatistics
and
A ctivities
~
• What is pg_̲stats_̲reporter ?
• Feature introduction
• Demo
• Visualizing
D BT-‐2
B enchmark
u sing
p g_statsinfo
a nd
pg_stats_reporter
• Introduction of DBT-‐‑‒2
• Visualized DBT-‐‑‒2 by pg_̲stats_̲reporter
• For more performance
Copyright(c)2013 NTT Corp. All Rights Reserved.
26
27. What is DBT-‐‑‒2?
• TPC-‐C
b enchmark
s oftware
t hat
d eveloped
b y
O pen
Source
D evelopment
L abs(OSDL)
• Shopping simulation in parts wholesaler
• http://www.tpc.org /tpcc /
• Benchmark score is calculated by only response in
uniformity time
• Response time is very important!
• IO bottle-‐‑‒neck benchmark
• Mainly
b enchmark
p arameter
• warehouse
• Database size parameter
• Increase one hundred thousands record per adding 1 parameter
• Mainly used coordination size of database
• TPW
• Transaction per warehouse
• Prepared clients corresponding warehouse size, Default 10
• If we set lower TPW, it will be CPU bottle-‐‑‒necked benchmark
Copyright(c)2013 NTT Corp. All Rights Reserved.
27
28. Transaction Tendency in DBT-‐‑‒2
• Mainly
b ottle-‐neck
• Random read /write
• Almost SQL plans are index scan
• Random read /write performance and cache or buffer
replace performance are important
• Parallel execution performance is also important
• PostgreSQL is better than other RDBMSJ
• Other
f eatures
• Plan of SQLs are very simple
• Most of SQLs are only index scan access.
• Exist ideal Benchmark score
• If DB response all transactions in limit time, it is be ideal
score
• Limit of performance is memory 2x equals database
size.
• Amount of WAL output is less than pgbench, WAL is not
bottle-‐‑‒neck.
Copyright(c)2013 NTT Corp. All Rights Reserved.
28
29. Test Server and Settings of postgresql.conf
Server
HP DL360 G7
CPU
Xeon E5640 2.66GHz (1P/4C)
Memory
DDR3-10600R-9 18GB
RAID card
P410i / 256MB cache
Disk
4 x 146GB(1.5krpm) RAID 1 + 0
postgresql.conf
(mainly
changed
parameter)
max_connections = 300
shared_buffers = 2458MB
work_mem = 1MB
maintenance_work_mem = 64MB
fsync = on
wal_sync_method = fdatasync
full_page_writes = on
wal_buffers = -1
archive_mode = on
checkpoint_segments = 300
checkpoint_timeout = 15min
checkpoint_completion_target = 0.7
random_page_cost = 2.0
effective_cache_size = 9GB
default_statistics_target = 10
log_destination = 'syslog’
autovacuum = on
Wherehouse
size
= Copyright(c)2013 NTT Corp. All Rights Reserved.PW
=
10
320(database
size
is
about
40GB)
and
T
29
30. Visualizing DBT-‐‑‒2 by pg_̲stats_̲reporter 1/5
• Transaction
Situation
• It was seen fluctuates transactions. It is because some benchmark
specifications and some implementation dependent in PostgreSQL
• Lower performance in executing CHECKPOINT
• CHECKPOINT was mainly caused by checkpoint_̲timeout
• postgresql.conf sets checkpoint_̲timeout = 15min and checkpoint_̲segments = 300
Copyright(c)2013 NTT Corp. All Rights Reserved.
30
31. Visualizing DBT-‐‑‒2 by pg_̲stats_̲reporter 2/5
• Amount
o f
WAL
o utput
• Output 4.6GB WAL in data load to benchmark finished
• In data load, Maximum WAL speed is 54MB/sec
• In executing benchmark test, Maximum WAL speed is 12MB/
sec
• When starting CHECKPOINT, WAL Speed is higher, it is
because “full page write”.
Copyright(c)2013 NTT Corp. All Rights Reserved.
31
32. Visualizing DBT-‐‑‒2 by pg_̲stats_̲reporter 3/5
• CPU
u sage
• Iowait is most, next is idle (It indicates IO bottle-‐‑‒neck situation.)
• Part of final CHECKPOINT causes high Load Average
• It is because executing ugly consecutive fsync().
• PostgreSQL CHECKPOINT logic is not goodL
Copyright(c)2013 NTT Corp. All Rights Reserved.
32
33. Visualizing DBT-‐‑‒2 by pg_̲stats_̲reporter 4/5
• Update
a nd
h eavily
a ccess
Tables
• HOT(Heap on Tuple) is good working!
• order_̲line table and stock table have many access
• Each tableʼ’s Cache hit rate are very high, but… (Is it really?L)
Copyright(c)2013 NTT Corp. All Rights Reserved.
33
34. Visualizing DBT-‐‑‒2 by pg_̲stats_̲reporter 5/5
• Query
e xecuted
s ituation
• Queries which have complicated filter phrase is slow
• Unexpected, COMMIT assumes long time!
• It is because long transaction COMMIT needs lot of WAL (WAL
buffer writing)
• Final CHECKPOINT fsync() phase makes queries slower
Copyright(c)2013 NTT Corp. All Rights Reserved.
34
35. For More Performance
• Use
d irect_cp
i n
a rchive
c opy
c ommand
• When we use archive mode in PostgreSQL, cp command
consume large amount of waste file cache, and it is
caused lower performance
• BSD License Software
• http://directcp.projects.pgfoundry.org /index.html
• Use
S SD
• In general, database bottle-‐‑‒neck is random access. SSD
has 10 times faster random access than MD
• If you need large disk or donʼ’t have cost, you may use
tablespace in only hot table, it is very efficiency.
• Use
l arge
R AID
c ache
c ard
• PostgreSQL CHECKPOINT does not consider fsync()
schedule at all. It is caused very heavy disk write and
fail overL
• If you use large raid cache card, it may prevent a little.
Copyright(c)2013 NTT Corp. All Rights Reserved.
35
36. Summary
• pg_statsinfo
• Monitor and Collect PostgreSQL Statistics and Activities with
time series
• BSD License
• http://pgstatsinfo.projects.pgfoundry.org /pg_̲statsinfo-‐‑‒ja.html
• Collect whole of statistics an activities for DB admin needed
• If youʼ’d like to another new report, Create reporting SQL from
collecting information
• pg_stats_reporter
• Visualize PostgreSQL Statistics and Activities that are
collected by pg_̲statsinfo
• BSD License
• http://pgstatsinfo.projects.pgfoundry.org /pg_̲stats_̲reporter-‐‑‒ja.html
• jQuery Based Useful Interface
• Report index feature is also useful
• It is easy to improve software, because it is created by PHP
+ JavaScript
• It is also easy to submit patchJ
Copyright(c)2013 NTT Corp. All Rights Reserved.
36