SlideShare uma empresa Scribd logo
1 de 60
Baixar para ler offline
Managing MySQL with
                        Percona Toolkit




LOADAYS 2012 – April 1st
Who am I ?
Frédéric Descamps
@lefred
http://about.me/lefred
Percona Consultant
Managing mysql since 3.23 (as far as I
remember)
devops believer


                                         www.percona.com
Agenda

●   What is Percona
    Toolkit ?
●   What tools are
    included and what
    can they do ?
●   Quick intro to several
    tools
●   Resources


                                 www.percona.com
Percona Toolkit

●   Origin: Maatkit and Aspersa (both projects
    started by Baron Schwartz with Daniel Nichter's
    contribution)
●   Indispensable tools for MySQL administrators
●   Opensource GNU GPL v2
●   https://launchpad.net/percona-toolkit
●   http://www.percona.com/software/percona-toolkit/
●   Current version is 2.0.4

                                            www.percona.com
Other Toolkits




                 www.percona.com
Percona Toolkit ;-)




                      www.percona.com
More seriously:




                  www.percona.com
Installation
●
    Requirements:
      ➢
          Perl, DBI, DBD::pgsql, Wine or Mono
      ➢
          Better performance with Wine
●
    Download zip:
      ➢
          http://megaupload.com/PTK204
      ➢
          It's in Percona's MSN repository
●
    We are working on a Java version
●
    Easy to run: wine pt-diskstats_win32.exe

                                                www.percona.com
Installation
●
    Requirements:
      ➢
          Perl, DBI, DBD::pgsql, Wine or Mono
      ➢
          Better performance with Wine
●
    Download zip:
      ➢
          http://megaupload.com/PTK204
      ➢
          It's in Percona's MSN repository
●
    We are working on a Java version
●
    Easy to run: wine pt-diskstats_win32.exe

                                                www.percona.com
Installation
●
    Requirements:
      ➢
          Perl, DBI, DBD::mysql, Term::ReadKey
●
    Download tarball, RPM or DEB packages:
      ➢
          wget percona.com/get/percona-toolkit.rpm
      ➢
          It's in Percona repository
●
    Download individual tools:
      ➢
          wget percona.com/get/pt-diskstats




                                             www.percona.com
Know your environment:
Hardware & Operating System




                     www.percona.com   11
Know your environment
                (Hardware & OS)
    We need to find the answers to these questions:
●   On what kind of machine runs my db ? Physical/Virtual ?
●   How much memory is used/free ? Does it swap ? Can I add more ?
●   How many CPUs and CPU cores ? Speed ?
●   Is this a 64bit machine ?
●   What kind of RAID controller ? Volumes ? Disks ?
●   What about network interfaces ? Connections ? Processes ?
●   What's the Operating System ? Kernel ? Release ?
●   Which IO scheduler is in use ?
●   On which filesystem is the data stored ?
●   Do we have free space ?




                                                       www.percona.com   12
Summary !
Name: pt-summary
Function: summarize system information in
a nice way
Url: http://www.percona.com/doc/percona-toolkit/2.0/pt-summary.html




                                                   www.percona.com    13
Taking inventory
$ wget percona.com/get/pt-summary
$ chmod +x pt-summary
$ ./pt-summary
# Percona Toolkit System Summary Report ######################
        Date | 2012-02-02 12:25:18 UTC (local TZ: EET +0200)
    Hostname | db01
      Uptime | 42 days, 16:14, 1 user, load average: 1.15, 1.22, 1.08
      System | HP; ProLiant DL580 G7; vNot Specified (Rack Mount Chassis)
 Service Tag | FOSDEM2012
    Platform | Linux
     Release | CentOS release 6.1 (Final)
      Kernel | 2.6.32-131.21.1.el6.x86_64
Architecture | CPU = 64-bit, OS = 64-bit
   Threading | NPTL 2.12
    Compiler | GNU CC version 4.4.5 20110214 (Red Hat 4.4.5-6).
     SELinux | Disabled
 Virtualized | No virtualization detected
# Processor ##################################################
  Processors | physical = 4, cores = 40, virtual = 80, hyperthreading = yes
      Speeds | 80x2397.393
      Models | 80xIntel(R) Xeon(R) CPU E7- 4870 @ 2.40GHz

[ Further output omitted ]


                                                               www.percona.com   14
Know your environment:
       MySQL




                   www.percona.com   15
Know your environment (MySQL)
    We need to find the answers to these questions:
●   Version ? Build ?
●   How many database ? Where is the data directory ?
●   What about replication ? How many replicas ?
●   Do you use some Key XtraDB features ?
●   What are the Key InnoDB settings ?
●   Which storage engines are used ?
●   What types of data fields are used ? Index types ?
●   Do we use foreign keys ? Views ? Triggers ?
●   Do we use Full-text indexes ? Partitioning ?
●   What about Privileges ?


                                               www.percona.com   16
Summary... again !
Name: pt-mysql-summary
Function: Summarize MySQL information in
a nice way
Url: http://www.percona.com/doc/percona-toolkit/2.0/pt-mysql-summary.html




                                                        www.percona.com     17
Taking inventory (cont.)
$ wget percona.com/get/pt-mysql-summary
$ chmod +x pt-mysql-summary
$ ./pt-mysql-summary
# Percona Toolkit MySQL Summary Report #######################
         System time | 2012-02-02 12:24:37 UTC (local TZ: EET +0200)
# Instances ##################################################
  Port Data Directory              Socket
  ===== ========================== ======
        /mysql
# Report On Port 3306 ########################################
                User | root@localhost
                Time | 2012-02-02 14:24:38 (EET)
            Hostname | db01
             Version | 5.5.18-55-log Percona
            Built On | Linux x86_64
             Started | 2011-12-26 21:09 (up 37+17:15:35)
           Databases | 6
             Datadir | /mysql/
           Processes | 10 connected, 4 running
         Replication | Is a slave, has 1 slaves connected
             Pidfile | /mysql/mysqld.pid (exists)


[ Further output omitted ]


                                                                www.percona.com   18
Master ? Slave ?... both ?
Name: pt-slave-find
Function: find and print replication hierarchy
tree of MySQL slaves.
Url: http://www.percona.com/doc/percona-toolkit/2.0/pt-slave-find.html




                                                     www.percona.com     19
Inventory of Replicas
$ ./pt-slave-find localhost
localhost
Version         5.5.18-55-log
Server ID       11
Uptime          37+17:45:50 (started 2011-12-26T21:09:03)
Replication     Is a slave, has 1 slaves connected, is not read_only
Filters
Binary logging MIXED
Slave status    0 seconds behind, running, no errors
Slave mode      STRICT
Auto-increment increment 2, offset 1
InnoDB version 1.1.8-rel23.0
+- 10.0.0.17
   Version         5.5.18-55-log
   Server ID       12
   Uptime          27+21:02:35 (started 2012-01-05T17:52:18)
   Replication     Is a slave, has 1 slaves connected, is not read_only
   Filters
   Binary logging MIXED
   Slave status    0 seconds behind, running, no errors
   Slave mode      STRICT
   Auto-increment increment 2, offset 2
   InnoDB version 1.1.8-rel23.0


                                                               www.percona.com   20
Where's My Disk I/O Going ?
●   Use pt-diskstats as an improved iostat
     ➢ Interactively controllable, slice-and-dice
     ➢ Doesn't lump reads and writes together


     ➢ Meaningful, correct columns


●   Use pt-ioprofile to measure & time your
    I/O
     ➢   Which files is MySQL using ? How much times does it
         spend reading, writing, syncing, etc? How many
         reads/writes? How large are they ?
            pt-ioprofile can be dangerous in production
                                                    www.percona.com   21
Disk I/O
Name: pt-diskstats
Function: Aggregate and summarize
/proc/diskstats
Url:   http://www.percona.com/doc/percona-toolkit/2.0/pt-diskstats.html




                                                       www.percona.com    22
Disk I/O
# ./pt-diskstats

     #ts device     rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt          wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt busy in_prg   io_s qtime stime

{1} sdb    158.0     5.8      0.9      0% 0.8      4.9 392.1 24.3     9.3 51% 0.6      0.7 54%    0 550.1 0.9 0.6
{1} sdb1    158.0     5.8      0.9      0% 0.8      4.9 392.1 24.3     9.3 51% 0.6      0.7 54%   0 550.1 0.9 0.6

