SlideShare a Scribd company logo
1 of 84
Performance
Whack-a-Mole
“The database is so fast. I don't
 know if we'll ever max it out.”
                     -- Not Your Client, Inc.
“My database is slow.”
        -- Every Single Support Client LLC
Part 1:
The Rules
The Stack


                                        Application
   Queries     Transactions


                                        Middleware
   Drivers     Connections    Caching


                                        PostgreSQL
   Schema        Config


                                   Operating System
  Filesystem     Kernel


                                          Hardware
   Storage      RAM/CPU       Network
The Stack


                                        Application
   Queries     Transactions


                                        Middleware
   Drivers     Connections    Caching


                                        PostgreSQL
   Schema        Config


                                   Operating System
  Filesystem     Kernel


                                          Hardware
                RAM/CPU
   Storage                    Network
The Stack


            Application

            Middleware


            PostgreSQL

                OS


                HW
Rules of Whack-a-Mole
1.Most “database performance problems”, or
  Moles, are not actually database performance
  problems.
The Hockey Stick
Affect on Performance




                        Ranked Issues
The Hockey Stick
Affect on Performance




                        Ranked Issues
Rules of Whack-a-Mole
1.Most “database performance problems”, or
  Moles, are not actually database performance
  problems.
2.Less than 10% of Moles cause 90% of
  performance degradation.
  ● corollary: we don't care about the other 90% of Moles
The Hockey Stick
Affect on Performance




                        Ranked Issues
Rules of Whack-a-Mole
1.Most “database performance problems”, or
  Moles, are not actually database performance
  problems.
2.Less than 10% of Moles cause 90% of
  performance degradation.
  ● corollary: we don't care about the other 90% of Moles
3.At any time, it is usually only possible to observe
  and troubleshoot the “largest” Mole.
What Color Is My Application?
W ▶Web Application (Web)
     ● DB smaller than RAM
     ● 90% or more simple read queries
O ▶Online Transaction Processing (OLTP)
     ● DB slightly larger than RAM to 1TB
     ● 20-40% small data write queries
     ● Some long transactions
D ▶Data Warehousing (DW)
     ●   Large to huge databases (100GB to 100TB)
     ●   Large complex reporting queries
     ●   Large bulk loads of data
     ●   Also called quot;Decision Supportquot; or quot;Business Intelligencequot;
What Color Is My Application?
W ▶Web Application (Web)
     ● CPU-bound
     ● Moles: caching, pooling, connection time
O ▶Online Transaction Processing (OLTP)
     ● CPU or I/O bound
     ● Moles: locks, cache, transactions, write speed, log


D ▶Data Warehousing (DW)
     ● I/O or RAM bound
     ● Moles: seq scans, resources, bad queries
Rules of Whack-a-Mole
1.Most “database performance problems”, or
  Moles, are not actually database performance
  problems.
2.Less than 10% of Moles cause 90% of
  performance degradation.
  ● corollary: we don't care about the other 90% of Moles
3.At any time, it is usually only possible to observe
  and troubleshoot, or Whack, the “largest” Mole.
4.Different application types usually have different
  Moles and need different troubleshooting.
Part 2:
Baseline
What's a Baseline?
▶Gather information about the system
  ● you need to know what's happening at every level of the stack
  ● identify potential trouble areas to come back to later
▶Basic Setup
  ●   check the hardware/OS setup for sanity
  ●   apply the conventional postgresql.conf calculations
  ●   do conventional wisdom middleware and application setup
  ●   should be fast run-though, like an hour
Why Baseline?
▶Why not just go straight to Whacking?
  ● extremely poor basic setup may mask more serious issues
  ● baseline setup may turn out to be all that's needed
  ● deviations from baseline can be clues to finding Moles
  ● baseline will make your setup comparable to other
    installations so you can check tests
  ● clients/sysadmins/developers are seldom a reliable source of
    bottleneck information
Steps for Baseline


      1.Hardware setup
      2.Filesystem & OS Setup
      3.PostgreSQL.conf
      4.Drivers, Pooling & Caching
      5.Application Setup Information
Steps for Baseline


5.                                         Application
      Queries     Transactions


4.                                         Middleware
      Drivers     Connections    Caching


3.                                         PostgreSQL
      Schema        Config


2.                                    Operating System
     Filesystem     Kernel


                                             Hardware
      Storage      RAM/CPU       Network
1.
Hardware Baseline
▶Gather Data
  ● Server
         CPU model, speed, number, arch
     ▬

         RAM quantity, speed, configuration
     ▬

  ● Storage
         Interface (cards, RAID)
     ▬

         Disk type, size, speed
     ▬

         Array/SAN configuration
     ▬

  ● Network
         network type and bandwith
     ▬

         devices and models
     ▬

         switch/routing configuration
     ▬
Hardware Baseline
▶Baseline
  ● Storage
         Use appropriate RAID configuration
     ▬

         Turn on write caching if safe
     ▬

         Make sure you're using all channels/devices
     ▬

  ● Network
         application servers & DB server should be on dedicated
     ▬

         network
         use redundant connections & load balancing if available
     ▬
Storage Decision Tree
lots of              fits in
                                       no RAID
           No                  Yes
writes?              RAM?
                No
     Yes

      afford
                               terabytes         HW RAID
     good HW                               No
                      Yes
                                of data?
      RAID?
                                 Yes
     No
                                                    mostly
                                                    read?
                               SAN/NAS
SW RAID
                                                 Yes         No

                                           RAID 5             RAID 1+0
Hardware Baseline
▶Medium-Volume OLTP Application
  ● 2 Appservers, 1 DB server
         on private gig-E network
     ▬

  ● DB server is SunFire
         2x Dual Opteron
     ▬

         4 GB RAM
     ▬

  ● Attached to shared JBOD
         7 drives available
     ▬

              2 in RAID 1 for xlog
          –

              4 in RAID 1+0 for DB
          –

              OS on internal drives
          –
Operating System Baseline
▶OS
 ● gather data
          OS, version, patch level, any modifications made
      ▬

          hardware driver information
      ▬

          system usage by other applications (& resource usage)
      ▬

 ● baseline
          update to latest patch level (probably)
      ▬

          update hardware drivers (probably)
      ▬

          migrate conflicting applications
      ▬

               other DBMSes
           –

               other applications with heavy HW usage
           –
Operating System Baseline
▶Filesystem
  ● gather data
         filesystem type, partitions
     ▬

         locations of files for OS, PostgreSQL, other apps
     ▬

         filesystem settings
     ▬

  ● baseline
         move xlog to separate disk/array/partition
     ▬

         set filesystem for general recommendations
     ▬

              lower journaling levels
          –

              directio for xlog (if possible)
          –

              aggressive caching for DB
          –

              other settings specific to FS
          –
Operating System Baseline
▶OLTP Server running on Solaris 10
  ● Updated to Update3
         Fibercard driver patched
     ▬

  ● Dedicated Server
         MySQL removed to less critical machine
     ▬

  ● Solaris settings configured:
              set segmapsize=10737418240
          –

              set ufs:freebehind=0
          –

              set segmap_percent=50
          –

  ● Filesystem configured:
              mount -o forcedirectio /dev/rdsk/cntndnsn /mypath/pg_xlog
          –

              tunefs -a 128 /mypath/pg_xlog
          –
PostgreSQL Baseline
▶Gather Data
  ● schema
         tables: design, data size, partitioning, tablespaces
     ▬

         indexes
     ▬

         stored procedures
     ▬

  ● .conf settings
         ask about any non-defaults
     ▬

  ● maintenance
         have vacuum & analyze been run?
     ▬

         when and with what settings?
     ▬
