twitter-forks / mysql

MySQL fork maintained and used at Twitter
https://github.com/twitter/mysql/wiki
GNU General Public License v2.0
1.72k stars 443 forks source link

Feature merge request #1

Closed ronin13 closed 12 years ago

ronin13 commented 12 years ago

After the release of twitter mysql on github, I noticed https://github.com/twitter/mysql/wiki/Table-Options -- to have pre-determined initial size for per-table tablespaces; I have some code which should complement it pretty well.

Mainly the code deals with,

  1. Use fallocate in os_file_set_size for initial creation of innodb files.
  2. Use #1 for extension of ibdata1 files.
  3. Use #1 for ibd files.
  4. Ability to set increment size for extension of ibd files through a variable.

It starts from, http://bazaar.launchpad.net/~raghavendra-prabhu/+junk/mysql-server-fallocate/revision/3547 upto http://bazaar.launchpad.net/~raghavendra-prabhu/+junk/mysql-server-fallocate/revision/3550

(Commits after that deal with other issues).

Also, the code is merged and up-to-date with latest 5.6 bzr pull, also I have tested it myself and results have been pretty good.

I can send these with git-format-patch + git send-email if you need it.

darnaut commented 12 years ago

Unfortunately fallocate is not supported within our production systems. We might take a look at this again in the future.

ronin13 commented 12 years ago

Ah, I see. Even without fallocate it should work (there are 2-3 ifdefs for this), steps 2-4 will use normal file extension instead of it.