{2} sda     0.5     4.0      0.0      0% 0.0      8.0      3.0 59.3 0.2 93% 0.0 0.2 1%    0 3.5 0.0 0.3
{2} sda2     0.0     0.0      0.0      0% 0.0      0.0      1.0 16.0 0.0 75% 0.0 1.0 0%    0 1.0 0.0 1.0
{2} sda5     0.5     4.0      0.0      0% 0.0      8.0      2.0 81.0 0.2 95% 0.0 0.1 1%    0 2.5 0.0 0.2
{2} sdb    150.0      8.7      1.3      3% 1.1      6.9    448.5 40.6 17.8 84% 1.4 0.5 53%   0 598.6 0.6 0.2
{2} sdb1    143.0      8.9      1.2      3% 1.0      6.8    400.5 24.7 9.7 49% 0.7 0.9 51%   0 543.6 1.3 0.5
{2} sdb2     7.0     4.0      0.0      0% 0.1     10.0      48.0 173.0 8.1 98% 0.7 0.3 9%   0 55.0 0.3 0.0



                                                                 wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt
                                                                392.1 24.3 9.3 51% 0.6 0.7
                                                                392.1 24.3 9.3 51% 0.6 0.7

                                                                  3.0     59.3 0.2 93% 0.0 0.2
                                                                  1.0     16.0 0.0 75% 0.0 1.0
                                                                  2.0     81.0 0.2 95% 0.0 0.1
                                                                448.5      40.6 17.8 84% 1.4 0.5
                                                                400.5      24.7 9.7 49% 0.7 0.9
                                                                 48.0     173.0 8.1 98% 0.7 0.3




                                                                                                                                                www.percona.com   23
I/O Profile
Name: pt-ioprofile
Function: Watch process IO and print a table
of file and I/O activity.
Url:   http://www.percona.com/doc/percona-toolkit/2.0/pt-ioprofile.html




                                                       www.percona.com    24
I/O profile
# ./pt-ioprofile
Sat Feb 4 13:44:08 CET 2012
Tracing process ID 24179
   total   read    write  open      close   lseek filename
 0.007547 0.000583 0.004245      0.002181   0.000268 0.000270 /tmp/#sql_5e73_1.MYI
 0.000686 0.000000 0.000000      0.000420   0.000266 0.000000 /tmp/#sql_5e73_1.MYD
 0.000065 0.000000 0.000024      0.000029   0.000012 0.000000 /var/lib/mysql/fred/db.opt
 0.000055 0.000000 0.000000      0.000055   0.000000 0.000000 /var/lib/mysql/mysql/db.opt
 0.000046 0.000000 0.000000      0.000046   0.000000 0.000000 /var/lib/mysql/test/db.opt




                                                                    www.percona.com         25
Be intimate with your database




                        www.percona.com   26
Let's try to find the answer to these
    indiscreet questions:


●   How are the indexes used ?
●   Are there duplicate keys ?
●   Which queries are eating most of the
    resources ?


                                      www.percona.com   27
Analyze Schema & Queries
●   Duplicate/redundant indexes or foreign keys?
     ➢   pt-duplicate-key-checker can tell you that
●   Which indexes are unused?
     ➢   pt-index-usage can tell you that
     ➢   It can also show which queries have unstable
         plans, which indexes have alternatives that are
         never chosen, and lots more
●   Bad SQL?
     ➢ pt-query-advisor to the rescue




                                                www.percona.com   28
Analyze & Profile Your Workload
●   Use pt-query-digest to analyze the “slow
    query log” and show a profile of the workload
●   It does the Right Thing by default
●   Mostly used with slow query logs & tcpdumps




                                        www.percona.com   29
The Report
●   Each class of query is ranked by execution time
●   There is a report for each class of query
●   It's easy to use
●   It's a great way to start optimizing queries




                                        www.percona.com   30
Overview Report
#   13903.5s user time, 39.9s system time, 1.78G rss, 1.92G vsz
#   Current date: Mon Jan 30 20:36:26 2012
#   Hostname: hp-db01
#   Files: /var/lib/mysql/db01-slow.log
#   Overall: 32.98M total, 1.32k unique, 1.73k QPS, 2.06x concurrency ______
#   Time range: 2012-01-30 11:08:22 to 16:25:40
#   Attribute          total     min     max     avg     95% stddev median
#   ============     ======= ======= ======= ======= ======= ======= =======
#   Exec time         39309s     1us    161s     1ms   515us   109ms    30us
#   Lock time          4471s       0    161s   135us    89us    90ms       0
#   Rows sent        118.72M       0 1010.29k    3.77    1.96 963.89         0
#   Rows examine      15.54G       0   3.51M 505.92     1.96 11.61k        0
#   Rows affecte       1.64M       0   2.85k    0.05       0    1.82       0
#   Rows read        118.72M       0 1010.29k    3.77    1.96 963.89         0
#   Bytes sent        52.40G       0 45.18M    1.67k   5.20k 20.30k 537.02
#   Merge passes         128       0       1    0.00       0    0.00       0
#   Tmp tables       957.76k       0       4    0.03       0    0.17       0
#   Tmp disk tbl     297.92k       0       2    0.01       0    0.10       0
#   Tmp tbl size       5.21T       0   2.22G 169.59k       0   1.78M       0
#   Query size         8.52G       6 130.40k 277.38 833.10 709.99 174.84
#   InnoDB:
#   IO r bytes       672.00k       0 32.00k     0.06       0   35.90       0
#   IO r ops              42       0       2    0.00       0    0.00       0
#   IO r wait           19ms       0     2ms       0       0     1us       0
#   pages distin     329.98M       0 32.08k    28.18   42.48 307.62     4.96
#   queue wait             0       0       0       0       0       0       0
#   rec lock wai       3402s       0    161s   277us       0   147ms       0
#   Boolean:
#   Filesort       2% yes, 97% no
#   Filesort on    0% yes, 99% no
#   Full join      0% yes, 99% no
#   Full scan      2% yes, 97% no
#   QC Hit        55% yes, 44% no
#   Tmp table      2% yes, 97% no
#   Tmp table on   0% yes, 99% no




                                                                                 www.percona.com   31
Profile Report

# Profile
# Rank Query ID             Response time   Calls     R/Call    Apdx   V/M     Item
# ==== ==================   =============== ======== =======    ====   =====   ====
#    1 0x844F3DA35A4A426D   8695.6994 22.1%    41470 0.2097     1.00    0.12   SELECT   catalog
#    2 0xD566217EB8EB1A27   4098.9154 10.4%    48740 0.0841     1.00    0.11   SELECT   geoip
#    3 0xB0A48B410B3CC151   2684.9671 6.8%         55 48.8176   0.00   34.18   UPDATE   SELECT sales_
#    4 0x60CDD6CAE6B487BC   2541.5271 6.5%        352 7.2202    0.20    4.01   SELECT   catalog catalog_category_product
#    5 0xD9DED53EF74C877F   1285.6118 3.3% 5530829 0.0002       1.00    0.00   SELECT   op_image
#    6 0x1F3D58843008ACEC   1249.1639 3.2%        182 6.8635    0.12    1.65   SELECT   catalog_product
#    7 0x50175ED6D1B1C8B1   1188.1541 3.0%    153964 0.0077     1.00    0.00   SELECT   enterprise
#    8 0x70E2BE84868444A4   1035.3475 2.6%      1786 0.5797     0.98    0.16   SELECT   sales_order
#    9 0x125DFE84FFA50675    891.3327 2.3%        382 2.3333    0.97   11...   INSERT   UPDATE product
#   10 0xBB968DD9BF27E8E5    797.3765 2.0%    153964 0.0052     1.00    0.00   SELECT   enterprise




                                                                                                 www.percona.com           32
Per Query Report
#   Query 1: 2.25 QPS, 0.47x concurrency, ID 0x844F3DA35A4A426D at byte 4779840203
#   Attribute    pct    total     min    max     avg     95% stddev median
#   ============ === ======= ======= ======= ======= ======= ======= =======
#   Count           0   41470
#   Exec time      22   8696s    97ms     3s   210ms   455ms    159ms  155ms
#   Lock time       0      7s   107us   50ms   177us   247us    272us  159us
#   Rows sent       1   1.60M       26    50   40.45   49.17    10.74  46.83
#   Rows examine 16     2.63G 66.43k 66.60k 66.49k 65.68k           0 65.68k
#   Rows affecte    0       0        0     0       0       0        0      0
#   Rows read       1   1.60M       26    50   40.45   49.17    10.74  46.83
#   Bytes sent      0 200.43M   3.39k  6.14k   4.95k   6.01k    1.08k  5.45k
#   Merge passes    0       0        0     0       0       0        0      0
#   Tmp tables      4 40.50k         1     1       1       1        0      1
#   Tmp disk tbl    0       0        0     0       0       0        0      0
#   Tmp tbl size 12 647.83G 16.00M 16.00M 16.00M 16.00M             0 16.00M
#   Query size      0 71.78M    1.77k  1.77k   1.77k   1.77k        0  1.77k
#   InnoDB:
#   IO r bytes      0       0        0     0       0       0        0      0
#   IO r ops        0       0        0     0       0       0        0      0
#   IO r wait       0       0        0     0       0       0        0      0
#   pages distin 47 158.13M     3.90k  3.92k   3.90k   3.88k     0.00  3.88k
#   queue wait      0       0        0     0       0       0        0      0
#   rec lock wai    0       0        0     0       0       0        0      0
#   Boolean:
#   Filesort     100% yes,    0% no
#   Full scan    100% yes,    0% no
#   Tmp table    100% yes,    0% no
#   String:
#   Databases    prod
#   Hosts
#   InnoDB trxID 3CB60AED (1/0%), 3CB60B3E (1/0%)... 41468 more
#   Last errno   0
#   Users        prod
#   Query_time distribution
#     1us
#    10us
#   100us
#     1ms
#    10ms
#   100ms ################################################################
#      1s #
#    10s+




                                                                                     www.percona.com   33