PostgreSQL Baseline
▶.conf Baseline for modern servers
  ● shared_buffers = 25% RAM
  ● work_mem = [W] 512K [O] 2MB [D] 128MB
           but not more than RAM / no_connections
       ▬

  ●   maintenance_work_mem = 128MB
  ●   checkpoint_segments = [W] 8, [O],[D] 16-64
  ●   wal_buffers = 1MB
  ●   effective_cache_size = 2/3 * RAM
  ●   cpu_* = multiply all by .2
PostgreSQL Baseline
▶maintenance baseline
  ● [W][O] set up autovaccuum
         autovacuum = on
     ▬

         vacuum_cost_delay = 20ms
     ▬

         lower *_threshold for small databases
     ▬

  ● [D] set up vacuum/analyze batches with data batch
    import/update
Middleware Baseline
▶Gather data
  ●   DB drivers: driver, version
  ●   Connections: method, pooling (if any), pooling configuration
  ●   Caching: methods, tools used, versions, cache configuration
  ●   ORM: software, version
▶Baseline
  ● Update to latest middleware software: drivers, cache, etc.
  ● Utilize all pooling and caching methods available
           use prepared queries
       ▬

           plan, parse, data caching (if available)
       ▬

           pool should be sized to the maximum connections needed
       ▬

           5-15 app connections per DB connection
       ▬

           persistent connections if no pool
       ▬
Application Baseline
▶Gather data
  ● application type
  ● transaction model and volume
  ● query types and relative quantities
         get some typical queries, or better, logs
     ▬

  ● stored procedure execution, if any
  ● understand how the application generally works
         get a use perspective
     ▬

         find out purpose and sequence of usage
     ▬

         usage patterns: constant or peak traffic?
     ▬
Part 3:
 Tools for
Mole-Hunting
Types of Tools: HW & OS
▶Operating system tools
  ● simple & easy to use, non-invasive
  ● let you monitor hardware usage, gross system characteristics
  ● often the first option to tell what kind of Mole you have
▶Benchmarks & microbenchmarks
  ● very invasive: need to take over host system
  ● allow comparable testing of HW & OS
Types of Tools: PostgreSQL
▶pg_stat* views, DTrace
  ● minimally invasive, fast
  ● give you more internal data about what's going on in the DB
    realtime
  ● let you spot schema, query, lock problems
▶PostgreSQL log & pg_fouine
  ● somewhat invasive, slow
  ● allows introspection on specific types of db activity
  ● compute overall statistics on query, DB load
▶Explain Analyze
  ● troubleshoot “bad queries”
  ● for fixing specific queries only
Types of Tools Not Covered
  ... but you should use about anyway
▶Application server tools
  ● response time analysis tools
  ● database activity monitoring tools
  ● cache usage monitoring
▶Workload simulation & screen scraping
  ● the best benchmark is a simulation of your own application
  ● tools like lwp and log replay tools
▶Bug detection tools
  ● valgrind, MDB, GDB
  ● sometimes your performance issue is a genuine software bug
Part 3a:
 Operating
System Tools
OS Tools: ps (dbstat)
▶lets you see running PostgreSQL processes
  ● gives you an idea of concurrent activity & memory/cpu usage
  ● lets you spot hung and long-running statements
OS Tools: mpstat
▶see CPU activity for each CPU
  ● find out if you're CPU-bound
  ● see if all CPUs are being utilized
  ● detect context-switch issues
OS Tools: vmstat, free
▶Watch memory usage
  ● see if RAM is saturated
         are you not able to cache enough?
     ▬

         are you swapping?
     ▬
OS Tools: iostat
▶monitor usage of storage
  ● see if I/O is saturated
  ● see if one storage resource is bottlenecking everything else
  ● watch for checkpoint spikes
Part 3b:
Benchmarks
Benchmarks: bonnie++
▶Filesystem performance test
  ● see I/O throughput & issues
  ● check seek, random write speeds
Benchmarks: pgbench
▶Very simple DB microbenchmark
  ●   tests mostly I/O and connection processing speed
  ●   doesn't test locking, computation, or query planning
  ●   results sometimes not reproducable
  ●   mostly useful to prove large OS+HW issues
           not useful for fine performance tuning
       ▬


▶Run test appropriate to your workload
  ● cached in shared_buffers size
  ● cached in RAM size
  ● on disk size
           a little
       ▬

           a lot
       ▬
Benchmarks: pgbench




               Thanks to Greg Smith for this graph!
Benchmarks: Serious
▶Use serious benchmarks only when you have a
 problem which makes the system unusable
  ● you'll have to take the system offline
  ● it gives you reproduceable results to send to vendors &
    mailing lists
  ● best way to go after proven bugs you can't work around
Benchmarks: Serious
▶DBT2
  ● Serious OLTP benchmark
         based on TPCC
     ▬

         reproducable results, works out a lot more of the system
     ▬

         complex & time-consuming to set up, run
     ▬


▶DBT3, DBT5 in process
  ● new OLTP plus DW benchmarks
▶Others being developed
  ● pgUnitTest
  ● EAstress
  ● DIY
Part 3c:
System Views
Enabling System Views
▶Most require increasing the activity of the stats
 collector
  ●   stats_start_collector = on
  ●   stats_command_string = on
  ●   stats_block_level = on
  ●   stats_row_level = on
▶Overhead to system views
  ● usually about 5% for all stats
pg_stat_database, pg_database_size

▶Get general traffic statistics
  ● number of connections
  ● transaction commits througput
▶See rollback and hit ratios
  ● are you dealing with a lot of rollbacks due to aborted
    transactions?
  ● is little or none of the database fitting in the cache?
▶see how large your database is
  ● scope RAM & I/O scaling
  ● check RAID config
pg_tables, pg_relation_size

▶scope out the tables
  ● how many are there?
  ● do they have triggers?
         may cost you on updates
     ▬


▶check size of each table & index
  ● monitor for bloating
  ● see if tablespaces or partitions are recommended
pg_stat_activity
▶Check concurrent query activity
  ● get an idea of the proportion of idle connections
  ● spot check types of actitivy
  ● much better than ps for catching runaway transactions
pg_locks
▶Spot-check for lock conflicts
  ● a few are normal in high-data-integrity applications, but a lot
    is bad
  ● often a sign that you should change your data locking
    strategy
         or simply lower deadlock_timeout
     ▬

  ● if you have ungranted locks, check them against
    pg_stat_activity
DTrace
▶right now you can't see much
  ● but great things are in development
▶see Robert Lor's demo on Wednesday
pg_stat[io]_user_tables,
pg_stat[io]_user_indexes
▶check relative table activity
  ● how much select vs. update traffic?
▶look for seq scans
  ● do we need more/different indexes?
▶check index activity
  ● should some indexes be dropped?
  ● are some very large indexes dominating I/O?
pg_stat_bgwriter (new!)
▶see if the bgwriter is clearing the caches
  ● are we suffering checkpoint spikes?
Part 3d:
Activity Log
How to use the pg_log
1.Figure out what behavior you're trying to
  observe
2.Turn only those options on
3.Run a short, reproducible test case (if possible)
  ● if not, just deliberately trigger the problem behavior
4.Digest the log results

If you have to log a production server, you'll need
   to filter out the noise.
Basic query monitoring
log_destination = 'syslog'
redirect_stderr = off
silent_mode = on
log_min_duration_statement = 0
pg_fouine
▶Calculates overall query statistics
  ● find the slowest queries
  ● find the ones running the most frequently
  ● probably your best way to find the “biggest query moles”
