PostgreSQL on Windows

Similar documents
CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study

CS3600 SYSTEMS AND NETWORKS

Operating System Structures

PAYMENTVAULT TM LONG TERM DATA STORAGE

Example of Standard API

Best Practices for Using MySQL in the Cloud

Setting up PostgreSQL

Monitoring PostgreSQL database with Verax NMS

Audit & Tune Deliverables

CS420: Operating Systems OS Services & System Calls

PostgreSQL Backup Strategies

Capacity planning for IBM Power Systems using LPAR2RRD.

Chapter 5: Operating Systems Part 1

HP Storage Essentials Storage Resource Management Software end-to-end SAN Performance monitoring and analysis

Administering your PostgreSQL Geodatabase

Supported DBMS platforms DB2. Informix. Enterprise ArcSDE Technology. Oracle. GIS data. GIS clients DB2. SQL Server. Enterprise Geodatabase 9.

3. PGCluster. There are two formal PGCluster Web sites.

Q N X S O F T W A R E D E V E L O P M E N T P L A T F O R M v Steps to Developing a QNX Program Quickstart Guide

Debugging Multi-threaded Applications in Windows

Enterprise Manager Performance Tips

Solving Performance Problems In SQL Server by Michal Tinthofer

theguard! ApplicationManager System Windows Data Collector

10 STEPS TO YOUR FIRST QNX PROGRAM. QUICKSTART GUIDE Second Edition

OS Thread Monitoring for DB2 Server

The System Monitor Handbook. Chris Schlaeger John Tapsell Chris Schlaeger Tobias Koenig

Testing for Security

IBM Tivoli Composite Application Manager for Microsoft Applications: Microsoft Hyper-V Server Agent Version Fix Pack 2.

ConcourseSuite 7.0. Installation, Setup, Maintenance, and Upgrade

The safer, easier way to help you pass any IT exams. Exam : C_HANASUP_1. SAP Certified Support Associate - SAP HANA 1.0.

Oracle 11g: RAC and Grid Infrastructure Administration Accelerated R2

Oracle and Sybase, Concepts and Contrasts

Developing, Deploying, and Debugging Applications on Windows Embedded Standard 7

for QSS/OASIS Presented by Bill Genske Session 135

Module 10: Maintaining Active Directory

Tivoli Monitoring for Databases: Microsoft SQL Server Agent

Linux Tools for Monitoring and Performance. Khalid Baheyeldin November 2009 KWLUG

HP-UX Essentials and Shell Programming Course Summary

Operating Systems. Design and Implementation. Andrew S. Tanenbaum Melanie Rieback Arno Bakker. Vrije Universiteit Amsterdam

Outline. Operating Systems Design and Implementation. Chap 1 - Overview. What is an OS? 28/10/2014. Introduction

Sitecore Health. Christopher Wojciech. netzkern AG. Sitecore User Group Conference 2015

IBM Tivoli Monitoring Version 6.3 Fix Pack 2. Infrastructure Management Dashboards for Servers Reference

INTRODUCTION ADVANTAGES OF RUNNING ORACLE 11G ON WINDOWS. Edward Whalen, Performance Tuning Corporation

Top 10 Performance Tips for OBI-EE

Host Hardening. OS Vulnerability test. CERT Report on systems vulnerabilities. (March 21, 2011)

Integrity Checking and Monitoring of Files on the CASTOR Disk Servers

Chapter 8 Objectives. Chapter 8 Operating Systems and Utility Programs. Operating Systems. Operating Systems. Operating Systems.

HARFORD COMMUNITY COLLEGE 401 Thomas Run Road Bel Air, MD Course Outline CIS INTRODUCTION TO UNIX

Postgres Enterprise Manager Getting Started Guide

MyOra 3.5. User Guide. SQL Tool for Oracle. Kris Murthy

How to test and debug an ASP.NET application

MyOra 3.0. User Guide. SQL Tool for Oracle. Jayam Systems, LLC

Deploying PostgreSQL in a Windows Enterprise

IBM Tivoli Monitoring Version 6.3 Fix Pack 2. Windows OS Agent Reference

