MySQL Bests practices on Linux Serge Frezefond
[email protected] Dir. Technique SUN / MySQL France Solution Linux 2009 Paris, 02-04-2009 Copyright 2006 MySQL AB The World’s Most Popular Open Source Database 1 Agenda • Architecture MySQL • DRBD Heartbeat • IO / File systems / ZFS • LVM for backups • Secure replication : checksum through SSL • Virtualization • Monitoring / Tuning • Linux memory : locking , swappiness • Dev MySQL on Linux. • Conclusion / Q&A Copyright 2009 SUN MySQL The World’s Most Popular Open Source Database 2 MySQL Architecture Copyright 2009 SUN MySQL The World’s Most Popular Open Source Database 3 MySQL : Storage Engines Partenaires InnoDB SolidBD for MySQL En cours : InfoBright – Brighthouse DWH ScaleDB NitroEDB AmazonS3 MemCache PrimeBase XT Moteur de stockage de Thinking Networks OpenOLAP Communautaire Copyright 2009 SUN MySQL The World’s Most Popular Open Source Database 4 MySQL easy install on linux • Rpm + repo • Yum install • Apt-get install • Or install from a tar.gz – allow any case of installation : multiple base dir / multiple instances per base dir • Automatic startup : – /etc/init.d/ + chkconfig (gestion des niveaux de rcx.d) Copyright 2009 SUN MySQL The World’s Most Popular Open Source Database 5 MySQL, Heartbeat & DRBD Cluster IP Management Active Passive DRBD DRBD Server Server Synchronous Block Replication Copyright 2009 SUN MySQL The World’s Most Popular Open Source Database 6 DRBD Service Service File System File System Buffer Cache Raw Device Raw Device Buffer Cache DRBD DRBD TCP/IP TCP/IP