Harvesting bad queries
log_min_duration_statement = 30
debug_print_plan = on
log_line_prefix = %t : %d
server_min_messages = DEBUG1
Monitoring connections
log_connections = on
log_disconnections = on
log_line_prefix = %t : %p : %d : %r
Part 3e:
EXPLAIN
ANALYZE
The “Bad Query” tool
▶After you've found your most costly queries
▶Use EXPLAIN ANALYZE to find out why they're
 so costly
  ● sometimes you can fix them immediately
  ● other times they indicate problems in other areas
         HW issues
     ▬

         schema issues
     ▬

         lack of db maintenance
     ▬
Reading EXPLAIN ANALYZE
▶It's an inverted tree
  ● don't start at the top
  ● execution starts at the innermost node and works up and out
  ● look for the lowest node with a problem
▶Read it holistically
  ● some nodes execute in parallel and influence each other
  ● “gaps” between nodes can be significant
  ● subtrees which are slow don't matter if other subtrees are
    slower
Things to Look For: Examples
▶Bad rowcount estimates
  ● cause the query to choose bad query plans
  ● generally can be fixed with increased planner statistics
  ● sometimes require query re-writing
Things to Look For: Examples
▶Bad Scan Cost Estimates
  ● index or seq scans which seem too slow by estimate
  ● usually indicates either
         table/index bloat due to poor maintenance
     ▬

         I/O saturation
     ▬

         I/O problems
     ▬

         not enough RAM
     ▬
Part 4:
Hunting Moles
Hunting Moles
▶What kind?
  ● What are the symptoms?
         response times
     ▬

         error messages
     ▬


▶When?
  ● activity which causes the problem
         general slowdown or specific operation, or periodic?
     ▬

         caused just by one activity, or by several?
     ▬

  ● concurrent system activity
         system/DB load?
     ▬

         what other operations are going on on the system?
     ▬
Common Types of Moles
▶I/O Mole
  ● behavior: cpu underutilized: ram available, I/O saturated for
    at least one device
  ● habitats: [D], [O], any heavy write load or very large database
  ● common causes:
         bad I/O hardware/software
     ▬

         bad I/O config
     ▬

         not enough ram
     ▬

         too much data requested from application
     ▬

         bad schema: missing indexes or partitioning needed
     ▬
Common Types of Moles
▶CPU Mole
 ● behavior: cpus at 90% or more: ram available, I/O not
   saturated
 ● habitats: [W], [O], mostly-read loads or those involving
   complex calculation in queries
 ● causes:
        too many queries
    ▬

        insufficient caching/pooling
    ▬

        too much data requested by application
    ▬

        bad queries
    ▬

        bad schema: missing indexes
    ▬

 ● can be benign: most DB servers should be CPU-bound at
   maximum load
Common Types of Moles
▶Locking Mole
  ● behavior: nothing on DB or App server is at maximum, but
    many queries have long waits, often heavy context switching,
    pg_locks sometimes shows waits
  ● habitats: [O], [D], or loads involving pessimistic locking and/or
    stored procedures
  ● causes:
         long-running transactions/procedures
     ▬

         cursors held too long
     ▬

         pessimistic instead of optimistic locking or userlocks
     ▬

         poor transaction management (failure to rollback)
     ▬

         various buffer settings in .conf too low
     ▬

         PostgreSQL SMP scalability limits
     ▬
Common Types of Moles
▶Application Mole
  ● behavior: nothing on DB server is at maximum, but RAM or
    CPU on the App servers is completely utilized
  ● habitats: common in J2EE
  ● causes:
         not enough application servers
     ▬

         too much data / too many queries
     ▬

         bad caching/pooling config
     ▬

         driver issues
     ▬

         ORM
     ▬
Part 4a:
Hunting Moles
  Examples
Slow DW
▶Setup
  ● Data warehousing application
  ● Both bulk loads and large reporting queries were very slow
  ● CPU and RAM were OK, and I/O seemed underused
         except it never got above a very low ceiling
     ▬


▶The Hunt
  ● used dd, bonnie++, iostat to check I/O behavior
  ● throughput of JBOD was much slower than internal disk
  ● compared with similar system by another vendor
▶The Whack
  ● the RAID card used in that model was defective, replaced
Checkpoint Spikes
▶Setup
  ● OLTP benchmark, but not as fast as MySQL
  ● Nothing was maxxed
  ● Query throughput cycled up and down
▶The Hunt
  ● checked iostat, saw 5-minute cycle
  ● installed, checked pg_stat_bgwriter
         showed high amount of buffers_checkpoint
     ▬


▶The Whack
  ● increased bgwriter frequency, amounts
  ● spikes decreased, overall throughput rose slightly
Connection Management
▶The Setup
  ● JSP web application good 23 hours per day, but bombing
    during the peak traffic hour
         DB server would run out of RAM and stop responding
     ▬


▶The Hunt
  ● watched pg_stat_activity and process list during peak
    periods, took snapshots
         saw that connections went up to 2000+ during peak, yet many
     ▬

         of them were idle
         verified this by logging connections
     ▬

  ● checked Tomcat configuration
         connection pool: 200 connections
     ▬

         servers were set to reconnect after 10 seconds timeout
     ▬
Connection Management
▶The Whack
 ● Tomcat was “bombing” the database with thousands of failed
   connections
        faster than the database could fulfill them
    ▬

 ● Fixed configuration
        min_connections for pool set to 700
    ▬

        connection_timeout and pool connection timeout synchronized
    ▬

 ● Suggested improvements
        upgrade to a J2EE architecture with better pooling
    ▬
Too Many Queries
▶The Setup
  ● c++ client-server application took 3+ minutes to start up
▶The Hunt
  ● set pg_log to log queries
         ran application startup
     ▬

  ● ran through pg_fouine
         showed over 20,000 queries during startup
     ▬

         most of them identical when normalized
     ▬


▶The Whack
  ● the application was walking several large trees, node-by-node
  ● taught the programmers to do batch queries and use
    connect_by()
Undead Transactions
▶The Setup
  ● Perl OLTP application was fast when upgraded, but became
    slower & slower with time
▶The Hunt
  ● checked db maintenance schedule: vacuum was being run
         yet pg_tables showed tables were growing faster than they
     ▬

         should, indexes too
         vacuum analyze verbose showed lots of “dead tuples could not
     ▬

         be removed”
  ● checked pg_stat_activity and process list
         “idle in transaction”
     ▬

         some transactions were living for days
     ▬
Undead Transactions
▶The Whack
 ● programmers fixed application bug to rollback failed
   transactions instead of skipping them
 ● added “undead transaction” checker to their application
   monitoring
Is The Mole Dead?
   Yes, which means it's time to move on
             to the next mole.




               Isn't this fun?
Further Questions
▶Josh Berkus                                        ▶More Advice
  ●                                                        ● www.postgresql.org/docs
      josh@postgresql.org
  ●                                                        ● www.varlena.com/
      josh.berkus@sun.com
                                                             generalbits
  ●   www.powerpostgresql.com
                                                           ● www.planetpostgresql.org
  ●   blogs.ittoolbox.com/
                                                           ● irc.freenode.net
      database/soup
                                                                      #postgresql
                                                                  ▬




                                             Special thanks for borrowed content to:
                                             www.MolePro.com for the WhackaMole Game
                                             Greg Smith for pgbench and bonnie++ results

              This talk is copyright 2007 Josh Berkus, and is licensed under the creative commons attribution license

More Related Content

What's hot

