Giuseppe Maxia — MySQL Sandbox @ UC
The MySQL Sandbox is a way to set up a new test server or servers in just a few seconds.
Features
- not an official MySQL product
- GPL
- installs from a tarball in a few seconds
- installs side servers, not the main one (doesn’t disturb running servers!!!)
- creates a separate environment — data directory, port and socket
Sandbox commands
- start
- stop
- clear ( creates a fresh installation)
- use
- start_all
- stop_all
- clear_all
- multi_cmd
m for master and s for slave
quick install
./express_install.pl /path/mysql_os_5.1.tar.gz
This would install a single server
For replication
./set_replication.pl /path/mysql_os.tar.gz
for multiple servers
./set_many 5.0.51
and multiple servers of different versions
./set _custom_many.pl 5.0.51 5.1.23 6.0.5
(can specify full path for configurations
–how_man_nodes option creates theh specified number of nodes (–how_many_nodes=4 creates four hosts)
–help prints the help screen
Fine Tuning
./express_install.pl /path/mysql_OS.tar.gz [option] [option] …
./express_install.pl /path/mysql-OS.tar.gz –my_file={small|medium|large|hug}
or you can specify a path to a custom my.cnf
Commands
start simply start the server, creates the pid and socket files
stop stops the server
clear stops the server and removes all files in the data directory and clears the test database
use start the mysql client
- uses the credentials in the my_sandbox.cnf fiel
- deafault username and password msandbox/msandbox and root password of msandbox
my {sqldump|sqlbinlog|sqladmin|}
For Replication
start_all
starts the master and then the slave
stop _all
stops the slave and then the master
clear_all
clear all the slaves and then the master
For Multi-node Sandbox
start_all
stop_all
clear_all
multi_cmd
executes command on all nodes
This is a really cool looking tool. I have heard of it before, but never taken the time to download it and evaluate it. It would be really nice to use this on our test machine. If you do much testing at all I would recommend you download it and take it for a spin!!
Resources
http://sf.net/prjects/mysql-sandbox
No commentsInnodb Plug-in
So multiple people have blogged about this announcement already. The Innodb company has announced a new plug-in that can be a drop-in replacement for the current Innodb code in MySQL 5.1. Evidently it is really easy also. It has some interesting new features including non-blocking index creation if I am understanding things correctly. That to me seems to be the big new feature to me.
However, the reason why I am pointing this announcement out when others already have is that Peter Zaitsev did a talk today about the scalablitiy issues of Innodb dbs this afternoon. I blogged during the talk here. He pointed out (with benchmarks) multiple times that the 5.1 server (with Innodb tables) was actually not working as well as 5.0 currently does. If I understand correctly he didn’t have a chance to test the new plug-in (not for certain though — I was unclear about that). They possibly could have fixed these regression issues in the new version but I would love to see tests of it. Just a thought before we all get to excited :) I like the idea personally that the Innodb plug-in isn’t so tightly coupled with the MySQL server. Good to see them releasing something. Hope they continue! Scaling improvements above 8 cores would be nice.
No commentsPeter Zaitsev — Innodb Scalability @ UC
Scalability: the ability for a server to grow up (and technically down…but they don’t consider this)
Performs: response time is decent (ie not 30 seconds), easy to measure in production. Make sure there is enough system capacity (system loaded with degrading in response time and failing). With system operations you need to be able to have reasonable times for activities (24 hr backup of 2 terabytes is not acceptable).
Application Growth Parameters
- load - growing from 100 q/sec to 1,000 q/sec
- database size growing from 10 GB to 100 GB
- data distribution - going from 10 friends on average to 250 average
- launching new features - adding full text search can add a heavy load
As applicatons grow all the parameters tend to grow at once. This includeds more complex queries on larger databases. To maintain performance you can optimize the application: schema, queries, caching, sharding and replication.
What is a platform?
- hardware
- OS
- MySQL
Testing done through Micro Benchmarks (simple operations designed to test some particular aspect of behavior). Peter didn’t really explain this enough for me…other than a general idea not sure about it.
Issue with Innodb
- large tables are hard to deal
- backup - physical backup is a must
- can’t move separate tables between servers
- no repair functionality (corruption means dump and restore)
- ALTER TABLE is very slow (MM replication helps)
- table maint with OPTIMIZE TABLE
Online Index Creation in InnoDB
plugin just announced today by Innodb
Innodb can now build indexes without rebuilding whole table (index build done by sort which is much faster). It is ten times faster loading data and adding indexes (separately).
Dealing with Many Tables in Innodb
many people avoid the problem of large table by creating many small tables.
using innodb_file_per_table=1 will resolve this problem.
“Warmup” is still a problem. In 5.0 only one table can be opened at a time. stats update on open makes it quite slow.
Large Buffer Pool Size
In general, the more memory you can get for buffer pool the better it is
Warmup will take a long time. With a 32GB buffer pool, it can take an hour to fill at 600 pages/sec fill rate. SHOW STATUS and SHOW INNODB STATUS gets expensive because of global locking
In addition, shutdown will take longer with large buffer pool.
You can set innodb_max_dirty_pages_pct=0 in advance and it will help with the flushing of the buffer pool.
Peter discussed benchmarking 5.0 and 5.1. It appears that 5.1 has some regression issues! They tested up to 64 threads in a test. In all cases 5.1 simply did not perform as well. Quad-core chips did not perform as well as dual core.
Looks to me like 5.1 has bit to go in respect to Innodb. However, I don’t believe they had the latest patches. He kept mentioning Mark Callhan??
3 commentsSheeri K. Cabral — Best Practices for Database Administrators @ UC
Slides available @ http://www.pythian.com/blogs/917/best-practices-for-database-administrators-slides-and-links
Best Practices
Make it easy for yourself
- automate
- document (everything)
- use your brain for cpu not for storage (request tracking system & google!!!!)
Monitoring Basics
- graph (cacti, nagios)
- alerts (nagios)
- check your checks
Tradeoffs always exists
Backups & Restore
Backup of course but make sure you Restore!!
In case of failure…
- restore from backup
- master/slave
- master/master
- cluster
Test HA (High Availability) also!!
what scenarios do they cover?
what scenarios do they not cover?
Ounces of Prevention
- configuration vs. reality
- possibly memory usage
- disk space/tablespace size (limiting tablespace for innodb?)
Pounds of Cure
- error logs
- slow query logs
- query review (like code review)
mysqldumpslow (what server versions available?)
mysqlsla http://hackmysql.com
mk-query-profiler
show status before and after
mysqlreport http://hackmysql.com
procedure analyse()
what does each column, table do?
what’s in a name? good information!! can you read the data columns/tables and decipher what is going on?
question “best practices”
Schema Profile
- start normal
- denormalize if necessary
- stored procedures for developers (maybe they are afraid of normalization)
Replication
Be careful of TRIGGERs and any DML for SP or UDF
Sync often with mk-table-sync
Handle duplicates carefully
Maintenance
partition
archive
purge
static data
Manage User Expectations
aggregate data once every hour or fifteen minutes
split off processing:
- customer/non-customer
- internal/external
Foreign Keys
application still has to handle problem!!
No commentsThe Future of MySQL — Robin Schumacher and Rob Young@ UC
MySQL 5.1 Features
- table/index partitioning — not parallel, key has to be of a numeric value and no foreign keys
- row-based/hybrid replication — hybrid replication is the default and is changeable on the fly
- disk-based cluster tables
- built-in job scheduler (events) — replacement for cron etc.
- problem SQL identification — dynamic tracing via slow query log and can be logged
- faster full-text search
- archive engine improvements
RC 5.1.24 (Enterprise only I believe) available at conference
GA schedulted for the end of Q2 2008
MySQL 6.0 Features
- Falcon — user defined tablespaces
- maria
- online backups
- optimizer enhancements
scheduled for the end of 2008 (but I am making NO bets on it!! )
It looks like MySQL is beginning to de-couple cluster from the base server project. They have a roadmap of cluster products through the rest of this year and into next year. I think this is a great plan since the cluster product/engine is so different from everything else.
memcached will be offered support under MySQL Enterprise
MySQL 6.X — “citadel” mid to end 2009 is the plan
- foreign keys on all engines
- better prepared statements
- better server-side cursors
- replication improvements (checksums)
- data auditing
- external authentication
- security groups/roles
- transparent data encryption
- online alter table
Rob Young is talking about the enterprise products.
No commentsMySQL Magazine - Spring 2008 Available for Download
A few minutes ago I uploaded the new issue of the MySQL Magazine. I am very excited about this issue as the quality continues to increase! Not only do we have a great group of articles, Sheeri Cabral (our new Community Advocate Award winner) did a fabulous job creating an entire new layout and look for the magazine. It looks absolutely outstanding. I have told her several times how much I appreciate it, but let me once again take the time to say I appreciate the tireless work she did on the layout.
Here is a list of the table of contents:
A Tour of MySQL Certification
Coding Corner
On Efficiently Geo-Referencing IPs with MaxMind GeoIP and MySQL GIS
Introducing Kickfire
Automatic Query Optimization with QOT
As always, the magazine is free for download and is available from http://www.mysqlzine.net and http://www.paragon-cs.com/mag. Enjoy!!
No commentsDr. Charles Bell — MySQL Online Backup: An Introduction @ UC
Dr. Bell summarized new features found in the implementation of backup and restore in version 6.0.
SQL Driven — run from the command line
Database level backup
- tables
- views
- stored procedures
- stored functions
- triggers
- events
Enterprise level consistitency — from point in time
non-blocking DML operations on Innodb and Falcon
streaming backup data (only to local server file now..should extend to tape or other servers)
tablespace support for falcon
no data engine backup eg: blackhole, merge (didn’t quite understand why this is useful but he gave some reasons)
synchronization with binary log for point-in-time recovery
defaults to mysql datadir although you can specify a directory in the backup filename
example:
BACKUP DATABASE database_name TO ‘database.bak’;
RESTORE command is destructive
backup log information looks useful but Dr. Bell indicates it will be changing probably.
Future plans:
- coverage for all MySQL storage engines
- use plug-in architecture
- backup to other media/servers
- standalone mysqlbackuptool
- full server, database and enhanced point-in-time recovery
Still a work in progress but looks very promising!! Honestly, the backup parts of 6.0 might be the most important features of the upcoming 6.0 servers. Falcon looks nice and sounds nice, but backups rule the day when the $%#@ hits the fan. I personally am excited to finally see development on this front.
Resources:
http://forge.mysql.com/wiki/OnlineBackup
No commentsJonathan Schwartz Keynote @ UC
Johnathan made mention that the ZFS Filesystem “might” be moving from the CDDL license to a GPL license. Yeah!!
No commentsKeynote by Marten Mickos@UC
What is in the Sun buyout for the MySQL person?
- Performance and Scaling (indicating that they will be working on running MySQL on higher-end hw)
- Support
- Marketplace (partner “ecosystem” with powerful sales channel)
Design Priorities
Reliability (bugs fixed in 5.1: 997 in 2007 plus 386 in 2008)
5.1 GA release by end of June
Performance
5.1.24rc shows an improvement of 10-15% in throughput versus 5.0
Ease of Use
MySQL Workbench GA today
Awards
Applications of the year
Facebook, Virgin Mobile France and Ebay
Partners of the year
Zmanda, Microsoft, and Computacenter
Community Members of the Year
Code contributer - Baron Schwartz
Quality contributer - Diego Medina
Community Advocate - Sheeri Cabral
Overall, much of the talk is general market talk. There is quite a bit of talk about how a major Sun commitment to scale MySQL on larger servers. This is the one thing that I would really like to Sun/MySQL follow through on. Only time will tell.
No commentsMySQL Conference Begins Tomorrow
The conference kicks off tomorrow morning. Tonight we had the community dinner at a Mexican restaurant which was a great chance to meet with a number of people. I would start listing them but I would forget people. Jonathan Schwartz stopped by and Monty Widenius was there also. It was really cool getting to meet so many people that you have only read about online.
Afterwards many people ended up back at the Hyatt where the conference center is located. I finally rolled off to the room at midnight after talking to so many people that there is no way I can keep everyone straight in my head. Oh well, I will try.
Tomorrow is tutorials and the sessions start Tuesday. I am thinking about blogging from each session about the ongoing session. If you aren’t here you should be!! If you are reading this from home it is not too early to begin planning for next year.
No comments