PostgreSQL Enhancement PopSQL Daniel Basilio, Eril Berkok Julia Canella, Mark Fischer Misiu Godfrey, Andrew Heard.

Slides:



Advertisements
Similar presentations
Performance Testing - Kanwalpreet Singh.
Advertisements

Distributed Processing, Client/Server and Clusters
Database Architectures and the Web
The Zebra Striped Network File System Presentation by Joseph Thompson.
Distributed Databases John Ortiz. Lecture 24Distributed Databases2  Distributed Database (DDB) is a collection of interrelated databases interconnected.
OpenFlow-Based Server Load Balancing GoneWild
Adding scalability to legacy PHP web applications Overview Mario A. Valdez-Ramirez.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
CS 415 N-Tier Application Development By Umair Ashraf July 2nd,2013 National University of Computer and Emerging Sciences Lecture # 7 N-Tier Architecture.
Copyright 2007, Information Builders. Slide 1 Workload Distribution for the Enterprise Mark Nesson, Vashti Ragoonath June, 2008.
Business Continuity and DR, A Practical Implementation Mich Talebzadeh, Consultant, Deutsche Bank
Technical Architectures
Internet Networking Spring 2006 Tutorial 12 Web Caching Protocols ICP, CARP.
Locality-Aware Request Distribution in Cluster-based Network Servers 1. Introduction and Motivation --- Why have this idea? 2. Strategies --- How to implement?
1 Spring Semester 2007, Dept. of Computer Science, Technion Internet Networking recitation #13 Web Caching Protocols ICP, CARP.
Overview Distributed vs. decentralized Why distributed databases
Benefits of Early Cache Miss Determination Memik G., Reinman G., Mangione-Smith, W.H. Proceedings of High Performance Computer Architecture Pages: 307.
Data Storage and Data Processing Architectures The difficulty is in the choice George Moore, 1900.
©Company confidential 1 Performance Testing for TM & D – An Overview.
70-293: MCSE Guide to Planning a Microsoft Windows Server 2003 Network, Enhanced Chapter 7: Planning a DNS Strategy.
Conceptual Architecture of PostgreSQL
Chapter 9 Overview  Reasons to monitor SQL Server  Performance Monitoring and Tuning  Tools for Monitoring SQL Server  Common Monitoring and Tuning.
National Manager Database Services
Network Topologies.
Conceptual Architecture of PostgreSQL PopSQL Andrew Heard, Daniel Basilio, Eril Berkok, Julia Canella, Mark Fischer, Misiu Godfrey.
N-Tier Architecture.
Chapter 5 Roles and features. objectives Performing management tasks using the Server Manager console Understanding the Windows Server 2008 roles Understanding.
1 The Google File System Reporter: You-Wei Zhang.
Chapter 16 – DNS. DNS Domain Name Service This service allows client machines to resolve computer names (domain names) to IP addresses DNS works at the.
Module 12: Designing an AD LDS Implementation. AD LDS Usage AD LDS is most commonly used as a solution to the following requirements: Providing an LDAP-based.
ABSTRACT Zirous Inc. is a growing company and they need a new way to track who their employees working on various different projects. To solve the issue.
GeoGrid: A scalable Location Service Network Authors: J.Zhang, G.Zhang, L.Liu Georgia Institute of Technology presented by Olga Weiss Com S 587x, Fall.
Application-Layer Anycasting By Samarat Bhattacharjee et al. Presented by Matt Miller September 30, 2002.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Csi315csi315 Client/Server Models. Client/Server Environment LAN or WAN Server Data Berson, Fig 1.4, p.8 clients network.
Scalable Web Server on Heterogeneous Cluster CHEN Ge.
Orbited Scaling Bi-directional web applications A presentation by Michael Carter
Session-8 Data Management for Decision Support
Distributed Database Systems Overview
G063 - Distributed Databases. Learning Objectives: By the end of this topic you should be able to: explain how databases may be stored in more than one.
SQLRX – SQL Server Administration – Tips From the Trenches SQL Server Administration – Tips From the Trenches Troubleshooting Reports of Sudden Slowdowns.
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Serverless Network File Systems Overview by Joseph Thompson.
® IBM Software Group © 2007 IBM Corporation Best Practices for Session Management
Data Sharing. Data Sharing in a Sysplex Connecting a large number of systems together brings with it special considerations, such as how the large number.
Securing Passwords Against Dictionary Attacks Presented By Chad Frommeyer.
1 Copyright © 2005, Oracle. All rights reserved. Following a Tuning Methodology.
1 Chapter Overview Monitoring Access to Shared Folders Creating and Sharing Local and Remote Folders Monitoring Network Users Using Offline Folders and.
Alex Chee Daniel LaBare Mike Oster John Spann Bryan Unbangluang Collaborative Document Sharing In Conjunction With.
Presentation 3: Designing Distributed Objects. Ingeniørhøjskolen i Århus Slide 2 af 16 Outline Assumed students are knowledgeable about OOP principles.
Configuring SQL Server for a successful SharePoint Server Deployment Haaron Gonzalez Solution Architect & Consultant Microsoft MVP SharePoint Server
A Fragmented Approach by Tim Micheletto. It is a way of having multiple cache servers handling data to perform a sort of load balancing It is also referred.
Cofax Scalability Document Version Scaling Cofax in General The scalability of Cofax is directly related to the system software, hardware and network.
Performance Driven Database Design for Scalable Web Applications Jozsef Patvarczki, Murali Mani, and Neil Heffernan Scaling up web applications requires.
N-Tier Architecture.
Oracle Subledger Accounting
Redundancy Control For PostgreSQL
LCGAA nightlies infrastructure
Distributed DBMS Concepts of Distributed DBMS
Distributed File Systems
Conceptual Architecture of PostgreSQL
Conceptual Architecture of PostgreSQL
Distributed File Systems
Conceptual Architecture of PostgreSQL
Cloud Computing Architecture
Distributed File Systems
CS510 - Portland State University
Virtual Memory: Working Sets
Database System Architectures
Client/Server Computing and Web Technologies
Presentation transcript:

PostgreSQL Enhancement PopSQL Daniel Basilio, Eril Berkok Julia Canella, Mark Fischer Misiu Godfrey, Andrew Heard

Presentation Overview Problem Enhancement Implications of our proposal SAAM Analysis o Chosen Approach o Alternate Approach Use Case Concurrency and Team Issues Testing Impact Lessons Learned Limitations Conclusion

Enhancement: The Problem A commonly referenced problem of PostgreSQL is its limited scalability Because the postmaster MUST be on the same machine as all back end instances, PostgreSQL cannot scale out back end instance processing. Currently, the only solution is to scale up. This limits the amount of users who can connect to a PostgreSQL database at any given time.

Enhancement: The Solution PostgreSQL already allows data to be spread out over machines. This functionality is controlled primarily by the access subsystem. Our idea: Allow postgreSQL to distribute query processing across multiple machines. Because every machine needs to access the same data, act on the same table locks, and return the same results - several changes will have to be made to the PostgreSQL architecture

Enhancement: Implications In order to realize our enhancement, several changes need to be made to the existing architecture, primarily: o The Client Communications Manager and Server Process subsystems needs to be able to remotely create Backend Instances and connect the client to remote machines o The Data Control subsystem needs to be replicated through all machines with processing capabilities, and kept up to date, so that all machines know where the data are

New Conceptual Architecture Diagram 1: New Conceptual Architecture

Changes to Postmaster After implementing our enhancement, there are two cases the postmaster must consider: o If the backend instance is created on the same machine as the postmaster, then nothing changes. o If the backend instance is created on a new machine, then the postmaster has to forward new connection information to the client so that they can re-connect to a new machine How does the postmaster know where to create new backend instances? Answer: Load Balancing

Load Balancer Subsystem A new subsystem designed to balance the clients and workload assigned to each machine The Load Balancer receives CPU usage stats from each machine (generated within the new Data Sync Subsystem within Database Control) periodically so it is aware of the state each machine is in The Load Balancer will replace the Postmaster in talking to the client. When connected to, it chooses the machine with the smallest CPU usage and tells that machine to create a new Backend Instance. It then forwards contact information back to the client and disconnects.

Load Balancer and Creating a New Backend Instance Diagram 2: Shows the data flow amongst the Load Balancer and the Server Processes scaled out on different machines

CPU Maxing Issues If a machine's CPU consumption reaches its configured maximum, it will not be given new clients by the Load Balancer. Machines which are being used more heavily than first assumed, can put in a request with the Load Balencer to have one of its current users re-connect to another machine. This request is activated by the Data Synchronization subsystem. Requests are granted or denied depending on the number of other machines and their respective workloads.

What happens if a machine dies? If a machine dies the Load Balancer will not receive the CPU usage stats from the machine. It will then know that the machine has died and needs to be fixed and that no new clients should be directed there This works if the machine is dedicated only to processing If the machine holds necessary storage data, other machines will be unable to access it and will return a server error If the central server machine (the initial point of access) dies, the system, like the pre-enhancement system, will not be able to receive any connections.

The States of a Machine Diagram 3: The states of a machine