Best Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized EnvironmentsBest Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized EnvironmentsJignesh Shah
 
PostgreSQL and Benchmarks
PostgreSQL and BenchmarksPostgreSQL and Benchmarks
PostgreSQL and BenchmarksJignesh Shah
 
Debugging and Configuration Best Practices for Oracle Linux
Debugging and Configuration Best Practices for Oracle LinuxDebugging and Configuration Best Practices for Oracle Linux
Debugging and Configuration Best Practices for Oracle LinuxTerry Wang
 
SSD based storage tuning for databases
SSD based storage tuning for databasesSSD based storage tuning for databases
SSD based storage tuning for databasesAngelo Rajadurai
 
HDFS NameNode High Availability
HDFS NameNode High AvailabilityHDFS NameNode High Availability
HDFS NameNode High AvailabilityDataWorks Summit
 
Hadoop Operations for Production Systems (Strata NYC)
Hadoop Operations for Production Systems (Strata NYC)Hadoop Operations for Production Systems (Strata NYC)
Hadoop Operations for Production Systems (Strata NYC)Kathleen Ting
 
Best Practices with PostgreSQL on Solaris
Best Practices with PostgreSQL on SolarisBest Practices with PostgreSQL on Solaris
Best Practices with PostgreSQL on SolarisJignesh Shah
 
Strata + Hadoop World 2012: HDFS: Now and Future
Strata + Hadoop World 2012: HDFS: Now and FutureStrata + Hadoop World 2012: HDFS: Now and Future
Strata + Hadoop World 2012: HDFS: Now and FutureCloudera, Inc.
 
Deep Dive into RDS PostgreSQL Universe
Deep Dive into RDS PostgreSQL UniverseDeep Dive into RDS PostgreSQL Universe
Deep Dive into RDS PostgreSQL UniverseJignesh Shah
 
High Performance Hardware for Data Analysis
High Performance Hardware for Data AnalysisHigh Performance Hardware for Data Analysis
High Performance Hardware for Data AnalysisMike Pittaro
 
Replication Solutions for PostgreSQL
Replication Solutions for PostgreSQLReplication Solutions for PostgreSQL
Replication Solutions for PostgreSQLPeter Eisentraut
 
Hadoop Operations at LinkedIn
Hadoop Operations at LinkedInHadoop Operations at LinkedIn
Hadoop Operations at LinkedInDataWorks Summit
 
Shak larry-jeder-perf-and-tuning-summit14-part1-final
Shak larry-jeder-perf-and-tuning-summit14-part1-finalShak larry-jeder-perf-and-tuning-summit14-part1-final
Shak larry-jeder-perf-and-tuning-summit14-part1-finalTommy Lee
 
Apache Hadoop YARN, NameNode HA, HDFS Federation
Apache Hadoop YARN, NameNode HA, HDFS FederationApache Hadoop YARN, NameNode HA, HDFS Federation
Apache Hadoop YARN, NameNode HA, HDFS FederationAdam Kawa
 
Uptime Database Appliance - Technology Preview
Uptime Database Appliance - Technology PreviewUptime Database Appliance - Technology Preview
Uptime Database Appliance - Technology PreviewUptime Technologies LLC
 
Shak larry-jeder-perf-and-tuning-summit14-part2-final
Shak larry-jeder-perf-and-tuning-summit14-part2-finalShak larry-jeder-perf-and-tuning-summit14-part2-final
Shak larry-jeder-perf-and-tuning-summit14-part2-finalTommy Lee
 
My experience with embedding PostgreSQL
 My experience with embedding PostgreSQL My experience with embedding PostgreSQL
My experience with embedding PostgreSQLJignesh Shah
 
The Magic of Tuning in PostgreSQL
The Magic of Tuning in PostgreSQLThe Magic of Tuning in PostgreSQL
The Magic of Tuning in PostgreSQLAshnikbiz
 

What's hot (20)

Best Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized EnvironmentsBest Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized Environments
 
PostgreSQL and Benchmarks
PostgreSQL and BenchmarksPostgreSQL and Benchmarks
PostgreSQL and Benchmarks
 
Debugging and Configuration Best Practices for Oracle Linux
Debugging and Configuration Best Practices for Oracle LinuxDebugging and Configuration Best Practices for Oracle Linux
Debugging and Configuration Best Practices for Oracle Linux
 
SSD based storage tuning for databases
SSD based storage tuning for databasesSSD based storage tuning for databases
SSD based storage tuning for databases
 
HDFS NameNode High Availability
HDFS NameNode High AvailabilityHDFS NameNode High Availability
HDFS NameNode High Availability
 
Hadoop Operations for Production Systems (Strata NYC)
Hadoop Operations for Production Systems (Strata NYC)Hadoop Operations for Production Systems (Strata NYC)
Hadoop Operations for Production Systems (Strata NYC)
 
Best Practices with PostgreSQL on Solaris
Best Practices with PostgreSQL on SolarisBest Practices with PostgreSQL on Solaris
Best Practices with PostgreSQL on Solaris
 
Strata + Hadoop World 2012: HDFS: Now and Future
Strata + Hadoop World 2012: HDFS: Now and FutureStrata + Hadoop World 2012: HDFS: Now and Future
Strata + Hadoop World 2012: HDFS: Now and Future
 
MySQL Monitoring 101
MySQL Monitoring 101MySQL Monitoring 101
MySQL Monitoring 101
 
Deep Dive into RDS PostgreSQL Universe
Deep Dive into RDS PostgreSQL UniverseDeep Dive into RDS PostgreSQL Universe
Deep Dive into RDS PostgreSQL Universe
 
High Performance Hardware for Data Analysis
High Performance Hardware for Data AnalysisHigh Performance Hardware for Data Analysis
High Performance Hardware for Data Analysis
 
Replication Solutions for PostgreSQL
Replication Solutions for PostgreSQLReplication Solutions for PostgreSQL
Replication Solutions for PostgreSQL
 
Hadoop Operations at LinkedIn
Hadoop Operations at LinkedInHadoop Operations at LinkedIn
Hadoop Operations at LinkedIn
 
Shak larry-jeder-perf-and-tuning-summit14-part1-final
Shak larry-jeder-perf-and-tuning-summit14-part1-finalShak larry-jeder-perf-and-tuning-summit14-part1-final
Shak larry-jeder-perf-and-tuning-summit14-part1-final
 
Apache Hadoop YARN, NameNode HA, HDFS Federation
Apache Hadoop YARN, NameNode HA, HDFS FederationApache Hadoop YARN, NameNode HA, HDFS Federation
Apache Hadoop YARN, NameNode HA, HDFS Federation
 
Uptime Database Appliance - Technology Preview
Uptime Database Appliance - Technology PreviewUptime Database Appliance - Technology Preview
Uptime Database Appliance - Technology Preview
 
Shak larry-jeder-perf-and-tuning-summit14-part2-final
Shak larry-jeder-perf-and-tuning-summit14-part2-finalShak larry-jeder-perf-and-tuning-summit14-part2-final
Shak larry-jeder-perf-and-tuning-summit14-part2-final
 
My experience with embedding PostgreSQL
 My experience with embedding PostgreSQL My experience with embedding PostgreSQL
My experience with embedding PostgreSQL
 
HBase operations
HBase operationsHBase operations
HBase operations
 
The Magic of Tuning in PostgreSQL
The Magic of Tuning in PostgreSQLThe Magic of Tuning in PostgreSQL
The Magic of Tuning in PostgreSQL
 

Similar to Performance Whack A Mole

