MySQL > YourSQL




                  Peter Lieverdink <peter@openquery.com>
Table 'critical_data' is marked as crashed and
should be repaired




                                     Peter Lieverdin...
Peter Lieverdink <peter@openquery.com>
InnoDB = win!




                Peter Lieverdink <peter@openquery.com>
Transactions

Crash recovery




                 Peter Lieverdink <peter@openquery.com>
> ALTER TABLE tablename ENGINE=InnoDB;




                              Peter Lieverdink <peter@openquery.com>
mysql_convert_table_format --type=InnoDB databasename




                                      Peter Lieverdink <peter@op...
Done!




        Peter Lieverdink <peter@openquery.com>
Done?




        Peter Lieverdink <peter@openquery.com>
Peter Lieverdink <peter@openquery.com>
Peter Lieverdink <peter@openquery.com>
Peter Lieverdink <peter@openquery.com>
[mysqld]

default_storage_engine    = InnoDB

innodb_buffer_pool_size   = 512M
innodb_log_buffer_size    = 8M
innodb_log_f...
Buffer pool     System cache




Transaction log    Binary logs




 Tablespace




                         Peter Lieverd...
> SET GLOBAL innodb_fast_shutdown=0;

$ /etc/init.d/mysql stop

$ mv /var/lib/mysql/ib_logfile* /somewhere/safe

$ /etc/in...
innodb_flush_method = O_DIRECT

          (on Linux)




                             Peter Lieverdink <peter@openquery.co...
# log = …

log_bin = ...
expire_log_days =




                    Peter Lieverdink <peter@openquery.com>
read_buffer_size     = 1M
read_rnd_buffer_size = 1M

query_cache_limit   = 128K
query_cache_size    = 16M




            ...
ourdelta.org




               Peter Lieverdink <peter@openquery.com>
Upcoming SlideShare
Loading in …5
×

MySQL > YourSQL

1,208 views

Published on

Most distributions ship MySQL with a configuration file that sees you running a server optimised for a system with 32MB of RAM. That was great in 1996, but these days your Nike+ shoes have more capacity than that, so it makes sense to optimise the configuration - or at least to make it not suck quite as badly.

Published in: Technology, Business
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,208
On SlideShare
0
From Embeds
0
Number of Embeds
10
Actions
Shares
0
Downloads
0
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

MySQL > YourSQL

  1. 1. MySQL > YourSQL Peter Lieverdink <peter@openquery.com>
  2. 2. Table 'critical_data' is marked as crashed and should be repaired Peter Lieverdink <peter@openquery.com>
  3. 3. Peter Lieverdink <peter@openquery.com>
  4. 4. InnoDB = win! Peter Lieverdink <peter@openquery.com>
  5. 5. Transactions Crash recovery Peter Lieverdink <peter@openquery.com>
  6. 6. > ALTER TABLE tablename ENGINE=InnoDB; Peter Lieverdink <peter@openquery.com>
  7. 7. mysql_convert_table_format --type=InnoDB databasename Peter Lieverdink <peter@openquery.com>
  8. 8. Done! Peter Lieverdink <peter@openquery.com>
  9. 9. Done? Peter Lieverdink <peter@openquery.com>
  10. 10. Peter Lieverdink <peter@openquery.com>
  11. 11. Peter Lieverdink <peter@openquery.com>
  12. 12. Peter Lieverdink <peter@openquery.com>
  13. 13. [mysqld] default_storage_engine = InnoDB innodb_buffer_pool_size = 512M innodb_log_buffer_size = 8M innodb_log_file_size = 32M innodb_file_per_table =1 Peter Lieverdink <peter@openquery.com>
  14. 14. Buffer pool System cache Transaction log Binary logs Tablespace Peter Lieverdink <peter@openquery.com>
  15. 15. > SET GLOBAL innodb_fast_shutdown=0; $ /etc/init.d/mysql stop $ mv /var/lib/mysql/ib_logfile* /somewhere/safe $ /etc/init.d/mysql start Peter Lieverdink <peter@openquery.com>
  16. 16. innodb_flush_method = O_DIRECT (on Linux) Peter Lieverdink <peter@openquery.com>
  17. 17. # log = … log_bin = ... expire_log_days = Peter Lieverdink <peter@openquery.com>
  18. 18. read_buffer_size = 1M read_rnd_buffer_size = 1M query_cache_limit = 128K query_cache_size = 16M Peter Lieverdink <peter@openquery.com>
  19. 19. ourdelta.org Peter Lieverdink <peter@openquery.com>

×