Maintain your environment




                     www.percona.com   34
Log & Analyze Errors ?
●   Use pt-deadlock-logger to capture
    deadlocks
●   Use pt-fk-error-logger for foreign key
    errors
●   The tools give you the possibility to log the
    results to a database table for analysis




                                         www.percona.com   35
Monitor dead locks
Name: pt-deadlock-logger
Function: extract and log MySQL deadlock
information
Url: http://www.percona.com/doc/percona-toolkit/2.0/pt-deadlock-logger.html
●   SHOW ENGINE INNODB STATUS reports only the most
    recent deadlock
●   Information in status output lacks details about user, client
    host, other locks in the deadlock cycle.
●   pt-deadlock-logger formats the needed information
    nicely and saves it
                                                         www.percona.com      36
Monitor Foreign Key Errors
Name: pt-fk-error-logger
Function: extract and log MySQL foreign key
errors.
Url: http://www.percona.com/doc/percona-toolkit/2.0/pt-fk-error-logger.html
●   Like pt-deadlock-logger, this tool collects more useful
    information, formats it nicely and saves it.




                                                        www.percona.com       37
Non-Blocking ALTER TABLE
●   Use pt-online-schema-change to alter
    tables
      ➢ It makes a “shadow copy” and swaps them


      ➢ Extremely useful for large, long-running

        ALTER
      ➢ Facebook uses the same technique




                                       www.percona.com   38
Validate Upgrades
●   Upgrades are a leading cause of downtime
     ➢ Are any queries using different indexes ? Is QEP
       different ?
     ➢ Are there new errors or warnings ?


     ➢ Do queries return the same results ?


     ➢ Are there significant response time differences ?


●   Validate the results before you upgrade!
     ➢ Capture a snapshot of the data
     ➢ Capture a log of queries


     ➢ Compare the queries on two test servers running the

       old and the new version
                                                 www.percona.com   39
Validate upgrades
Name: pt-upgrade
Function: Execute queries on multiple
servers and check for differences.
Url: http://www.percona.com/doc/percona-toolkit/2.0/pt-upgrade.html




                                                         www.percona.com   40
pt-upgrade
#   Query 2: ID 0xE2C8DC0286B7F44E at byte 0 _______________________________
#   Found 23281 differences in 58207 samples:
#     checksums       0
#     column counts   0
#     column types    0
#     query times     23281
#     row counts      0
#     warning counts 0
#     warning levels 0
#     warnings        0
#              AF002020:3306 AF001885:3306
#   Errors                  0            0
#   Warnings                0            0
#   Query_time
#     sum                 34s          70s
#     min               395us        342us
#     max               218ms        308ms
#     avg               587us          1ms
#     pct_95            725us          3ms
#     stddev              2ms          4ms
#     median            541us        690us
#   row_count
#     sum               1.75k        1.75k
#     min                   0            0
#     max                   1            1
#     avg                0.03         0.03
#     pct_95                0            0
#     stddev             0.17         0.17
#     median                0            0

                                                                               www.percona.com   41
Tools for Replication
●   Verify replication integrity (pt-table-checksum)
●   Repair out-of-sync replicas (pt-table-sync)
●   Measure delay accurately (pt-heartbeat)
●   Deliberately delay replication (pt-slave-delay)
●   Watch & restart replication (pt-slave-restart)




                                         www.percona.com   42
Verify replication Integrity
Name: pt-table-checksum
Function: perform an online replication
consistency check, or checksum MySQL
tables efficiently on one or many servers.
Url: http://www.percona.com/doc/percona-toolkit/2.0/pt-table-checksum.html
●   Use it routinely (mandatory for 95% of MySQL users)
●   It used to be complicated; no more. Just run it!
●   Put it in a weekly crontab
●   Repair differences with pt-table-sync
                                                         www.percona.com     43
I feel bad...




                www.percona.com   44
Find problems
●   What do you advise me doctor ?
●   Get the symptoms when it hurts !




                                   www.percona.com   45
Get the symptoms when it hurts !
    To perform this action, do a check-up when
    you feel bad:

●   pt-stalk
●   pt-sift




                                   www.percona.com   46
Does it hurt ?
Name: pt-stalk
Function: wait for a condition to occur then
begin collecting data.
Url: http://www.percona.com/doc/percona-toolkit/2.0/pt-stalk.html




                                                 www.percona.com    47
We need your health parameters
Name: pt-collect
Function: collect information from a server
for some period of time.
                      OBSOLETE
Url: http://www.percona.com/doc/percona-toolkit/2.0/pt-collect.html




                                                     www.percona.com   48
Let me check...
Name: pt-sift
Function: browses files created by pt-stalk.
Url: http://www.percona.com/doc/percona-toolkit/2.0/pt-collect.html




                                                    www.percona.com   49
Very useful
Name: pt-mext
Function: Look at many samples of MySQL
SHOW GLOBAL STATUS side-by-side
Url:     http://www.percona.com/doc/percona-toolkit/pt-mext.html

●   Default STATUS shows counter since the MySQL
    instances started.
●   It is more helpful to see a delta of recent activity, to check if
    a change you applied made a difference.


                                                      www.percona.com   50
pt-mext
    pt-mext -r -- mysqladmin ext -i10 -c5
    All values are interesting but you should pay even more attention to:
●   Created_tmp_*
●   Handler_read_*
●   Innodb_buffer_pool_read*
●   Innodb_os_log_written
●   Key_read_requests
●   Key_reads
●   Qchache*
●   Select_full_*join
●   Select_range
●   Select_scan
●   Table_locks_waited
●   Threads_running


                                                          www.percona.com   51
Stop Bad Queries
●   Use pt-kill to watch for long-running queries
    and optionally kill them
●   Prevent long-running idle transactions too.




                                      www.percona.com   52
Percona Toolkit's Future
●   Rapid development & improvement of tools
●   Fully supported via Percona Support contract
●   Upcoming:
     ➢ pt-*summary redesigned


     ➢ pt-stalk “magical fault detection algorithm”


     ➢ Redesign of pt-online-schema-change (see

         http://www.percona.com/docs/wiki/ptdev:blueprints:redesign-pt-
         online-schema-change)
     ➢   more goodies
            •https://blueprints.launchpad.net/percona-toolkit


                                                          www.percona.com   53
Report bugs & patches




                   www.percona.com   54
Report bugs & patches




Belgian Beers ....... what else !?
                              www.percona.com   55
Thank you for your participation to
                        LOADAYS
Due to time I was not able to present
two new Percona projects related to
                    High Availability.

     If you want to discuss PRM and
      XtraDB Cluster... I am available
PRM
●   Percona Replication Manager
●   Uses Corosync / Pacemaker
●   Distributed architecture, no SPOF
●   One master multiple slaves
●   Slaves maintain a master score attribute
    based on replication state
●   Full stonith/fencing stack
●   Flexible logic, score based


                                    www.percona.com   58
Percona XtraDB Cluster
●   Percona Server + Galera
●   Synchronous replication
●   Multi-master replication
●   Multi-threaded slaves
●   Data consistency across all peers
●   Automatic nodes provisioning




                                    www.percona.com   59
lefred@percona.com
                               @lefred



We're Hiring! www.percona.com/about-us/careers/

Mais conteúdo relacionado

Mais procurados

Linux-HA with Pacemaker
Linux-HA with PacemakerLinux-HA with Pacemaker
Linux-HA with PacemakerKris Buytaert
 
Migrating to XtraDB Cluster
Migrating to XtraDB ClusterMigrating to XtraDB Cluster
Migrating to XtraDB Clusterpercona2013
 
High Availability != High-cost
High Availability != High-costHigh Availability != High-cost
High Availability != High-costnormanmaurer
 
Migrating to XtraDB Cluster
Migrating to XtraDB ClusterMigrating to XtraDB Cluster
Migrating to XtraDB Clusterpercona2013
 
Exadata and OLTP
Exadata and OLTPExadata and OLTP
Exadata and OLTPEnkitec
 
Corosync and Pacemaker
Corosync and PacemakerCorosync and Pacemaker
Corosync and PacemakerMarian Marinov
 
High Availability in 37 Easy Steps
High Availability in 37 Easy StepsHigh Availability in 37 Easy Steps
High Availability in 37 Easy StepsTim Serong
 
イマドキなNetwork/IO
イマドキなNetwork/IOイマドキなNetwork/IO
イマドキなNetwork/IOTakuya ASADA
 