Designing Information Structures For Performance And Reliability
Designing Information Structures For Performance And ReliabilityDesigning Information Structures For Performance And Reliability
Designing Information Structures For Performance And Reliabilitybryanrandol
 
Big Data and Hadoop in Cloud - Leveraging Amazon EMR
Big Data and Hadoop in Cloud - Leveraging Amazon EMRBig Data and Hadoop in Cloud - Leveraging Amazon EMR
Big Data and Hadoop in Cloud - Leveraging Amazon EMRVijay Rayapati
 
The care and feeding of a MySQL database
The care and feeding of a MySQL databaseThe care and feeding of a MySQL database
The care and feeding of a MySQL databaseDave Stokes
 
Hadoop Architecture_Cluster_Cap_Plan
Hadoop Architecture_Cluster_Cap_PlanHadoop Architecture_Cluster_Cap_Plan
Hadoop Architecture_Cluster_Cap_PlanNarayana B
 
Evergreen Sysadmin Survival Skills
Evergreen Sysadmin Survival SkillsEvergreen Sysadmin Survival Skills
Evergreen Sysadmin Survival SkillsEvergreen ILS
 
Oracle R12 EBS Performance Tuning
Oracle R12 EBS Performance TuningOracle R12 EBS Performance Tuning
Oracle R12 EBS Performance TuningScott Jenner
 
PhpTek Ten Things to do to make your MySQL servers Happier and Healthier
PhpTek Ten Things to do to make your MySQL servers Happier and HealthierPhpTek Ten Things to do to make your MySQL servers Happier and Healthier
PhpTek Ten Things to do to make your MySQL servers Happier and HealthierDave Stokes
 
Big Data Anti-Patterns: Lessons From the Front LIne
Big Data Anti-Patterns: Lessons From the Front LIneBig Data Anti-Patterns: Lessons From the Front LIne
Big Data Anti-Patterns: Lessons From the Front LIneDouglas Moore
 
Secure Hadoop Cluster With Kerberos
Secure Hadoop Cluster With KerberosSecure Hadoop Cluster With Kerberos
Secure Hadoop Cluster With KerberosEdureka!
 
Hadoop configuration & performance tuning
Hadoop configuration & performance tuningHadoop configuration & performance tuning
Hadoop configuration & performance tuningVitthal Gogate
 
Army of arm - NYC downtown tech meetup
Army of arm - NYC downtown tech meetupArmy of arm - NYC downtown tech meetup
Army of arm - NYC downtown tech meetupAndy Pernsteiner
 
Severalnines Training: MySQL® Cluster - Part IX
Severalnines Training: MySQL® Cluster - Part IXSeveralnines Training: MySQL® Cluster - Part IX
Severalnines Training: MySQL® Cluster - Part IXSeveralnines
 
Filesystem Performance from a Database Perspective
Filesystem Performance from a Database PerspectiveFilesystem Performance from a Database Perspective
Filesystem Performance from a Database PerspectiveMark Wong
 
Beat the devil: towards a Drupal performance benchmark
Beat the devil: towards a Drupal performance benchmarkBeat the devil: towards a Drupal performance benchmark
Beat the devil: towards a Drupal performance benchmarkPedro González Serrano
 
MariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & OptimizationMariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & OptimizationMariaDB plc
 

Similar to Performance Whack A Mole (20)

Performance Whackamole (short version)
Performance Whackamole (short version)Performance Whackamole (short version)
Performance Whackamole (short version)
 
MySQL Tuning
MySQL TuningMySQL Tuning
MySQL Tuning
 
Designing Information Structures For Performance And Reliability
Designing Information Structures For Performance And ReliabilityDesigning Information Structures For Performance And Reliability
Designing Information Structures For Performance And Reliability
 
Five steps perform_2009 (1)
Five steps perform_2009 (1)Five steps perform_2009 (1)
Five steps perform_2009 (1)
 
Big Data and Hadoop in Cloud - Leveraging Amazon EMR
Big Data and Hadoop in Cloud - Leveraging Amazon EMRBig Data and Hadoop in Cloud - Leveraging Amazon EMR
Big Data and Hadoop in Cloud - Leveraging Amazon EMR
 
The care and feeding of a MySQL database
The care and feeding of a MySQL databaseThe care and feeding of a MySQL database
The care and feeding of a MySQL database
 
Hadoop Architecture_Cluster_Cap_Plan
Hadoop Architecture_Cluster_Cap_PlanHadoop Architecture_Cluster_Cap_Plan
Hadoop Architecture_Cluster_Cap_Plan
 
Evergreen Sysadmin Survival Skills
Evergreen Sysadmin Survival SkillsEvergreen Sysadmin Survival Skills
Evergreen Sysadmin Survival Skills
 
How swift is your Swift - SD.pptx
How swift is your Swift - SD.pptxHow swift is your Swift - SD.pptx
How swift is your Swift - SD.pptx
 
Oracle R12 EBS Performance Tuning
Oracle R12 EBS Performance TuningOracle R12 EBS Performance Tuning
Oracle R12 EBS Performance Tuning
 
PhpTek Ten Things to do to make your MySQL servers Happier and Healthier
PhpTek Ten Things to do to make your MySQL servers Happier and HealthierPhpTek Ten Things to do to make your MySQL servers Happier and Healthier
PhpTek Ten Things to do to make your MySQL servers Happier and Healthier
 
Big Data Anti-Patterns: Lessons From the Front LIne
Big Data Anti-Patterns: Lessons From the Front LIneBig Data Anti-Patterns: Lessons From the Front LIne
Big Data Anti-Patterns: Lessons From the Front LIne
 
Secure Hadoop Cluster With Kerberos
Secure Hadoop Cluster With KerberosSecure Hadoop Cluster With Kerberos
Secure Hadoop Cluster With Kerberos
 
Hadoop configuration & performance tuning
Hadoop configuration & performance tuningHadoop configuration & performance tuning
Hadoop configuration & performance tuning
 
Army of arm - NYC downtown tech meetup
Army of arm - NYC downtown tech meetupArmy of arm - NYC downtown tech meetup
Army of arm - NYC downtown tech meetup
 
Severalnines Training: MySQL® Cluster - Part IX
Severalnines Training: MySQL® Cluster - Part IXSeveralnines Training: MySQL® Cluster - Part IX
Severalnines Training: MySQL® Cluster - Part IX
 
Qcon
QconQcon
Qcon
 
Filesystem Performance from a Database Perspective
Filesystem Performance from a Database PerspectiveFilesystem Performance from a Database Perspective
Filesystem Performance from a Database Perspective
 
Beat the devil: towards a Drupal performance benchmark
Beat the devil: towards a Drupal performance benchmarkBeat the devil: towards a Drupal performance benchmark
Beat the devil: towards a Drupal performance benchmark
 
MariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & OptimizationMariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & Optimization
 

More from oscon2007

J Ruby Whirlwind Tour
J Ruby Whirlwind TourJ Ruby Whirlwind Tour
J Ruby Whirlwind Touroscon2007
 
Solr Presentation5
Solr Presentation5Solr Presentation5
Solr Presentation5oscon2007
 
Os Fitzpatrick Sussman Wiifm
Os Fitzpatrick Sussman WiifmOs Fitzpatrick Sussman Wiifm
Os Fitzpatrick Sussman Wiifmoscon2007
 
Os Lanphier Brashears
Os Lanphier BrashearsOs Lanphier Brashears
Os Lanphier Brashearsoscon2007
 
Os Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman SwpOs Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman Swposcon2007
 
Os Berlin Dispelling Myths
Os Berlin Dispelling MythsOs Berlin Dispelling Myths
Os Berlin Dispelling Mythsoscon2007
 