StakeholdersNon-Functional Requirements PostgreSQL Development Group Maintainability, Scalability, Portability, Manageability Companies that use PostgreSQL & Stakeholders in that company Reliability, Scalability, Performance, Security, Usability User of PostgreSQL powered software Reliability, Performance SAAM Analysis

First Approach: Forward Pointers As an alternative to the bulletin board, it was proposed that if a machine did not know where certain data live, it would instead ask its neighbor, who would perform the same process This system avoids the use of shared memory, but has the "worst case scenario" of a machine needing to query every other machine before it can update its map of the data system. This could cause significant time lag and it was decided that a small portion of shared memory would be necessary Doesn't include a convenient way to implement synchronized statistics.

Advantages/Disadvantages Performance - Worst case: if the data do not exist will go through every machine. Very slow. Reliability - Load Balancer will prevent machines from overloading Scalability - Splitting Backend Instances from Postmaster onto different machines allows horizontal scaling out. No shared memory. Manageability - Troubleshooting becomes more difficult as more machines add complexity Security - Still only one point of entry to system Affordability - Ease to implement forward pointing Access Managers

Chosen Approach: Bulletin Board Subsystem The bulletin board subsystem is a repository that maintains a listing of all data locations, updates statistical changes. When a machine creates a new table, or shifts a data location, it posts an update on the bulletin board for all machines to see. When each machine gets an update from the board, it will increment a counter. When all computers have checked an update it can be removed from the bulletin board, minimizing its size. Computers will poll the bulletin board at fixed intervals to remain up to date. Also, if a computer does not know the location of a piece of data it will check the bulletin board before determining that it does not exist.

Advantages/Disadvantages Performance - Worst case only has to check Bulletin Board Reliability - Load Balancer will prevent machines from overloading Scalability - Splitting Backend Instances from Postmaster onto different machines allows horizontal scaling out. Bulletin Board still has to be scaled up, but it is comparatively small Manageability - Troubleshooting becomes more difficult as more machines add complexity Security - Still only one point of entry to system Affordability - Difficult to implement repository style of Bulletin Board

Changes to Access Control If all Backend Instances over multiple machines tried to contact a central Access Manager a bottleneck would occur on the machine o so each machine will have its own Access Manager that has control over the data on that machine If a different Access Manager needs to access data on a different machine, must talk to that machine's Access Manager o therefore all Access Managers must be able to communicate with each other

Data Synchronization Subsystem New subsystem in charge of maintaining synchronized data Maintains tables of where data live One Data Sync subsystem will contain the bulletin board for data updates between Access Managers and every Data Sync subsystem will be able to consult that bulletin board Updates statistics and keeps tables up to date Since locks are maintained by whichever machine the retrieved data is sitting on, this subsystem does not have to worry about the current lock-state of data in the system

Access Control Diagram 4: Shows the data flow within the Database Control subsystem and the connection between Access Managers on different machines

Concurrency Issues Concurrency issues were solved in the original PostgreSQL by using MVCC and the lock manager The main reason to have the accesses talk to each other is that if a piece of data is locked by its local access (whether because that machine or others are using it) then other's cannot also use it, which keeps MVCC and locks as they currently are. This adds no new concurrency issues to PostgreSQL

Team Issues Team issues are handled primarily by seperation of functionality such that different developers can change functionality without effecting changes elsewhere. Since the Access subsystem already acts as a facade for the backend processes, our changes to Access should not affect other subsystems. Because separation of functionality is maintained, team issues after our improvement is implemented should remain the same as they were before.

Use Case Diagram 5: Establishing connecting between user and Backend Instance

Testing impact of enhancement with other features Regression Testing is required to test that nothing has been broken and no integration problems have occured Stress test to see if the Load Balancer actually works in preventing overloaded machines Test that the Access Manager can handle finding data that is not on its own machine by referring to the Bulletin Board.

Lessons Learned There are many different ways to architecturally implement one change Worst case scenarios for implementations must be considered Choosing an exact implementation took a while since so many possibilities and trade offs between performance and ease of implementation had to be considered Effective distribution is difficult to build into a legacy system and should typically be planned from the start

Limitations Difficult to know if new implementation will cause integration issues among subsystems Had to assume systems could have certain functionality, for example: Access Manager subsystems could talk to each other across machines Objects such as the Bulletin Board and Load Balancer will still need to scale up as the project scales out because they contain an amount of information proportional to the amount of machines in the system

Conclusions High level ideas for Implementation developed quickly but deciding on low level implementation proved to be more difficult The performance of the system proved to be the largest differentiator between the two implementations we chose between This improvement will be invaluable to PostgreSQL users because the system will now be able to scale to handle extremely large loads