Percon XtraDB Cluster in a nutshell
Percon XtraDB Cluster in a nutshellPercon XtraDB Cluster in a nutshell
Percon XtraDB Cluster in a nutshellFrederic Descamps
 
Open stack pike-devstack-tutorial
Open stack pike-devstack-tutorialOpen stack pike-devstack-tutorial
Open stack pike-devstack-tutorialEueung Mulyana
 
Percona XtraDB 集群内部
Percona XtraDB 集群内部Percona XtraDB 集群内部
Percona XtraDB 集群内部YUCHENG HU
 
Fosdem 2014 - MySQL & Friends Devroom: 15 tips galera cluster
Fosdem 2014 - MySQL & Friends Devroom: 15 tips galera clusterFosdem 2014 - MySQL & Friends Devroom: 15 tips galera cluster
Fosdem 2014 - MySQL & Friends Devroom: 15 tips galera clusterFrederic Descamps
 
Advanced percona xtra db cluster in a nutshell... la suite plsc2016
Advanced percona xtra db cluster in a nutshell... la suite plsc2016Advanced percona xtra db cluster in a nutshell... la suite plsc2016
Advanced percona xtra db cluster in a nutshell... la suite plsc2016Frederic Descamps
 
Kernel Recipes 2017: Performance Analysis with BPF
Kernel Recipes 2017: Performance Analysis with BPFKernel Recipes 2017: Performance Analysis with BPF
Kernel Recipes 2017: Performance Analysis with BPFBrendan Gregg
 
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey GordeychikCODE BLUE
 
Kernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureKernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureAnne Nicolas
 
L3HA-VRRP-20141201
L3HA-VRRP-20141201L3HA-VRRP-20141201
L3HA-VRRP-20141201Manabu Ori
 
Linux lv ms step by step
Linux lv ms step by stepLinux lv ms step by step
Linux lv ms step by stepsudakarman
 

Mais procurados (20)

Linux-HA with Pacemaker
Linux-HA with PacemakerLinux-HA with Pacemaker
Linux-HA with Pacemaker
 
Migrating to XtraDB Cluster
Migrating to XtraDB ClusterMigrating to XtraDB Cluster
Migrating to XtraDB Cluster
 
High Availability != High-cost
High Availability != High-costHigh Availability != High-cost
High Availability != High-cost
 
Migrating to XtraDB Cluster
Migrating to XtraDB ClusterMigrating to XtraDB Cluster
Migrating to XtraDB Cluster
 
Exadata and OLTP
Exadata and OLTPExadata and OLTP
Exadata and OLTP
 
Corosync and Pacemaker
Corosync and PacemakerCorosync and Pacemaker
Corosync and Pacemaker
 
High Availability in 37 Easy Steps
High Availability in 37 Easy StepsHigh Availability in 37 Easy Steps
High Availability in 37 Easy Steps
 
イマドキなNetwork/IO
イマドキなNetwork/IOイマドキなNetwork/IO
イマドキなNetwork/IO
 
Percon XtraDB Cluster in a nutshell
Percon XtraDB Cluster in a nutshellPercon XtraDB Cluster in a nutshell
Percon XtraDB Cluster in a nutshell
 
Inventario 201 i
Inventario 201 iInventario 201 i
Inventario 201 i
 
Open stack pike-devstack-tutorial
Open stack pike-devstack-tutorialOpen stack pike-devstack-tutorial
Open stack pike-devstack-tutorial
 
Percona XtraDB 集群内部
Percona XtraDB 集群内部Percona XtraDB 集群内部
Percona XtraDB 集群内部
 
Fosdem 2014 - MySQL & Friends Devroom: 15 tips galera cluster
Fosdem 2014 - MySQL & Friends Devroom: 15 tips galera clusterFosdem 2014 - MySQL & Friends Devroom: 15 tips galera cluster
Fosdem 2014 - MySQL & Friends Devroom: 15 tips galera cluster
 
Advanced percona xtra db cluster in a nutshell... la suite plsc2016
Advanced percona xtra db cluster in a nutshell... la suite plsc2016Advanced percona xtra db cluster in a nutshell... la suite plsc2016
Advanced percona xtra db cluster in a nutshell... la suite plsc2016
 
Kernel Recipes 2017: Performance Analysis with BPF
Kernel Recipes 2017: Performance Analysis with BPFKernel Recipes 2017: Performance Analysis with BPF
Kernel Recipes 2017: Performance Analysis with BPF
 
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
 
Kernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureKernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and future
 
L3HA-VRRP-20141201
L3HA-VRRP-20141201L3HA-VRRP-20141201
L3HA-VRRP-20141201
 
Linux lv ms step by step
Linux lv ms step by stepLinux lv ms step by step
Linux lv ms step by step
 
Speeding up ps and top
Speeding up ps and topSpeeding up ps and top
Speeding up ps and top
 

Destaque

Alfresco Business Reporting - Tech Talk Live 20130501
Alfresco Business Reporting - Tech Talk Live 20130501Alfresco Business Reporting - Tech Talk Live 20130501
Alfresco Business Reporting - Tech Talk Live 20130501Tjarda Peelen
 
Inspecting a multi everything linux system (plmce2k14)
Inspecting a multi everything linux system (plmce2k14)Inspecting a multi everything linux system (plmce2k14)
Inspecting a multi everything linux system (plmce2k14)Frederic Descamps
 
Plmce2k15 15 tips galera cluster
Plmce2k15   15 tips galera clusterPlmce2k15   15 tips galera cluster
Plmce2k15 15 tips galera clusterFrederic Descamps
 
OpenWorld 2014 - Schema Management: versioning and automation with Puppet and...
OpenWorld 2014 - Schema Management: versioning and automation with Puppet and...OpenWorld 2014 - Schema Management: versioning and automation with Puppet and...
OpenWorld 2014 - Schema Management: versioning and automation with Puppet and...Frederic Descamps
 
Undelete (and more) rows from the binary log
Undelete (and more) rows from the binary logUndelete (and more) rows from the binary log
Undelete (and more) rows from the binary logFrederic Descamps
 
Pluk2011 deploy-mysql-like-a-devops-sysadmin
Pluk2011 deploy-mysql-like-a-devops-sysadminPluk2011 deploy-mysql-like-a-devops-sysadmin
Pluk2011 deploy-mysql-like-a-devops-sysadminFrederic Descamps
 
Jeudis du Libre - MySQL comme Document Store
Jeudis du Libre - MySQL comme Document StoreJeudis du Libre - MySQL comme Document Store
Jeudis du Libre - MySQL comme Document StoreFrederic Descamps
 

Destaque (8)

Alfresco Business Reporting - Tech Talk Live 20130501
Alfresco Business Reporting - Tech Talk Live 20130501Alfresco Business Reporting - Tech Talk Live 20130501
Alfresco Business Reporting - Tech Talk Live 20130501
 
Inspecting a multi everything linux system (plmce2k14)
Inspecting a multi everything linux system (plmce2k14)Inspecting a multi everything linux system (plmce2k14)
Inspecting a multi everything linux system (plmce2k14)
 
Oss4b - pxc introduction
Oss4b   - pxc introductionOss4b   - pxc introduction
Oss4b - pxc introduction
 
Plmce2k15 15 tips galera cluster
Plmce2k15   15 tips galera clusterPlmce2k15   15 tips galera cluster
Plmce2k15 15 tips galera cluster
 
OpenWorld 2014 - Schema Management: versioning and automation with Puppet and...
OpenWorld 2014 - Schema Management: versioning and automation with Puppet and...OpenWorld 2014 - Schema Management: versioning and automation with Puppet and...
OpenWorld 2014 - Schema Management: versioning and automation with Puppet and...
 
Undelete (and more) rows from the binary log
Undelete (and more) rows from the binary logUndelete (and more) rows from the binary log
Undelete (and more) rows from the binary log
 
Pluk2011 deploy-mysql-like-a-devops-sysadmin
Pluk2011 deploy-mysql-like-a-devops-sysadminPluk2011 deploy-mysql-like-a-devops-sysadmin
Pluk2011 deploy-mysql-like-a-devops-sysadmin
 
Jeudis du Libre - MySQL comme Document Store
Jeudis du Libre - MySQL comme Document StoreJeudis du Libre - MySQL comme Document Store
Jeudis du Libre - MySQL comme Document Store
 

Semelhante a Loadays managing my sql with percona toolkit

Docker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12xDocker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12xrkr10
 
Docker Introduction, and what's new in 0.9 — Docker Palo Alto at RelateIQ
Docker Introduction, and what's new in 0.9 — Docker Palo Alto at RelateIQDocker Introduction, and what's new in 0.9 — Docker Palo Alto at RelateIQ
Docker Introduction, and what's new in 0.9 — Docker Palo Alto at RelateIQJérôme Petazzoni
 
Docker Introduction + what is new in 0.9
Docker Introduction + what is new in 0.9 Docker Introduction + what is new in 0.9
Docker Introduction + what is new in 0.9 Jérôme Petazzoni
 