Os Keysholistic
Os KeysholisticOs Keysholistic
Os Keysholisticoscon2007
 
Os Jonphillips
Os JonphillipsOs Jonphillips
Os Jonphillipsoscon2007
 
Os Urnerupdated
Os UrnerupdatedOs Urnerupdated
Os Urnerupdatedoscon2007
 
Adventures In Copyright Reform
Adventures In Copyright ReformAdventures In Copyright Reform
Adventures In Copyright Reformoscon2007
 

More from oscon2007 (20)

J Ruby Whirlwind Tour
J Ruby Whirlwind TourJ Ruby Whirlwind Tour
J Ruby Whirlwind Tour
 
Solr Presentation5
Solr Presentation5Solr Presentation5
Solr Presentation5
 
Os Borger
Os BorgerOs Borger
Os Borger
 
Os Harkins
Os HarkinsOs Harkins
Os Harkins
 
Os Fitzpatrick Sussman Wiifm
Os Fitzpatrick Sussman WiifmOs Fitzpatrick Sussman Wiifm
Os Fitzpatrick Sussman Wiifm
 
Os Bunce
Os BunceOs Bunce
Os Bunce
 
Yuicss R7
Yuicss R7Yuicss R7
Yuicss R7
 
Os Fogel
Os FogelOs Fogel
Os Fogel
 
Os Lanphier Brashears
Os Lanphier BrashearsOs Lanphier Brashears
Os Lanphier Brashears
 
Os Tucker
Os TuckerOs Tucker
Os Tucker
 
Os Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman SwpOs Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman Swp
 
Os Furlong
Os FurlongOs Furlong
Os Furlong
 
Os Berlin Dispelling Myths
Os Berlin Dispelling MythsOs Berlin Dispelling Myths
Os Berlin Dispelling Myths
 
Os Kimsal
Os KimsalOs Kimsal
Os Kimsal
 
Os Pruett
Os PruettOs Pruett
Os Pruett
 
Os Alrubaie
Os AlrubaieOs Alrubaie
Os Alrubaie
 
Os Keysholistic
Os KeysholisticOs Keysholistic
Os Keysholistic
 
Os Jonphillips
Os JonphillipsOs Jonphillips
Os Jonphillips
 
Os Urnerupdated
Os UrnerupdatedOs Urnerupdated
Os Urnerupdated
 
Adventures In Copyright Reform
Adventures In Copyright ReformAdventures In Copyright Reform
Adventures In Copyright Reform
 

Recently uploaded

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 

Recently uploaded (20)

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 