Agenda. Enterprise Application Performance Factors. Current form of Enterprise Applications. Factors to Application Performance.

Security Correlation Server Quick Installation Guide

Features. The Samhain HIDS. Overview of available features. Rainer Wichmann

Chapter 6, The Operating System Machine Level

Kiko> A personal job scheduler

User's Guide - Beta 1 Draft

Print Audit 4 Network Install Guide

Capacity Planning for Microsoft SharePoint Technologies

SOLIDWORKS Enterprise PDM - Troubleshooting Tools

latest Release 0.2.6

System Structures. Services Interface Structure

Incremental Backup Script. Jason Healy, Director of Networks and Systems

Getting Started with Telerik Data Access. Contents

Chapter Contents. Operating System Activities. Operating System Basics. Operating System Activities. Operating System Activities 25/03/2014

Chapter 3 Operating-System Structures

Practical Performance Understanding the Performance of Your Application

Integrating SNiFF+ with the Data Display Debugger (DDD)

UNISOL SysAdmin. SysAdmin helps systems administrators manage their UNIX systems and networks more effectively.

MONITORING PERFORMANCE IN WINDOWS 7

Deploying and Optimizing SQL Server for Virtual Machines

Optimize VDI with Server-Side Storage Acceleration

Eliminate Memory Errors and Improve Program Stability

User's Guide - Beta 1 Draft

Best practices for operational excellence (SharePoint Server 2010)

Configure AlwaysOn Failover Cluster Instances (SQL Server) using InfoSphere Data Replication Change Data Capture (CDC) on Windows Server 2012

CHAPTER 17: File Management

IBM Tivoli Monitoring V6.2.3, how to debug issues with Windows performance objects issues - overview and tools.

Red Hat Linux Internals

Functions of NOS Overview of NOS Characteristics Differences Between PC and a NOS Multiuser, Multitasking, and Multiprocessor Systems NOS Server

SQL Server Instance-Level Benchmarks with DVDStore

Oracle BI EE 11g - Security Auditing

STUDY GUIDE CHAPTER 4

Using MySQL for Big Data Advantage Integrate for Insight Sastry Vedantam

GlobalSCAPE DMZ Gateway, v1. User Guide

Chapter 4. Operating Systems and File Management

The Asterope compute cluster

Monitoring disk stats with Cacti

In the same spirit, our QuickBooks 2008 Software Installation Guide has been completely revised as well.

SP Apps Performance test Test report. 2012/10 Mai Au

Release Notes scvenus 2.5.3

CSE 544 Principles of Database Management Systems. Magdalena Balazinska Fall 2007 Lecture 5 - DBMS Architecture

Architecture and Mode of Operation

Compute Cluster Server Lab 3: Debugging the parallel MPI programs in Microsoft Visual Studio 2005

DB2 for Linux, UNIX, and Windows Performance Tuning and Monitoring Workshop

Transcription:

PostgreSQL on Windows Magnus Hagander magnus@hagander.net PGCon, Ottawa May 2007 1

Agenda Why PostgreSQL on Windows PostgreSQL for the Windows user Windows for the PostgreSQL user Advances in 8.3 2

Why PostgreSQL on Windows Isn t Linux better? Often, but not always Several scenarios Developer laptops Desktop database Migration scenarios Corporate policies 3

Agenda Why PostgreSQL on Windows PostgreSQL for the Windows user Windows for the PostgreSQL user Advances in 8.3 4

PostgreSQL for the Windows user Unix inheritance Multi-process, not multi-thread Shared memory Requires modern windows (2000+, no FAT) Commandline! psql, pg_dump, pg_dumpall, etc pgadmin3 to the rescue! 5

PostgreSQL for the Windows user Environment variables Configuration files No registry Edit with any text editor (e.g. notepad) Edit with pgadmin3 Still just a textfile Signal server to reload (pause service) Security Will not run with administrative privileges 6

Agenda Why PostgreSQL on Windows PostgreSQL for the Windows user Windows for the PostgreSQL user Advances in 8.3 7