Docker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12XDocker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12XJérôme Petazzoni
 
Introduction to Docker (as presented at December 2013 Global Hackathon)
Introduction to Docker (as presented at December 2013 Global Hackathon)Introduction to Docker (as presented at December 2013 Global Hackathon)
Introduction to Docker (as presented at December 2013 Global Hackathon)Jérôme Petazzoni
 
Dynamic tracing of MariaDB on Linux - problems and solutions (MariaDB Server ...
Dynamic tracing of MariaDB on Linux - problems and solutions (MariaDB Server ...Dynamic tracing of MariaDB on Linux - problems and solutions (MariaDB Server ...
Dynamic tracing of MariaDB on Linux - problems and solutions (MariaDB Server ...Valeriy Kravchuk
 
E bpf and dynamic tracing for mariadb db as (mariadb day during fosdem 2020)
E bpf and dynamic tracing for mariadb db as (mariadb day during fosdem 2020)E bpf and dynamic tracing for mariadb db as (mariadb day during fosdem 2020)
E bpf and dynamic tracing for mariadb db as (mariadb day during fosdem 2020)Valeriy Kravchuk
 
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013dotCloud
 
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Lightweight Virtualization with Linux Containers and Docker I YaC 2013Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Lightweight Virtualization with Linux Containers and Docker I YaC 2013Docker, Inc.
 
Percona Toolkit for Effective MySQL Administration
Percona Toolkit for Effective MySQL AdministrationPercona Toolkit for Effective MySQL Administration
Percona Toolkit for Effective MySQL AdministrationMydbops
 
Dockerizing the Hard Services: Neutron and Nova
Dockerizing the Hard Services: Neutron and NovaDockerizing the Hard Services: Neutron and Nova
Dockerizing the Hard Services: Neutron and Novaclayton_oneill
 
Gdb basics for my sql db as (percona live europe 2019)
Gdb basics for my sql db as (percona live europe 2019)Gdb basics for my sql db as (percona live europe 2019)
Gdb basics for my sql db as (percona live europe 2019)Valerii Kravchuk
 
Analyze Virtual Machine Overhead Compared to Bare Metal with Tracing
Analyze Virtual Machine Overhead Compared to Bare Metal with TracingAnalyze Virtual Machine Overhead Compared to Bare Metal with Tracing
Analyze Virtual Machine Overhead Compared to Bare Metal with TracingScyllaDB
 
Why you’re going to fail running java on docker!
Why you’re going to fail running java on docker!Why you’re going to fail running java on docker!
Why you’re going to fail running java on docker!Red Hat Developers
 
Deploying software at Scale
Deploying software at ScaleDeploying software at Scale
Deploying software at ScaleKris Buytaert
 
Linux /proc filesystem for MySQL DBAs - FOSDEM 2021
Linux  /proc filesystem for MySQL DBAs - FOSDEM 2021Linux  /proc filesystem for MySQL DBAs - FOSDEM 2021
Linux /proc filesystem for MySQL DBAs - FOSDEM 2021Valeriy Kravchuk
 
Let's Containerize New York with Docker!
Let's Containerize New York with Docker!Let's Containerize New York with Docker!
Let's Containerize New York with Docker!Jérôme Petazzoni
 
FPC for the Masses - CoRIIN 2018
FPC for the Masses - CoRIIN 2018FPC for the Masses - CoRIIN 2018
FPC for the Masses - CoRIIN 2018Xavier Mertens
 
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo..."Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...Yandex
 

Semelhante a Loadays managing my sql with percona toolkit (20)

Survey of Percona Toolkit
Survey of Percona ToolkitSurvey of Percona Toolkit
Survey of Percona Toolkit
 
Docker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12xDocker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12x
 
Docker Introduction, and what's new in 0.9 — Docker Palo Alto at RelateIQ
Docker Introduction, and what's new in 0.9 — Docker Palo Alto at RelateIQDocker Introduction, and what's new in 0.9 — Docker Palo Alto at RelateIQ
Docker Introduction, and what's new in 0.9 — Docker Palo Alto at RelateIQ
 
Docker Introduction + what is new in 0.9
Docker Introduction + what is new in 0.9 Docker Introduction + what is new in 0.9
Docker Introduction + what is new in 0.9
 
Docker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12XDocker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12X
 
Introduction to Docker (as presented at December 2013 Global Hackathon)
Introduction to Docker (as presented at December 2013 Global Hackathon)Introduction to Docker (as presented at December 2013 Global Hackathon)
Introduction to Docker (as presented at December 2013 Global Hackathon)
 
Dynamic tracing of MariaDB on Linux - problems and solutions (MariaDB Server ...
Dynamic tracing of MariaDB on Linux - problems and solutions (MariaDB Server ...Dynamic tracing of MariaDB on Linux - problems and solutions (MariaDB Server ...
Dynamic tracing of MariaDB on Linux - problems and solutions (MariaDB Server ...
 
E bpf and dynamic tracing for mariadb db as (mariadb day during fosdem 2020)
E bpf and dynamic tracing for mariadb db as (mariadb day during fosdem 2020)E bpf and dynamic tracing for mariadb db as (mariadb day during fosdem 2020)
E bpf and dynamic tracing for mariadb db as (mariadb day during fosdem 2020)
 
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
 
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Lightweight Virtualization with Linux Containers and Docker I YaC 2013Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
 
Percona Toolkit for Effective MySQL Administration
Percona Toolkit for Effective MySQL AdministrationPercona Toolkit for Effective MySQL Administration
Percona Toolkit for Effective MySQL Administration
 
Dockerizing the Hard Services: Neutron and Nova
Dockerizing the Hard Services: Neutron and NovaDockerizing the Hard Services: Neutron and Nova
Dockerizing the Hard Services: Neutron and Nova
 
Gdb basics for my sql db as (percona live europe 2019)
Gdb basics for my sql db as (percona live europe 2019)Gdb basics for my sql db as (percona live europe 2019)
Gdb basics for my sql db as (percona live europe 2019)
 
Analyze Virtual Machine Overhead Compared to Bare Metal with Tracing
Analyze Virtual Machine Overhead Compared to Bare Metal with TracingAnalyze Virtual Machine Overhead Compared to Bare Metal with Tracing
Analyze Virtual Machine Overhead Compared to Bare Metal with Tracing
 
Why you’re going to fail running java on docker!
Why you’re going to fail running java on docker!Why you’re going to fail running java on docker!
Why you’re going to fail running java on docker!
 
Deploying software at Scale
Deploying software at ScaleDeploying software at Scale
Deploying software at Scale
 
Linux /proc filesystem for MySQL DBAs - FOSDEM 2021
Linux  /proc filesystem for MySQL DBAs - FOSDEM 2021Linux  /proc filesystem for MySQL DBAs - FOSDEM 2021
Linux /proc filesystem for MySQL DBAs - FOSDEM 2021
 
Let's Containerize New York with Docker!
Let's Containerize New York with Docker!Let's Containerize New York with Docker!
Let's Containerize New York with Docker!
 
FPC for the Masses - CoRIIN 2018
FPC for the Masses - CoRIIN 2018FPC for the Masses - CoRIIN 2018
FPC for the Masses - CoRIIN 2018
 
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo..."Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
 

Mais de Frederic Descamps

MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...Frederic Descamps
 
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code ExtensionMySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code ExtensionFrederic Descamps
 
RivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and HistogramsRivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and HistogramsFrederic Descamps
 
RivieraJUG - MySQL 8.0 - What's new for developers.pdf
RivieraJUG - MySQL 8.0 - What's new for developers.pdfRivieraJUG - MySQL 8.0 - What's new for developers.pdf
RivieraJUG - MySQL 8.0 - What's new for developers.pdfFrederic Descamps
 
MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8Frederic Descamps
 
State of the Dolphin - May 2022
State of the Dolphin - May 2022State of the Dolphin - May 2022
State of the Dolphin - May 2022Frederic Descamps
 
Percona Live 2022 - MySQL Shell for Visual Studio Code
Percona Live 2022 - MySQL Shell for Visual Studio CodePercona Live 2022 - MySQL Shell for Visual Studio Code
Percona Live 2022 - MySQL Shell for Visual Studio CodeFrederic Descamps
 
Percona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database SystemPercona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database SystemFrederic Descamps
 
Percona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL ArchitecturesPercona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL ArchitecturesFrederic Descamps
 
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database SystemLinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database SystemFrederic Descamps
 
Open Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and HistogramsOpen Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and HistogramsFrederic Descamps
 
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
Pi Day 2022 -  from IoT to MySQL HeatWave Database ServicePi Day 2022 -  from IoT to MySQL HeatWave Database Service
Pi Day 2022 - from IoT to MySQL HeatWave Database ServiceFrederic Descamps
 
Confoo 2022 - le cycle d'une instance MySQL
Confoo 2022  - le cycle d'une instance MySQLConfoo 2022  - le cycle d'une instance MySQL
Confoo 2022 - le cycle d'une instance MySQLFrederic Descamps
 
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...
FOSDEM 2022 MySQL Devroom:  MySQL 8.0 - Logical Backups, Snapshots and Point-...FOSDEM 2022 MySQL Devroom:  MySQL 8.0 - Logical Backups, Snapshots and Point-...
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...Frederic Descamps
 
Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0Frederic Descamps
 
Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0Frederic Descamps
 
State of The Dolphin - May 2021
State of The Dolphin - May 2021State of The Dolphin - May 2021
State of The Dolphin - May 2021Frederic Descamps
 
Deploying Magento on OCI with MDS
Deploying Magento on OCI with MDSDeploying Magento on OCI with MDS
Deploying Magento on OCI with MDSFrederic Descamps
 

Mais de Frederic Descamps (20)

MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
 
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code ExtensionMySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
 
RivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and HistogramsRivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and Histograms
 
RivieraJUG - MySQL 8.0 - What's new for developers.pdf
RivieraJUG - MySQL 8.0 - What's new for developers.pdfRivieraJUG - MySQL 8.0 - What's new for developers.pdf
RivieraJUG - MySQL 8.0 - What's new for developers.pdf
 
MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8
 
State of the Dolphin - May 2022
State of the Dolphin - May 2022State of the Dolphin - May 2022
State of the Dolphin - May 2022
 
Percona Live 2022 - MySQL Shell for Visual Studio Code
Percona Live 2022 - MySQL Shell for Visual Studio CodePercona Live 2022 - MySQL Shell for Visual Studio Code
Percona Live 2022 - MySQL Shell for Visual Studio Code
 
Percona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database SystemPercona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database System
 
Percona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL ArchitecturesPercona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL Architectures
 
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database SystemLinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
 
Open Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and HistogramsOpen Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and Histograms
 
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
Pi Day 2022 -  from IoT to MySQL HeatWave Database ServicePi Day 2022 -  from IoT to MySQL HeatWave Database Service
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
 
Confoo 2022 - le cycle d'une instance MySQL
Confoo 2022  - le cycle d'une instance MySQLConfoo 2022  - le cycle d'une instance MySQL
Confoo 2022 - le cycle d'une instance MySQL
 
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...
FOSDEM 2022 MySQL Devroom:  MySQL 8.0 - Logical Backups, Snapshots and Point-...FOSDEM 2022 MySQL Devroom:  MySQL 8.0 - Logical Backups, Snapshots and Point-...
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...
 
Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0
 
Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0
 
State of The Dolphin - May 2021
State of The Dolphin - May 2021State of The Dolphin - May 2021
State of The Dolphin - May 2021
 
MySQL Shell for DBAs
MySQL Shell for DBAsMySQL Shell for DBAs
MySQL Shell for DBAs
 
Deploying Magento on OCI with MDS
Deploying Magento on OCI with MDSDeploying Magento on OCI with MDS
Deploying Magento on OCI with MDS
 
MySQL Router REST API
MySQL Router REST APIMySQL Router REST API
MySQL Router REST API
 

Último

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Último (20)

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Loadays managing my sql with percona toolkit

  • 1. Managing MySQL with Percona Toolkit LOADAYS 2012 – April 1st
  • 2. Who am I ? Frédéric Descamps @lefred http://about.me/lefred Percona Consultant Managing mysql since 3.23 (as far as I remember) devops believer www.percona.com
  • 3. Agenda ● What is Percona Toolkit ? ● What tools are included and what can they do ? ● Quick intro to several tools ● Resources www.percona.com
  • 4. Percona Toolkit ● Origin: Maatkit and Aspersa (both projects started by Baron Schwartz with Daniel Nichter's contribution) ● Indispensable tools for MySQL administrators ● Opensource GNU GPL v2 ● https://launchpad.net/percona-toolkit ● http://www.percona.com/software/percona-toolkit/ ● Current version is 2.0.4 www.percona.com
  • 5. Other Toolkits www.percona.com
  • 6. Percona Toolkit ;-) www.percona.com
  • 7. More seriously: www.percona.com
  • 8. Installation ● Requirements: ➢ Perl, DBI, DBD::pgsql, Wine or Mono ➢ Better performance with Wine ● Download zip: ➢ http://megaupload.com/PTK204 ➢ It's in Percona's MSN repository ● We are working on a Java version ● Easy to run: wine pt-diskstats_win32.exe www.percona.com
  • 9. Installation ● Requirements: ➢ Perl, DBI, DBD::pgsql, Wine or Mono ➢ Better performance with Wine ● Download zip: ➢ http://megaupload.com/PTK204 ➢ It's in Percona's MSN repository ● We are working on a Java version ● Easy to run: wine pt-diskstats_win32.exe www.percona.com
  • 10. Installation ● Requirements: ➢ Perl, DBI, DBD::mysql, Term::ReadKey ● Download tarball, RPM or DEB packages: ➢ wget percona.com/get/percona-toolkit.rpm ➢ It's in Percona repository ● Download individual tools: ➢ wget percona.com/get/pt-diskstats www.percona.com
  • 11. Know your environment: Hardware & Operating System www.percona.com 11
  • 12. Know your environment (Hardware & OS) We need to find the answers to these questions: ● On what kind of machine runs my db ? Physical/Virtual ? ● How much memory is used/free ? Does it swap ? Can I add more ? ● How many CPUs and CPU cores ? Speed ? ● Is this a 64bit machine ? ● What kind of RAID controller ? Volumes ? Disks ? ● What about network interfaces ? Connections ? Processes ? ● What's the Operating System ? Kernel ? Release ? ● Which IO scheduler is in use ? ● On which filesystem is the data stored ? ● Do we have free space ? www.percona.com 12
  • 13. Summary ! Name: pt-summary Function: summarize system information in a nice way Url: http://www.percona.com/doc/percona-toolkit/2.0/pt-summary.html www.percona.com 13
  • 14. Taking inventory $ wget percona.com/get/pt-summary $ chmod +x pt-summary $ ./pt-summary # Percona Toolkit System Summary Report ###################### Date | 2012-02-02 12:25:18 UTC (local TZ: EET +0200) Hostname | db01 Uptime | 42 days, 16:14, 1 user, load average: 1.15, 1.22, 1.08 System | HP; ProLiant DL580 G7; vNot Specified (Rack Mount Chassis) Service Tag | FOSDEM2012 Platform | Linux Release | CentOS release 6.1 (Final) Kernel | 2.6.32-131.21.1.el6.x86_64 Architecture | CPU = 64-bit, OS = 64-bit Threading | NPTL 2.12 Compiler | GNU CC version 4.4.5 20110214 (Red Hat 4.4.5-6). SELinux | Disabled Virtualized | No virtualization detected # Processor ################################################## Processors | physical = 4, cores = 40, virtual = 80, hyperthreading = yes Speeds | 80x2397.393 Models | 80xIntel(R) Xeon(R) CPU E7- 4870 @ 2.40GHz [ Further output omitted ] www.percona.com 14
  • 15. Know your environment: MySQL www.percona.com 15
  • 16. Know your environment (MySQL) We need to find the answers to these questions: ● Version ? Build ? ● How many database ? Where is the data directory ? ● What about replication ? How many replicas ? ● Do you use some Key XtraDB features ? ● What are the Key InnoDB settings ? ● Which storage engines are used ? ● What types of data fields are used ? Index types ? ● Do we use foreign keys ? Views ? Triggers ? ● Do we use Full-text indexes ? Partitioning ? ● What about Privileges ? www.percona.com 16
  • 17. Summary... again ! Name: pt-mysql-summary Function: Summarize MySQL information in a nice way Url: http://www.percona.com/doc/percona-toolkit/2.0/pt-mysql-summary.html www.percona.com 17
  • 18. Taking inventory (cont.) $ wget percona.com/get/pt-mysql-summary $ chmod +x pt-mysql-summary $ ./pt-mysql-summary # Percona Toolkit MySQL Summary Report ####################### System time | 2012-02-02 12:24:37 UTC (local TZ: EET +0200) # Instances ################################################## Port Data Directory Socket ===== ========================== ====== /mysql # Report On Port 3306 ######################################## User | root@localhost Time | 2012-02-02 14:24:38 (EET) Hostname | db01 Version | 5.5.18-55-log Percona Built On | Linux x86_64 Started | 2011-12-26 21:09 (up 37+17:15:35) Databases | 6 Datadir | /mysql/ Processes | 10 connected, 4 running Replication | Is a slave, has 1 slaves connected Pidfile | /mysql/mysqld.pid (exists) [ Further output omitted ] www.percona.com 18
  • 19. Master ? Slave ?... both ? Name: pt-slave-find Function: find and print replication hierarchy tree of MySQL slaves. Url: http://www.percona.com/doc/percona-toolkit/2.0/pt-slave-find.html www.percona.com 19
  • 20. Inventory of Replicas $ ./pt-slave-find localhost localhost Version 5.5.18-55-log Server ID 11 Uptime 37+17:45:50 (started 2011-12-26T21:09:03) Replication Is a slave, has 1 slaves connected, is not read_only Filters Binary logging MIXED Slave status 0 seconds behind, running, no errors Slave mode STRICT Auto-increment increment 2, offset 1 InnoDB version 1.1.8-rel23.0 +- 10.0.0.17 Version 5.5.18-55-log Server ID 12 Uptime 27+21:02:35 (started 2012-01-05T17:52:18) Replication Is a slave, has 1 slaves connected, is not read_only Filters Binary logging MIXED Slave status 0 seconds behind, running, no errors Slave mode STRICT Auto-increment increment 2, offset 2 InnoDB version 1.1.8-rel23.0 www.percona.com 20
  • 21. Where's My Disk I/O Going ? ● Use pt-diskstats as an improved iostat ➢ Interactively controllable, slice-and-dice ➢ Doesn't lump reads and writes together ➢ Meaningful, correct columns ● Use pt-ioprofile to measure & time your I/O ➢ Which files is MySQL using ? How much times does it spend reading, writing, syncing, etc? How many reads/writes? How large are they ? pt-ioprofile can be dangerous in production www.percona.com 21
  • 22. Disk I/O Name: pt-diskstats Function: Aggregate and summarize /proc/diskstats Url: http://www.percona.com/doc/percona-toolkit/2.0/pt-diskstats.html www.percona.com 22
  • 23. Disk I/O # ./pt-diskstats #ts device rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt busy in_prg io_s qtime stime {1} sdb 158.0 5.8 0.9 0% 0.8 4.9 392.1 24.3 9.3 51% 0.6 0.7 54% 0 550.1 0.9 0.6 {1} sdb1 158.0 5.8 0.9 0% 0.8 4.9 392.1 24.3 9.3 51% 0.6 0.7 54% 0 550.1 0.9 0.6 {2} sda 0.5 4.0 0.0 0% 0.0 8.0 3.0 59.3 0.2 93% 0.0 0.2 1% 0 3.5 0.0 0.3 {2} sda2 0.0 0.0 0.0 0% 0.0 0.0 1.0 16.0 0.0 75% 0.0 1.0 0% 0 1.0 0.0 1.0 {2} sda5 0.5 4.0 0.0 0% 0.0 8.0 2.0 81.0 0.2 95% 0.0 0.1 1% 0 2.5 0.0 0.2 {2} sdb 150.0 8.7 1.3 3% 1.1 6.9 448.5 40.6 17.8 84% 1.4 0.5 53% 0 598.6 0.6 0.2 {2} sdb1 143.0 8.9 1.2 3% 1.0 6.8 400.5 24.7 9.7 49% 0.7 0.9 51% 0 543.6 1.3 0.5 {2} sdb2 7.0 4.0 0.0 0% 0.1 10.0 48.0 173.0 8.1 98% 0.7 0.3 9% 0 55.0 0.3 0.0 wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt 392.1 24.3 9.3 51% 0.6 0.7 392.1 24.3 9.3 51% 0.6 0.7 3.0 59.3 0.2 93% 0.0 0.2 1.0 16.0 0.0 75% 0.0 1.0 2.0 81.0 0.2 95% 0.0 0.1 448.5 40.6 17.8 84% 1.4 0.5 400.5 24.7 9.7 49% 0.7 0.9 48.0 173.0 8.1 98% 0.7 0.3 www.percona.com 23
  • 24. I/O Profile Name: pt-ioprofile Function: Watch process IO and print a table of file and I/O activity. Url: http://www.percona.com/doc/percona-toolkit/2.0/pt-ioprofile.html www.percona.com 24
  • 25. I/O profile # ./pt-ioprofile Sat Feb 4 13:44:08 CET 2012 Tracing process ID 24179 total read write open close lseek filename 0.007547 0.000583 0.004245 0.002181 0.000268 0.000270 /tmp/#sql_5e73_1.MYI 0.000686 0.000000 0.000000 0.000420 0.000266 0.000000 /tmp/#sql_5e73_1.MYD 0.000065 0.000000 0.000024 0.000029 0.000012 0.000000 /var/lib/mysql/fred/db.opt 0.000055 0.000000 0.000000 0.000055 0.000000 0.000000 /var/lib/mysql/mysql/db.opt 0.000046 0.000000 0.000000 0.000046 0.000000 0.000000 /var/lib/mysql/test/db.opt www.percona.com 25
  • 26. Be intimate with your database www.percona.com 26
  • 27. Let's try to find the answer to these indiscreet questions: ● How are the indexes used ? ● Are there duplicate keys ? ● Which queries are eating most of the resources ? www.percona.com 27
  • 28. Analyze Schema & Queries ● Duplicate/redundant indexes or foreign keys? ➢ pt-duplicate-key-checker can tell you that ● Which indexes are unused? ➢ pt-index-usage can tell you that ➢ It can also show which queries have unstable plans, which indexes have alternatives that are never chosen, and lots more ● Bad SQL? ➢ pt-query-advisor to the rescue www.percona.com 28
  • 29. Analyze & Profile Your Workload ● Use pt-query-digest to analyze the “slow query log” and show a profile of the workload ● It does the Right Thing by default ● Mostly used with slow query logs & tcpdumps www.percona.com 29
  • 30. The Report ● Each class of query is ranked by execution time ● There is a report for each class of query ● It's easy to use ● It's a great way to start optimizing queries www.percona.com 30
  • 31. Overview Report # 13903.5s user time, 39.9s system time, 1.78G rss, 1.92G vsz # Current date: Mon Jan 30 20:36:26 2012 # Hostname: hp-db01 # Files: /var/lib/mysql/db01-slow.log # Overall: 32.98M total, 1.32k unique, 1.73k QPS, 2.06x concurrency ______ # Time range: 2012-01-30 11:08:22 to 16:25:40 # Attribute total min max avg 95% stddev median # ============ ======= ======= ======= ======= ======= ======= ======= # Exec time 39309s 1us 161s 1ms 515us 109ms 30us # Lock time 4471s 0 161s 135us 89us 90ms 0 # Rows sent 118.72M 0 1010.29k 3.77 1.96 963.89 0 # Rows examine 15.54G 0 3.51M 505.92 1.96 11.61k 0 # Rows affecte 1.64M 0 2.85k 0.05 0 1.82 0 # Rows read 118.72M 0 1010.29k 3.77 1.96 963.89 0 # Bytes sent 52.40G 0 45.18M 1.67k 5.20k 20.30k 537.02 # Merge passes 128 0 1 0.00 0 0.00 0 # Tmp tables 957.76k 0 4 0.03 0 0.17 0 # Tmp disk tbl 297.92k 0 2 0.01 0 0.10 0 # Tmp tbl size 5.21T 0 2.22G 169.59k 0 1.78M 0 # Query size 8.52G 6 130.40k 277.38 833.10 709.99 174.84 # InnoDB: # IO r bytes 672.00k 0 32.00k 0.06 0 35.90 0 # IO r ops 42 0 2 0.00 0 0.00 0 # IO r wait 19ms 0 2ms 0 0 1us 0 # pages distin 329.98M 0 32.08k 28.18 42.48 307.62 4.96 # queue wait 0 0 0 0 0 0 0 # rec lock wai 3402s 0 161s 277us 0 147ms 0 # Boolean: # Filesort 2% yes, 97% no # Filesort on 0% yes, 99% no # Full join 0% yes, 99% no # Full scan 2% yes, 97% no # QC Hit 55% yes, 44% no # Tmp table 2% yes, 97% no # Tmp table on 0% yes, 99% no www.percona.com 31
  • 32. Profile Report # Profile # Rank Query ID Response time Calls R/Call Apdx V/M Item # ==== ================== =============== ======== ======= ==== ===== ==== # 1 0x844F3DA35A4A426D 8695.6994 22.1% 41470 0.2097 1.00 0.12 SELECT catalog # 2 0xD566217EB8EB1A27 4098.9154 10.4% 48740 0.0841 1.00 0.11 SELECT geoip # 3 0xB0A48B410B3CC151 2684.9671 6.8% 55 48.8176 0.00 34.18 UPDATE SELECT sales_ # 4 0x60CDD6CAE6B487BC 2541.5271 6.5% 352 7.2202 0.20 4.01 SELECT catalog catalog_category_product # 5 0xD9DED53EF74C877F 1285.6118 3.3% 5530829 0.0002 1.00 0.00 SELECT op_image # 6 0x1F3D58843008ACEC 1249.1639 3.2% 182 6.8635 0.12 1.65 SELECT catalog_product # 7 0x50175ED6D1B1C8B1 1188.1541 3.0% 153964 0.0077 1.00 0.00 SELECT enterprise # 8 0x70E2BE84868444A4 1035.3475 2.6% 1786 0.5797 0.98 0.16 SELECT sales_order # 9 0x125DFE84FFA50675 891.3327 2.3% 382 2.3333 0.97 11... INSERT UPDATE product # 10 0xBB968DD9BF27E8E5 797.3765 2.0% 153964 0.0052 1.00 0.00 SELECT enterprise www.percona.com 32
  • 33. Per Query Report # Query 1: 2.25 QPS, 0.47x concurrency, ID 0x844F3DA35A4A426D at byte 4779840203 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 0 41470 # Exec time 22 8696s 97ms 3s 210ms 455ms 159ms 155ms # Lock time 0 7s 107us 50ms 177us 247us 272us 159us # Rows sent 1 1.60M 26 50 40.45 49.17 10.74 46.83 # Rows examine 16 2.63G 66.43k 66.60k 66.49k 65.68k 0 65.68k # Rows affecte 0 0 0 0 0 0 0 0 # Rows read 1 1.60M 26 50 40.45 49.17 10.74 46.83 # Bytes sent 0 200.43M 3.39k 6.14k 4.95k 6.01k 1.08k 5.45k # Merge passes 0 0 0 0 0 0 0 0 # Tmp tables 4 40.50k 1 1 1 1 0 1 # Tmp disk tbl 0 0 0 0 0 0 0 0 # Tmp tbl size 12 647.83G 16.00M 16.00M 16.00M 16.00M 0 16.00M # Query size 0 71.78M 1.77k 1.77k 1.77k 1.77k 0 1.77k # InnoDB: # IO r bytes 0 0 0 0 0 0 0 0 # IO r ops 0 0 0 0 0 0 0 0 # IO r wait 0 0 0 0 0 0 0 0 # pages distin 47 158.13M 3.90k 3.92k 3.90k 3.88k 0.00 3.88k # queue wait 0 0 0 0 0 0 0 0 # rec lock wai 0 0 0 0 0 0 0 0 # Boolean: # Filesort 100% yes, 0% no # Full scan 100% yes, 0% no # Tmp table 100% yes, 0% no # String: # Databases prod # Hosts # InnoDB trxID 3CB60AED (1/0%), 3CB60B3E (1/0%)... 41468 more # Last errno 0 # Users prod # Query_time distribution # 1us # 10us # 100us # 1ms # 10ms # 100ms ################################################################ # 1s # # 10s+ www.percona.com 33
  • 34. Maintain your environment www.percona.com 34
  • 35. Log & Analyze Errors ? ● Use pt-deadlock-logger to capture deadlocks ● Use pt-fk-error-logger for foreign key errors ● The tools give you the possibility to log the results to a database table for analysis www.percona.com 35
  • 36. Monitor dead locks Name: pt-deadlock-logger Function: extract and log MySQL deadlock information Url: http://www.percona.com/doc/percona-toolkit/2.0/pt-deadlock-logger.html ● SHOW ENGINE INNODB STATUS reports only the most recent deadlock ● Information in status output lacks details about user, client host, other locks in the deadlock cycle. ● pt-deadlock-logger formats the needed information nicely and saves it www.percona.com 36
  • 37. Monitor Foreign Key Errors Name: pt-fk-error-logger Function: extract and log MySQL foreign key errors. Url: http://www.percona.com/doc/percona-toolkit/2.0/pt-fk-error-logger.html ● Like pt-deadlock-logger, this tool collects more useful information, formats it nicely and saves it. www.percona.com 37
  • 38. Non-Blocking ALTER TABLE ● Use pt-online-schema-change to alter tables ➢ It makes a “shadow copy” and swaps them ➢ Extremely useful for large, long-running ALTER ➢ Facebook uses the same technique www.percona.com 38
  • 39. Validate Upgrades ● Upgrades are a leading cause of downtime ➢ Are any queries using different indexes ? Is QEP different ? ➢ Are there new errors or warnings ? ➢ Do queries return the same results ? ➢ Are there significant response time differences ? ● Validate the results before you upgrade! ➢ Capture a snapshot of the data ➢ Capture a log of queries ➢ Compare the queries on two test servers running the old and the new version www.percona.com 39
  • 40. Validate upgrades Name: pt-upgrade Function: Execute queries on multiple servers and check for differences. Url: http://www.percona.com/doc/percona-toolkit/2.0/pt-upgrade.html www.percona.com 40
  • 41. pt-upgrade # Query 2: ID 0xE2C8DC0286B7F44E at byte 0 _______________________________ # Found 23281 differences in 58207 samples: # checksums 0 # column counts 0 # column types 0 # query times 23281 # row counts 0 # warning counts 0 # warning levels 0 # warnings 0 # AF002020:3306 AF001885:3306 # Errors 0 0 # Warnings 0 0 # Query_time # sum 34s 70s # min 395us 342us # max 218ms 308ms # avg 587us 1ms # pct_95 725us 3ms # stddev 2ms 4ms # median 541us 690us # row_count # sum 1.75k 1.75k # min 0 0 # max 1 1 # avg 0.03 0.03 # pct_95 0 0 # stddev 0.17 0.17 # median 0 0 www.percona.com 41
  • 42. Tools for Replication ● Verify replication integrity (pt-table-checksum) ● Repair out-of-sync replicas (pt-table-sync) ● Measure delay accurately (pt-heartbeat) ● Deliberately delay replication (pt-slave-delay) ● Watch & restart replication (pt-slave-restart) www.percona.com 42
  • 43. Verify replication Integrity Name: pt-table-checksum Function: perform an online replication consistency check, or checksum MySQL tables efficiently on one or many servers. Url: http://www.percona.com/doc/percona-toolkit/2.0/pt-table-checksum.html ● Use it routinely (mandatory for 95% of MySQL users) ● It used to be complicated; no more. Just run it! ● Put it in a weekly crontab ● Repair differences with pt-table-sync www.percona.com 43
  • 44. I feel bad... www.percona.com 44
  • 45. Find problems ● What do you advise me doctor ? ● Get the symptoms when it hurts ! www.percona.com 45
  • 46. Get the symptoms when it hurts ! To perform this action, do a check-up when you feel bad: ● pt-stalk ● pt-sift www.percona.com 46
  • 47. Does it hurt ? Name: pt-stalk Function: wait for a condition to occur then begin collecting data. Url: http://www.percona.com/doc/percona-toolkit/2.0/pt-stalk.html www.percona.com 47
  • 48. We need your health parameters Name: pt-collect Function: collect information from a server for some period of time. OBSOLETE Url: http://www.percona.com/doc/percona-toolkit/2.0/pt-collect.html www.percona.com 48
  • 49. Let me check... Name: pt-sift Function: browses files created by pt-stalk. Url: http://www.percona.com/doc/percona-toolkit/2.0/pt-collect.html www.percona.com 49
  • 50. Very useful Name: pt-mext Function: Look at many samples of MySQL SHOW GLOBAL STATUS side-by-side Url: http://www.percona.com/doc/percona-toolkit/pt-mext.html ● Default STATUS shows counter since the MySQL instances started. ● It is more helpful to see a delta of recent activity, to check if a change you applied made a difference. www.percona.com 50
  • 51. pt-mext pt-mext -r -- mysqladmin ext -i10 -c5 All values are interesting but you should pay even more attention to: ● Created_tmp_* ● Handler_read_* ● Innodb_buffer_pool_read* ● Innodb_os_log_written ● Key_read_requests ● Key_reads ● Qchache* ● Select_full_*join ● Select_range ● Select_scan ● Table_locks_waited ● Threads_running www.percona.com 51
  • 52. Stop Bad Queries ● Use pt-kill to watch for long-running queries and optionally kill them ● Prevent long-running idle transactions too. www.percona.com 52
  • 53. Percona Toolkit's Future ● Rapid development & improvement of tools ● Fully supported via Percona Support contract ● Upcoming: ➢ pt-*summary redesigned ➢ pt-stalk “magical fault detection algorithm” ➢ Redesign of pt-online-schema-change (see http://www.percona.com/docs/wiki/ptdev:blueprints:redesign-pt- online-schema-change) ➢ more goodies •https://blueprints.launchpad.net/percona-toolkit www.percona.com 53
  • 54. Report bugs & patches www.percona.com 54
  • 55. Report bugs & patches Belgian Beers ....... what else !? www.percona.com 55
  • 56. Thank you for your participation to LOADAYS
  • 57. Due to time I was not able to present two new Percona projects related to High Availability. If you want to discuss PRM and XtraDB Cluster... I am available
  • 58. PRM ● Percona Replication Manager ● Uses Corosync / Pacemaker ● Distributed architecture, no SPOF ● One master multiple slaves ● Slaves maintain a master score attribute based on replication state ● Full stonith/fencing stack ● Flexible logic, score based www.percona.com 58
  • 59. Percona XtraDB Cluster ● Percona Server + Galera ● Synchronous replication ● Multi-master replication ● Multi-threaded slaves ● Data consistency across all peers ● Automatic nodes provisioning www.percona.com 59
  • 60. lefred@percona.com @lefred We're Hiring! www.percona.com/about-us/careers/