Performance Whack A Mole

  • 2. “The database is so fast. I don't know if we'll ever max it out.” -- Not Your Client, Inc.
  • 3. “My database is slow.” -- Every Single Support Client LLC
  • 5. The Stack Application Queries Transactions Middleware Drivers Connections Caching PostgreSQL Schema Config Operating System Filesystem Kernel Hardware Storage RAM/CPU Network
  • 6. The Stack Application Queries Transactions Middleware Drivers Connections Caching PostgreSQL Schema Config Operating System Filesystem Kernel Hardware RAM/CPU Storage Network
  • 7. The Stack Application Middleware PostgreSQL OS HW
  • 8. Rules of Whack-a-Mole 1.Most “database performance problems”, or Moles, are not actually database performance problems.
  • 9. The Hockey Stick Affect on Performance Ranked Issues
  • 10. The Hockey Stick Affect on Performance Ranked Issues
  • 11. Rules of Whack-a-Mole 1.Most “database performance problems”, or Moles, are not actually database performance problems. 2.Less than 10% of Moles cause 90% of performance degradation. ● corollary: we don't care about the other 90% of Moles
  • 12. The Hockey Stick Affect on Performance Ranked Issues
  • 13. Rules of Whack-a-Mole 1.Most “database performance problems”, or Moles, are not actually database performance problems. 2.Less than 10% of Moles cause 90% of performance degradation. ● corollary: we don't care about the other 90% of Moles 3.At any time, it is usually only possible to observe and troubleshoot the “largest” Mole.
  • 14. What Color Is My Application? W ▶Web Application (Web) ● DB smaller than RAM ● 90% or more simple read queries O ▶Online Transaction Processing (OLTP) ● DB slightly larger than RAM to 1TB ● 20-40% small data write queries ● Some long transactions D ▶Data Warehousing (DW) ● Large to huge databases (100GB to 100TB) ● Large complex reporting queries ● Large bulk loads of data ● Also called quot;Decision Supportquot; or quot;Business Intelligencequot;
  • 15. What Color Is My Application? W ▶Web Application (Web) ● CPU-bound ● Moles: caching, pooling, connection time O ▶Online Transaction Processing (OLTP) ● CPU or I/O bound ● Moles: locks, cache, transactions, write speed, log D ▶Data Warehousing (DW) ● I/O or RAM bound ● Moles: seq scans, resources, bad queries
  • 16. Rules of Whack-a-Mole 1.Most “database performance problems”, or Moles, are not actually database performance problems. 2.Less than 10% of Moles cause 90% of performance degradation. ● corollary: we don't care about the other 90% of Moles 3.At any time, it is usually only possible to observe and troubleshoot, or Whack, the “largest” Mole. 4.Different application types usually have different Moles and need different troubleshooting.
  • 18. What's a Baseline? ▶Gather information about the system ● you need to know what's happening at every level of the stack ● identify potential trouble areas to come back to later ▶Basic Setup ● check the hardware/OS setup for sanity ● apply the conventional postgresql.conf calculations ● do conventional wisdom middleware and application setup ● should be fast run-though, like an hour
  • 19. Why Baseline? ▶Why not just go straight to Whacking? ● extremely poor basic setup may mask more serious issues ● baseline setup may turn out to be all that's needed ● deviations from baseline can be clues to finding Moles ● baseline will make your setup comparable to other installations so you can check tests ● clients/sysadmins/developers are seldom a reliable source of bottleneck information
  • 20. Steps for Baseline 1.Hardware setup 2.Filesystem & OS Setup 3.PostgreSQL.conf 4.Drivers, Pooling & Caching 5.Application Setup Information
  • 21. Steps for Baseline 5. Application Queries Transactions 4. Middleware Drivers Connections Caching 3. PostgreSQL Schema Config 2. Operating System Filesystem Kernel Hardware Storage RAM/CPU Network 1.
  • 22. Hardware Baseline ▶Gather Data ● Server CPU model, speed, number, arch ▬ RAM quantity, speed, configuration ▬ ● Storage Interface (cards, RAID) ▬ Disk type, size, speed ▬ Array/SAN configuration ▬ ● Network network type and bandwith ▬ devices and models ▬ switch/routing configuration ▬
  • 23. Hardware Baseline ▶Baseline ● Storage Use appropriate RAID configuration ▬ Turn on write caching if safe ▬ Make sure you're using all channels/devices ▬ ● Network application servers & DB server should be on dedicated ▬ network use redundant connections & load balancing if available ▬
  • 24. Storage Decision Tree lots of fits in no RAID No Yes writes? RAM? No Yes afford terabytes HW RAID good HW No Yes of data? RAID? Yes No mostly read? SAN/NAS SW RAID Yes No RAID 5 RAID 1+0
  • 25. Hardware Baseline ▶Medium-Volume OLTP Application ● 2 Appservers, 1 DB server on private gig-E network ▬ ● DB server is SunFire 2x Dual Opteron ▬ 4 GB RAM ▬ ● Attached to shared JBOD 7 drives available ▬ 2 in RAID 1 for xlog – 4 in RAID 1+0 for DB – OS on internal drives –
  • 26. Operating System Baseline ▶OS ● gather data OS, version, patch level, any modifications made ▬ hardware driver information ▬ system usage by other applications (& resource usage) ▬ ● baseline update to latest patch level (probably) ▬ update hardware drivers (probably) ▬ migrate conflicting applications ▬ other DBMSes – other applications with heavy HW usage –
  • 27. Operating System Baseline ▶Filesystem ● gather data filesystem type, partitions ▬ locations of files for OS, PostgreSQL, other apps ▬ filesystem settings ▬ ● baseline move xlog to separate disk/array/partition ▬ set filesystem for general recommendations ▬ lower journaling levels – directio for xlog (if possible) – aggressive caching for DB – other settings specific to FS –
  • 28. Operating System Baseline ▶OLTP Server running on Solaris 10 ● Updated to Update3 Fibercard driver patched ▬ ● Dedicated Server MySQL removed to less critical machine ▬ ● Solaris settings configured: set segmapsize=10737418240 – set ufs:freebehind=0 – set segmap_percent=50 – ● Filesystem configured: mount -o forcedirectio /dev/rdsk/cntndnsn /mypath/pg_xlog – tunefs -a 128 /mypath/pg_xlog –
  • 29. PostgreSQL Baseline ▶Gather Data ● schema tables: design, data size, partitioning, tablespaces ▬ indexes ▬ stored procedures ▬ ● .conf settings ask about any non-defaults ▬ ● maintenance have vacuum & analyze been run? ▬ when and with what settings? ▬
  • 30. PostgreSQL Baseline ▶.conf Baseline for modern servers ● shared_buffers = 25% RAM ● work_mem = [W] 512K [O] 2MB [D] 128MB but not more than RAM / no_connections ▬ ● maintenance_work_mem = 128MB ● checkpoint_segments = [W] 8, [O],[D] 16-64 ● wal_buffers = 1MB ● effective_cache_size = 2/3 * RAM ● cpu_* = multiply all by .2
  • 31. PostgreSQL Baseline ▶maintenance baseline ● [W][O] set up autovaccuum autovacuum = on ▬ vacuum_cost_delay = 20ms ▬ lower *_threshold for small databases ▬ ● [D] set up vacuum/analyze batches with data batch import/update
  • 32. Middleware Baseline ▶Gather data ● DB drivers: driver, version ● Connections: method, pooling (if any), pooling configuration ● Caching: methods, tools used, versions, cache configuration ● ORM: software, version ▶Baseline ● Update to latest middleware software: drivers, cache, etc. ● Utilize all pooling and caching methods available use prepared queries ▬ plan, parse, data caching (if available) ▬ pool should be sized to the maximum connections needed ▬ 5-15 app connections per DB connection ▬ persistent connections if no pool ▬
  • 33. Application Baseline ▶Gather data ● application type ● transaction model and volume ● query types and relative quantities get some typical queries, or better, logs ▬ ● stored procedure execution, if any ● understand how the application generally works get a use perspective ▬ find out purpose and sequence of usage ▬ usage patterns: constant or peak traffic? ▬
  • 34. Part 3: Tools for Mole-Hunting
  • 35. Types of Tools: HW & OS ▶Operating system tools ● simple & easy to use, non-invasive ● let you monitor hardware usage, gross system characteristics ● often the first option to tell what kind of Mole you have ▶Benchmarks & microbenchmarks ● very invasive: need to take over host system ● allow comparable testing of HW & OS
  • 36. Types of Tools: PostgreSQL ▶pg_stat* views, DTrace ● minimally invasive, fast ● give you more internal data about what's going on in the DB realtime ● let you spot schema, query, lock problems ▶PostgreSQL log & pg_fouine ● somewhat invasive, slow ● allows introspection on specific types of db activity ● compute overall statistics on query, DB load ▶Explain Analyze ● troubleshoot “bad queries” ● for fixing specific queries only
  • 37. Types of Tools Not Covered ... but you should use about anyway ▶Application server tools ● response time analysis tools ● database activity monitoring tools ● cache usage monitoring ▶Workload simulation & screen scraping ● the best benchmark is a simulation of your own application ● tools like lwp and log replay tools ▶Bug detection tools ● valgrind, MDB, GDB ● sometimes your performance issue is a genuine software bug
  • 39. OS Tools: ps (dbstat) ▶lets you see running PostgreSQL processes ● gives you an idea of concurrent activity & memory/cpu usage ● lets you spot hung and long-running statements
  • 40. OS Tools: mpstat ▶see CPU activity for each CPU ● find out if you're CPU-bound ● see if all CPUs are being utilized ● detect context-switch issues
  • 41. OS Tools: vmstat, free ▶Watch memory usage ● see if RAM is saturated are you not able to cache enough? ▬ are you swapping? ▬
  • 42. OS Tools: iostat ▶monitor usage of storage ● see if I/O is saturated ● see if one storage resource is bottlenecking everything else ● watch for checkpoint spikes
  • 44. Benchmarks: bonnie++ ▶Filesystem performance test ● see I/O throughput & issues ● check seek, random write speeds
  • 45. Benchmarks: pgbench ▶Very simple DB microbenchmark ● tests mostly I/O and connection processing speed ● doesn't test locking, computation, or query planning ● results sometimes not reproducable ● mostly useful to prove large OS+HW issues not useful for fine performance tuning ▬ ▶Run test appropriate to your workload ● cached in shared_buffers size ● cached in RAM size ● on disk size a little ▬ a lot ▬
  • 46. Benchmarks: pgbench Thanks to Greg Smith for this graph!
  • 47. Benchmarks: Serious ▶Use serious benchmarks only when you have a problem which makes the system unusable ● you'll have to take the system offline ● it gives you reproduceable results to send to vendors & mailing lists ● best way to go after proven bugs you can't work around
  • 48. Benchmarks: Serious ▶DBT2 ● Serious OLTP benchmark based on TPCC ▬ reproducable results, works out a lot more of the system ▬ complex & time-consuming to set up, run ▬ ▶DBT3, DBT5 in process ● new OLTP plus DW benchmarks ▶Others being developed ● pgUnitTest ● EAstress ● DIY
  • 50. Enabling System Views ▶Most require increasing the activity of the stats collector ● stats_start_collector = on ● stats_command_string = on ● stats_block_level = on ● stats_row_level = on ▶Overhead to system views ● usually about 5% for all stats
  • 51. pg_stat_database, pg_database_size ▶Get general traffic statistics ● number of connections ● transaction commits througput ▶See rollback and hit ratios ● are you dealing with a lot of rollbacks due to aborted transactions? ● is little or none of the database fitting in the cache? ▶see how large your database is ● scope RAM & I/O scaling ● check RAID config
  • 52. pg_tables, pg_relation_size ▶scope out the tables ● how many are there? ● do they have triggers? may cost you on updates ▬ ▶check size of each table & index ● monitor for bloating ● see if tablespaces or partitions are recommended
  • 53. pg_stat_activity ▶Check concurrent query activity ● get an idea of the proportion of idle connections ● spot check types of actitivy ● much better than ps for catching runaway transactions
  • 54. pg_locks ▶Spot-check for lock conflicts ● a few are normal in high-data-integrity applications, but a lot is bad ● often a sign that you should change your data locking strategy or simply lower deadlock_timeout ▬ ● if you have ungranted locks, check them against pg_stat_activity
  • 55. DTrace ▶right now you can't see much ● but great things are in development ▶see Robert Lor's demo on Wednesday
  • 56. pg_stat[io]_user_tables, pg_stat[io]_user_indexes ▶check relative table activity ● how much select vs. update traffic? ▶look for seq scans ● do we need more/different indexes? ▶check index activity ● should some indexes be dropped? ● are some very large indexes dominating I/O?
  • 57. pg_stat_bgwriter (new!) ▶see if the bgwriter is clearing the caches ● are we suffering checkpoint spikes?
  • 59. How to use the pg_log 1.Figure out what behavior you're trying to observe 2.Turn only those options on 3.Run a short, reproducible test case (if possible) ● if not, just deliberately trigger the problem behavior 4.Digest the log results If you have to log a production server, you'll need to filter out the noise.
  • 60. Basic query monitoring log_destination = 'syslog' redirect_stderr = off silent_mode = on log_min_duration_statement = 0
  • 61. pg_fouine ▶Calculates overall query statistics ● find the slowest queries ● find the ones running the most frequently ● probably your best way to find the “biggest query moles”
  • 62. Harvesting bad queries log_min_duration_statement = 30 debug_print_plan = on log_line_prefix = %t : %d server_min_messages = DEBUG1
  • 63. Monitoring connections log_connections = on log_disconnections = on log_line_prefix = %t : %p : %d : %r
  • 65. The “Bad Query” tool ▶After you've found your most costly queries ▶Use EXPLAIN ANALYZE to find out why they're so costly ● sometimes you can fix them immediately ● other times they indicate problems in other areas HW issues ▬ schema issues ▬ lack of db maintenance ▬
  • 66. Reading EXPLAIN ANALYZE ▶It's an inverted tree ● don't start at the top ● execution starts at the innermost node and works up and out ● look for the lowest node with a problem ▶Read it holistically ● some nodes execute in parallel and influence each other ● “gaps” between nodes can be significant ● subtrees which are slow don't matter if other subtrees are slower
  • 67. Things to Look For: Examples ▶Bad rowcount estimates ● cause the query to choose bad query plans ● generally can be fixed with increased planner statistics ● sometimes require query re-writing
  • 68. Things to Look For: Examples ▶Bad Scan Cost Estimates ● index or seq scans which seem too slow by estimate ● usually indicates either table/index bloat due to poor maintenance ▬ I/O saturation ▬ I/O problems ▬ not enough RAM ▬
  • 70. Hunting Moles ▶What kind? ● What are the symptoms? response times ▬ error messages ▬ ▶When? ● activity which causes the problem general slowdown or specific operation, or periodic? ▬ caused just by one activity, or by several? ▬ ● concurrent system activity system/DB load? ▬ what other operations are going on on the system? ▬
  • 71. Common Types of Moles ▶I/O Mole ● behavior: cpu underutilized: ram available, I/O saturated for at least one device ● habitats: [D], [O], any heavy write load or very large database ● common causes: bad I/O hardware/software ▬ bad I/O config ▬ not enough ram ▬ too much data requested from application ▬ bad schema: missing indexes or partitioning needed ▬
  • 72. Common Types of Moles ▶CPU Mole ● behavior: cpus at 90% or more: ram available, I/O not saturated ● habitats: [W], [O], mostly-read loads or those involving complex calculation in queries ● causes: too many queries ▬ insufficient caching/pooling ▬ too much data requested by application ▬ bad queries ▬ bad schema: missing indexes ▬ ● can be benign: most DB servers should be CPU-bound at maximum load
  • 73. Common Types of Moles ▶Locking Mole ● behavior: nothing on DB or App server is at maximum, but many queries have long waits, often heavy context switching, pg_locks sometimes shows waits ● habitats: [O], [D], or loads involving pessimistic locking and/or stored procedures ● causes: long-running transactions/procedures ▬ cursors held too long ▬ pessimistic instead of optimistic locking or userlocks ▬ poor transaction management (failure to rollback) ▬ various buffer settings in .conf too low ▬ PostgreSQL SMP scalability limits ▬
  • 74. Common Types of Moles ▶Application Mole ● behavior: nothing on DB server is at maximum, but RAM or CPU on the App servers is completely utilized ● habitats: common in J2EE ● causes: not enough application servers ▬ too much data / too many queries ▬ bad caching/pooling config ▬ driver issues ▬ ORM ▬
  • 76. Slow DW ▶Setup ● Data warehousing application ● Both bulk loads and large reporting queries were very slow ● CPU and RAM were OK, and I/O seemed underused except it never got above a very low ceiling ▬ ▶The Hunt ● used dd, bonnie++, iostat to check I/O behavior ● throughput of JBOD was much slower than internal disk ● compared with similar system by another vendor ▶The Whack ● the RAID card used in that model was defective, replaced
  • 77. Checkpoint Spikes ▶Setup ● OLTP benchmark, but not as fast as MySQL ● Nothing was maxxed ● Query throughput cycled up and down ▶The Hunt ● checked iostat, saw 5-minute cycle ● installed, checked pg_stat_bgwriter showed high amount of buffers_checkpoint ▬ ▶The Whack ● increased bgwriter frequency, amounts ● spikes decreased, overall throughput rose slightly
  • 78. Connection Management ▶The Setup ● JSP web application good 23 hours per day, but bombing during the peak traffic hour DB server would run out of RAM and stop responding ▬ ▶The Hunt ● watched pg_stat_activity and process list during peak periods, took snapshots saw that connections went up to 2000+ during peak, yet many ▬ of them were idle verified this by logging connections ▬ ● checked Tomcat configuration connection pool: 200 connections ▬ servers were set to reconnect after 10 seconds timeout ▬
  • 79. Connection Management ▶The Whack ● Tomcat was “bombing” the database with thousands of failed connections faster than the database could fulfill them ▬ ● Fixed configuration min_connections for pool set to 700 ▬ connection_timeout and pool connection timeout synchronized ▬ ● Suggested improvements upgrade to a J2EE architecture with better pooling ▬
  • 80. Too Many Queries ▶The Setup ● c++ client-server application took 3+ minutes to start up ▶The Hunt ● set pg_log to log queries ran application startup ▬ ● ran through pg_fouine showed over 20,000 queries during startup ▬ most of them identical when normalized ▬ ▶The Whack ● the application was walking several large trees, node-by-node ● taught the programmers to do batch queries and use connect_by()
  • 81. Undead Transactions ▶The Setup ● Perl OLTP application was fast when upgraded, but became slower & slower with time ▶The Hunt ● checked db maintenance schedule: vacuum was being run yet pg_tables showed tables were growing faster than they ▬ should, indexes too vacuum analyze verbose showed lots of “dead tuples could not ▬ be removed” ● checked pg_stat_activity and process list “idle in transaction” ▬ some transactions were living for days ▬
  • 82. Undead Transactions ▶The Whack ● programmers fixed application bug to rollback failed transactions instead of skipping them ● added “undead transaction” checker to their application monitoring
  • 83. Is The Mole Dead? Yes, which means it's time to move on to the next mole. Isn't this fun?
  • 84. Further Questions ▶Josh Berkus ▶More Advice ● ● www.postgresql.org/docs josh@postgresql.org ● ● www.varlena.com/ josh.berkus@sun.com generalbits ● www.powerpostgresql.com ● www.planetpostgresql.org ● blogs.ittoolbox.com/ ● irc.freenode.net database/soup #postgresql ▬ Special thanks for borrowed content to: www.MolePro.com for the WhackaMole Game Greg Smith for pgbench and bonnie++ results This talk is copyright 2007 Josh Berkus, and is licensed under the creative commons attribution license