Windows for the PostgreSQL user It s a brave new world None of the normal tools No ps No kill No top No cron Nothing at all (almost) Builtin Windows tools are generally bad 8

Architectural differences Runs as a service Windows version of daemon Started by Service Control Manager Has it s own login and session Logs to a file or eventlog Startup errors always to eventlog CreateProcess() instead of fork() Extra important to use connection pooling 9

Installing PostgreSQL Use the MSI External languages need to be in PATH Perl, python, tcl etc Path is per user or per system Or install from source Complex, non-standard build environment 8.3 supports MSVC, but still complex 10

Installing PostgreSQL - tips Turn off all unnecessary services Install data on dedicated filesystem If possible, on dedicated spindles Use a junction or disk mount for xlog Mount with noatime fsutil behavior set disablelastaccess 1 Disable 8.3 filename generation fsutil behavior set disable8dot3 1 11

Configuration parameters shared memory Workload dependant Smaller is better?! fsync methods open_datasync (o_direct in 8.3) fsync_writethrough log_destination lc_xyz 12

Managing PostgreSQL Get the right tools! http://www.microsoft.com/ technet/sysinternals Process Explorer (the tool for Win32) pstools Process monitor (debugging) Junction (tablespaces, xlog location) 13

Managing PostgreSQL Get the right tools! http://www.microsoft.com/ technet/sysinternals http://www.microsoft.com Process Explorer (the tool for Win32) /technet/sysinternals pstools Process monitor (debugging) Junction (tablespaces, xlog location) 14

Library dependencies On Unix: ldd On Windows depends In the Windows Support Tools Traverses all dependencies 15

Process title Unix: 16

Process title Win32: 17

Process title Win32: 18

Finding stuck processes Unix: 19

Finding stuck processes Win32: 20

Monitoring PostgreSQL Some things really didn t change pg_stat_xyz Has not changed at all PostgreSQL logs pg_data\*.log Don t forget eventlog! 21

Monitoring PostgreSQL Performance Monitor Standard Windows monitoring still applies! Monitoring the whole server Looking at individual backends Looking at the whole cluster 22

Monitoring PostgreSQL Performance Monitor Standard Windows monitoring still applies! Monitoring the whole server Looking at individual backends Looking at the whole cluster 23

Monitoring PostgreSQL Performance Monitor Standard Windows monitoring still applies! Monitoring the whole server Looking at individual backends Looking at the whole cluster 24

Monitoring PostgreSQL Performance Monitor Standard Windows monitoring still applies! Monitoring the whole server Looking at individual backends Looking at the whole cluster 25

Interesting counters to watch Number of processes New process creations Memory usage (private bytes, working set) Context switches / second Processor queue length 26

Interesting counters to watch I/O operations / second I/O bytes / second Physical disk queue length Logical disk\avg sec / read or write xlog: <10ms data: <50ms Logical disk\disk transfers / sec 27

Monitoring with Process Explorer Add extra columns Private bytes Local backend memory WS Shareable / WS Shared Shared buffers + shared code Virtual Size Just address space Context switch delta Expensive on Windows! 28

Agenda Why PostgreSQL on Windows PostgreSQL for the Windows user Windows for the PostgreSQL user Advances in 8.3 29

Advances in 8.3 Main build is now built with Visual C++ More efficient binaries Works with Windows Debugger Tools Works with Visual Studio debugger and profiler Support for detached symbols 30

Windows debugger support in 8.3 Debugger backtrace of mingw build 31

Windows debugger support in 8.3 Debugger backtrace of msvc build 32

Windows debugger support in 8.3 Debugger backtrace of msvc build 33

Windows debugger support in 8.3 Local symbols supported! 34

Using windbg Step 0 configure symbol directory 35

Using windbg Step 1 attach to running backend Figured out pid using previous methods 36

Using windbg Step 2 watch it load 37

Using windbg Step 3 set a breakpoint 38

Using windbg Step 4 run and hit breakpoint Step 5 load whatever views are needed 39

Visual Studio debugger Much better actual debugger Work off symbols or source tree Suitable for development, not production 40

Thank you! Questions? 41